bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer


From: Chong Yidong
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
Date: Sat, 28 May 2011 19:05:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Leo <sdl.web@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]