unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Leo <sdl.web@gmail.com>
Cc: 8463@debbugs.gnu.org, Daniel Colascione <dan.colascione@gmail.com>
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
Date: Sat, 28 May 2011 19:05:01 -0400	[thread overview]
Message-ID: <87pqn2xw82.fsf@stupidchicken.com> (raw)
In-Reply-To: <m1lizi5xqa.fsf@th041153.ip.tsinghua.edu.cn> (Leo's message of "Sun, 10 Apr 2011 16:14:53 +0800")

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.





  parent reply	other threads:[~2011-05-28 23:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-10  8:14 bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer Leo
2011-04-15  1:11 ` Stefan Monnier
2011-05-28 23:05 ` Chong Yidong [this message]
2011-05-29  4:04   ` Leo
2011-05-30 14:04 ` Andrew W. Nosenko
2011-05-30 23:10   ` Richard Stallman
2011-06-01 23:03   ` Glenn Morris
2011-06-03  2:36     ` Leo
2011-06-03 15:38       ` Stefan Monnier
2011-06-04 21:34         ` Chong Yidong
2011-06-05  9:30           ` Štěpán Němec
2011-06-06 15:34           ` Stefan Monnier
2011-06-09  4:47     ` Leo
2011-06-09  5:14       ` Glenn Morris
2011-06-09  9:44         ` Leo
2011-06-09  9:54           ` Eli Zaretskii
2011-06-09  9:58             ` Leo
2011-06-09  9:42     ` Leo
2011-06-09 18:09       ` Glenn Morris
2011-06-10 13:59         ` Stefan Monnier
2011-06-10 16:14           ` Ted Zlatanov
2011-06-11  9:58           ` Andrew W. Nosenko
2011-06-11 18:00             ` Juri Linkov
2011-06-12 23:10               ` Andrew W. Nosenko
2011-06-18 19:35             ` Chong Yidong
2011-06-18 20:36               ` Andrew W. Nosenko
2011-09-09 11:39 ` Juri Linkov
2011-09-14 19:04   ` Juri Linkov
2011-09-17 21:28   ` Chong Yidong
2011-09-18 19:33     ` Juri Linkov
2011-09-19 18:52       ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pqn2xw82.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=8463@debbugs.gnu.org \
    --cc=dan.colascione@gmail.com \
    --cc=sdl.web@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).