GNU bug report logs -
#8463
24.0.50; [PATCH] Direct Edit in *Occur* Buffer
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Sun, 10 Apr 2011 08:16:02 UTC
Severity: wishlist
Tags: patch
Found in version 24.0.50
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Leo <sdl.web <at> gmail.com> writes:
> I have extended the occur feature in Emacs to allow direct editing in
> the *Occur* buffer by propagating the changes to the original buffers.
>
> With the attached preliminary patch, one can press `C-x C-q' or `C-c
> C-c' to enter occur-edit-mode and start editing. Pressing `C-x C-q' or
> `C-c C-c' again finishes the edit.
>
> Comments are highly welcomed. Thanks in advance.
Looks good. I've made a couple of tweaks, and have committed it to
trunk. The C-c c-c binding was removed in favor of just C-x C-q, as
Stefan suggested. For now, I also left out the part where C-x C-q in
Occur Edit mode saves the associated buffers, because this doesn't seem
to be properly thought out; what if the buffers have no associated
files?
Also, I added a small fix to occur-after-change-function to avoid
screwing up the Occur Edit buffer when multi-line text is inserted.
Since we can't create new Occur entries, this just ignores everything
after the inserted newline. If you want to try and handle this properly
(i.e. by inserting a new Occur entry for each inserted line), go ahead.
This bug report was last modified 13 years and 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.