Post AdClJDsKX3dMR1MkYC by ericsfraga@fediscience.org
 (DIR) More posts by ericsfraga@fediscience.org
 (DIR) Post #AdAPWgD7uGKylxBXKi by mms@emacs.ch
       2023-12-25T11:47:49Z
       
       1 likes, 1 repeats
       
       TIL I learned about narrowing in #emacs and I am blown away by how simple yet „game chaning” it is.
       
 (DIR) Post #AdAlFDqOJm4UradDeq by acowley@mastodon.social
       2023-12-25T15:51:10Z
       
       0 likes, 0 repeats
       
       @mms One use I like is to narrow to a function body and search (or search and replace) for a string within that narrowed scope. It’s lightning fast to do that refinement.
       
 (DIR) Post #AdBIXXbqrkffrgApBQ by takeonrules@dice.camp
       2023-12-25T22:04:15Z
       
       0 likes, 0 repeats
       
       @mms amen!
       
 (DIR) Post #AdCQvxasty7KCAptXU by morix@loci.onl
       2023-12-26T11:12:59Z
       
       0 likes, 0 repeats
       
       @mms it also combines nicely with indirect buffers, so something like this can be fun :)(defun my/indirect-narrow-region ()  "Makes an indirect buffer in another window of the currently selected region, so editing either effects both."  (interactive)  (when (use-region-p)    (let ((beg (use-region-beginning))          (end (use-region-end)))      (if transient-mark-mode          (deactivate-mark))      (clone-indirect-buffer-other-window nil t)      (narrow-to-region beg end))))
       
 (DIR) Post #AdClJDsKX3dMR1MkYC by ericsfraga@fediscience.org
       2023-12-26T15:01:19Z
       
       0 likes, 0 repeats
       
       @mms There's a good blog post on narrowing/widening with some useful code by Artur Malabarba. I use some of that code daily. Narrowing & widening are excellent possibly under-appreciated aspects of buffer management in #Emacs!http://endlessparentheses.com/emacs-narrow-or-widen-dwim.html