Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 28 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Leo  
View profile  
 More options May 29 2011, 12:04 am
Newsgroups: gnu.emacs.bug
From: Leo <sdl....@gmail.com>
Date: Sun, 29 May 2011 12:04:36 +0800
Local: Sun, May 29 2011 12:04 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
On 2011-05-29 07:05 +0800, Chong Yidong wrote:
[snipped 11 lines]

> 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.

Yidong, many thanks for the tweaks and fixes.

Let's keep this bug open for a bit longer. I am thinking of generalising
occur-edit-mode (probably rename it to match-line-edit) so that it
covers buffers from grep and the like.

Leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew W. Nosenko  
View profile  
 More options May 30 2011, 10:04 am
Newsgroups: gnu.emacs.bug
From: "Andrew W. Nosenko" <andrew.w.nose...@gmail.com>
Date: Mon, 30 May 2011 17:04:33 +0300
Local: Mon, May 30 2011 10:04 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

On Sun, Apr 10, 2011 at 11:14, Leo <sdl....@gmail.com> wrote:
> 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.

Is there a way to _disable_ this feature?  I'm quite often edit the
*Occur* and *grep* buffers for line-up results, etc, just for easier
understanding results, but I don't want these edits to be mirrored
into original lines or files from where they are come.

--
Andrew W. Nosenko <andrew.w.nose...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Stallman  
View profile  
 More options May 30 2011, 7:10 pm
Newsgroups: gnu.emacs.bug
From: Richard Stallman <r...@gnu.org>
Date: Mon, 30 May 2011 19:10:51 -0400
Local: Mon, May 30 2011 7:10 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
    > I have extended the occur feature in Emacs to allow direct editing in
    > the *Occur* buffer by propagating the changes to the original buffers.

I am not surprised you want to disable it.
Maybe it should be disabled by default.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org, www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use free telephony http://directory.fsf.org/category/tel/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glenn Morris  
View profile  
 More options Jun 1 2011, 7:03 pm
Newsgroups: gnu.emacs.bug
From: Glenn Morris <r...@gnu.org>
Date: Wed, 01 Jun 2011 19:03:36 -0400
Local: Wed, Jun 1 2011 7:03 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

"Andrew W. Nosenko" wrote:
> Is there a way to _disable_ this feature?  I'm quite often edit the
> *Occur* and *grep* buffers for line-up results, etc, just for easier
> understanding results, but I don't want these edits to be mirrored
> into original lines or files from where they are come.

Me too.

I expect C-x C-q to toggle the read-only state of a buffer, not switch
me into some unusual mode. I suggest binding this new mode to some other
key.

Other issues with this:

1. After C-x C-q, I can no longer kill entire lines in the occur buffer.
Trying to do so reports "Text is read-only".

2. After C-x C-q, If I delete some text in the occur buffer, then use
"undo", when I reach the point at which there is no more to undo, I get:
"Wrong type argument: markerp, nil" rather than "No further undo information".

Debugger entered--Lisp error: (wrong-type-argument markerp nil)
  marker-buffer(nil)
  occur-after-change-function(1 40 39)
  primitive-undo(1 ((nil font-lock-face underline 1 . 40) (t 0 . 0)))
  undo-more(1)
  undo(nil)
  call-interactively(undo nil nil)

3. After C-x C-q, M-x revert-buffer in the occur buffer triggers an error:

apply: Wrong number of arguments: #[(regexp nlines bufs &optional buf-name)

  occur-1("*Occur*")
  apply(occur-1 "*Occur*")
  occur-revert-function(t nil)
  revert-buffer(t)
  call-interactively(revert-buffer t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

I guess the mode change clobbers occur-revert-arguments.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leo  
View profile  
 More options Jun 2 2011, 10:36 pm
Newsgroups: gnu.emacs.bug
From: Leo <sdl....@gmail.com>
Date: Fri, 03 Jun 2011 10:36:02 +0800
Local: Thurs, Jun 2 2011 10:36 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
On 2011-06-02 07:03 +0800, Glenn Morris wrote:
[snipped 50 lines]

Thank you for this feedback. I will try to address these issues when I
am back from a trip on Tuesday.

Leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Monnier  
View profile  
 More options Jun 3 2011, 11:38 am
Newsgroups: gnu.emacs.bug
From: Stefan Monnier <monn...@iro.umontreal.ca>
Date: Fri, 03 Jun 2011 12:38:07 -0300
Local: Fri, Jun 3 2011 11:38 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

> Thank you for this feedback. I will try to address these issues when I
> am back from a trip on Tuesday.

I think it makes sense to bind the occur-edit feature to some other key
than C-x C-q.
While C-x C-q is a cute binding for it, it does hide a command that is
also useful.

        Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chong Yidong  
View profile  
 More options Jun 4 2011, 5:34 pm
Newsgroups: gnu.emacs.bug
From: Chong Yidong <c...@stupidchicken.com>
Date: Sat, 04 Jun 2011 17:34:14 -0400
Local: Sat, Jun 4 2011 5:34 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

Stefan Monnier <monn...@iro.umontreal.ca> writes:
>> Thank you for this feedback. I will try to address these issues when I
>> am back from a trip on Tuesday.

> I think it makes sense to bind the occur-edit feature to some other
> key than C-x C-q.  While C-x C-q is a cute binding for it, it does
> hide a command that is also useful.

Unfortunately, C-x C-q is consistent with the command for switching to
wdired mode.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Štěpán Němec  
View profile  
 More options Jun 5 2011, 5:30 am
Newsgroups: gnu.emacs.bug
From: Štěpán Němec <step...@gmail.com>
Date: Sun, 05 Jun 2011 11:30:57 +0200
Local: Sun, Jun 5 2011 5:30 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

Chong Yidong <c...@stupidchicken.com> writes:
> Stefan Monnier <monn...@iro.umontreal.ca> writes:

>>> Thank you for this feedback. I will try to address these issues when I
>>> am back from a trip on Tuesday.

>> I think it makes sense to bind the occur-edit feature to some other
>> key than C-x C-q.  While C-x C-q is a cute binding for it, it does
>> hide a command that is also useful.

> Unfortunately, C-x C-q is consistent with the command for switching to
> wdired mode.

I don't think this argument is really valid. First of all, C-x C-q is
consistent with the command to switch read-only-ness of a buffer, and
that's apparently what at least some people still expect and are used to
in this case. It might have made sense to override it for Wdired, but
not necessarily here.

  Štěpán


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Monnier  
View profile  
 More options Jun 6 2011, 11:34 am
Newsgroups: gnu.emacs.bug
From: Stefan Monnier <monn...@iro.umontreal.ca>
Date: Mon, 06 Jun 2011 12:34:36 -0300
Local: Mon, Jun 6 2011 11:34 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

>>> Thank you for this feedback. I will try to address these issues when I
>>> am back from a trip on Tuesday.
>> I think it makes sense to bind the occur-edit feature to some other
>> key than C-x C-q.  While C-x C-q is a cute binding for it, it does
>> hide a command that is also useful.
> Unfortunately, C-x C-q is consistent with the command for switching to
> wdired mode.

Right, but wdired and occur-edit are two different things.
Editing a dired buffer in wdired does not have any other side effect
(at least not until you "commit" those changes), so its behavior is
still pretty close to toggle-read-only.  Occur-edit is somewhat
reminiscent of wdired, but does not match the behavior of
toggle-read-only quite as closely.

        Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leo  
View profile  
 More options Jun 9 2011, 12:47 am
Newsgroups: gnu.emacs.bug
From: Leo <sdl....@gmail.com>
Date: Thu, 09 Jun 2011 12:47:00 +0800
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
On 2011-06-02 07:03 +0800, Glenn Morris wrote:

> 2. After C-x C-q, If I delete some text in the occur buffer, then use
> "undo", when I reach the point at which there is no more to undo, I get:
> "Wrong type argument: markerp, nil" rather than "No further undo information".

> Debugger entered--Lisp error: (wrong-type-argument markerp nil)
>   marker-buffer(nil)
>   occur-after-change-function(1 40 39)
>   primitive-undo(1 ((nil font-lock-face underline 1 . 40) (t 0 . 0)))
>   undo-more(1)
>   undo(nil)
>   call-interactively(undo nil nil)

This can be fixed with:

diff --git a/lisp/replace.el b/lisp/replace.el
index 0578ed09..fc2db2ec 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -882,11 +882,11 @@ (define-derived-mode occur-edit-mode occur-mode "Occur-Edit"

 (defun occur-after-change-function (beg end length)
   (save-excursion
-    (goto-char beg)
     (let* ((m (get-text-property (line-beginning-position) 'occur-target))
           (buf (marker-buffer m))
           (col (current-column)))
       (when (= length 0)
+       (goto-char beg)
        ;; Apply occur-target property to inserted (e.g. yanked) text.
        (put-text-property beg end 'occur-target m)
        ;; Did we insert a newline?  Occur Edit mode can't create new

The cause:

When switching major-mode (in this case occur-edit-mode), an undo entry
containing text-property only change is added due to this line in
occur-mode:

(add-hook 'change-major-mode-hook 'font-lock-defontify nil t)

That line seems useless due to change made in revid 22063400b. If no one
objects, I intend to also remove it.

Leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glenn Morris  
View profile  
 More options Jun 9 2011, 1:14 am
Newsgroups: gnu.emacs.bug
From: Glenn Morris <r...@gnu.org>
Date: Thu, 09 Jun 2011 01:14:18 -0400
Local: Thurs, Jun 9 2011 1:14 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

Leo wrote:
> revid 22063400b.

Speaking for myself, I have no idea what that means.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leo  
View profile  
 More options Jun 9 2011, 5:42 am
Newsgroups: gnu.emacs.bug
From: Leo <sdl....@gmail.com>
Date: Thu, 09 Jun 2011 17:42:47 +0800
Local: Thurs, Jun 9 2011 5:42 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

I think maybe we should assign C-c C-c to occur-edit-mode instead.

   1. After C-x C-q, I can no longer kill entire lines in the occur buffer.
   Trying to do so reports "Text is read-only".

The text properties are now added when entering occur-edit-mode.

   2. After C-x C-q, If I delete some text in the occur buffer, then use
   "undo", when I reach the point at which there is no more to undo, I get:
   "Wrong type argument: markerp, nil" rather than "No further undo information".

   Debugger entered--Lisp error: (wrong-type-argument markerp nil)
     marker-buffer(nil)
     occur-after-change-function(1 40 39)
     primitive-undo(1 ((nil font-lock-face underline 1 . 40) (t 0 . 0)))
     undo-more(1)
     undo(nil)
     call-interactively(undo nil nil)

Fixed.

   3. After C-x C-q, M-x revert-buffer in the occur buffer triggers an error

occur-revert-arguments is killed after any major-mode change. In the
patch this has been made permanent-local.

Comments welcome. Thanks.

  occur-edit.diff
5K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leo  
View profile  
 More options Jun 9 2011, 5:44 am
Newsgroups: gnu.emacs.bug
From: Leo <sdl....@gmail.com>
Date: Thu, 09 Jun 2011 17:44:11 +0800
Local: Thurs, Jun 9 2011 5:44 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
On 2011-06-09 13:14 +0800, Glenn Morris wrote:

>> revid 22063400b.

> Speaking for myself, I have no idea what that means.

That's what I saw on the annotation buffer (from C-x v g). I was able to
view the diff there with 'd'.

Leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Jun 9 2011, 5:54 am
Newsgroups: gnu.emacs.bug
From: Eli Zaretskii <e...@gnu.org>
Date: Thu, 09 Jun 2011 12:54:49 +0300
Local: Thurs, Jun 9 2011 5:54 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

> From: Leo <sdl....@gmail.com>
> Date: Thu, 09 Jun 2011 17:44:11 +0800
> Cc: 8...@debbugs.gnu.org

> On 2011-06-09 13:14 +0800, Glenn Morris wrote:
> >> revid 22063400b.

> > Speaking for myself, I have no idea what that means.

> That's what I saw on the annotation buffer (from C-x v g). I was able to
> view the diff there with 'd'.

Git sha values are generally not useful for someone who uses bzr.  It
would be nice if people who report problems could also mention the bzr
revision or revid.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leo  
View profile  
 More options Jun 9 2011, 5:58 am
Newsgroups: gnu.emacs.bug
From: Leo <sdl....@gmail.com>
Date: Thu, 09 Jun 2011 17:58:57 +0800
Local: Thurs, Jun 9 2011 5:58 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
On 2011-06-09 17:54 +0800, Eli Zaretskii wrote:

>> That's what I saw on the annotation buffer (from C-x v g). I was able to
>> view the diff there with 'd'.

> Git sha values are generally not useful for someone who uses bzr.  It
> would be nice if people who report problems could also mention the bzr
> revision or revid.

My bad. I thought I was on the bzr repo.

Leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glenn Morris  
View profile  
 More options Jun 9 2011, 2:09 pm
Newsgroups: gnu.emacs.bug
From: Glenn Morris <r...@gnu.org>
Date: Thu, 09 Jun 2011 14:09:49 -0400
Local: Thurs, Jun 9 2011 2:09 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

Leo wrote:
> I think maybe we should assign C-c C-c to occur-edit-mode instead.

Or "e" (for edit; like in Rmail).

>    1. After C-x C-q, I can no longer kill entire lines in the occur buffer.
>    Trying to do so reports "Text is read-only".

> The text properties are now added when entering occur-edit-mode.

I don't understand if that means it's fixed. Deleting whole or even
multiple lines is an operation I might want to do in occur-edit-mode.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Monnier  
View profile  
 More options Jun 10 2011, 9:59 am
Newsgroups: gnu.emacs.bug
From: Stefan Monnier <monn...@iro.umontreal.ca>
Date: Fri, 10 Jun 2011 10:59:16 -0300
Local: Fri, Jun 10 2011 9:59 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

>> I think maybe we should assign C-c C-c to occur-edit-mode instead.

I don't like that: C-c C-c means "done" usually so it'd be OK to leave
edit mode, but not to enter it.

> Or "e" (for edit; like in Rmail).

That sounds good.

>> 1. After C-x C-q, I can no longer kill entire lines in the occur buffer.
>> Trying to do so reports "Text is read-only".
>> The text properties are now added when entering occur-edit-mode.
> I don't understand if that means it's fixed. Deleting whole or even
> multiple lines is an operation I might want to do in occur-edit-mode.

But its meaning is unclear and we get to choose what is allowed and what
is not in edit mode since it's a new mode that the user
requested explicitly.

        Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ted Zlatanov  
View profile  
 More options Jun 10 2011, 12:14 pm
Newsgroups: gnu.emacs.bug
From: Ted Zlatanov <t...@lifelogs.com>
Date: Fri, 10 Jun 2011 11:14:16 -0500
Local: Fri, Jun 10 2011 12:14 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
On Fri, 10 Jun 2011 10:59:16 -0300 Stefan Monnier <monn...@iro.umontreal.ca> wrote:

>>> 1. After C-x C-q, I can no longer kill entire lines in the occur buffer.
>>> Trying to do so reports "Text is read-only".
>>> The text properties are now added when entering occur-edit-mode.
>> I don't understand if that means it's fixed. Deleting whole or even
>> multiple lines is an operation I might want to do in occur-edit-mode.

SM> But its meaning is unclear and we get to choose what is allowed and what
SM> is not in edit mode since it's a new mode that the user
SM> requested explicitly.

I'd suggest binding `d' to "delete entire line" outside the edit mode,
so the edit mode does not need to provide it and still it's available in
a convenient way.

Ted


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew W. Nosenko  
View profile  
 More options Jun 11 2011, 5:58 am
Newsgroups: gnu.emacs.bug
From: "Andrew W. Nosenko" <andrew.w.nose...@gmail.com>
Date: Sat, 11 Jun 2011 12:58:41 +0300
Local: Sat, Jun 11 2011 5:58 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

On Fri, Jun 10, 2011 at 16:59, Stefan Monnier <monn...@iro.umontreal.ca> wrote:
>>> I think maybe we should assign C-c C-c to occur-edit-mode instead.

> I don't like that: C-c C-c means "done" usually so it'd be OK to leave
> edit mode, but not to enter it.

>> Or "e" (for edit; like in Rmail).

> That sounds good.

But not for case, when user already switched the *Occur* buffer into
read/write mode for editing the buffer itself (not the underlying
files/buffers, where occurrences come from).

The same applied for Ted's proposal for 'd' key and any other keys
that used for regular text typing.

--
Andrew W. Nosenko <andrew.w.nose...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juri Linkov  
View profile  
 More options Jun 11 2011, 2:00 pm
Newsgroups: gnu.emacs.bug
From: Juri Linkov <j...@jurta.org>
Date: Sat, 11 Jun 2011 22:00:23 +0400
Local: Sat, Jun 11 2011 2:00 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

>>> Or "e" (for edit; like in Rmail).

>> That sounds good.

> But not for case, when user already switched the *Occur* buffer into
> read/write mode for editing the buffer itself (not the underlying
> files/buffers, where occurrences come from).

Then maybe `M-e' (like in isearch mode)?

> The same applied for Ted's proposal for 'd' key and any other keys
> that used for regular text typing.

There is already `C-k' to do this.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew W. Nosenko  
View profile  
 More options Jun 12 2011, 7:10 pm
Newsgroups: gnu.emacs.bug
From: "Andrew W. Nosenko" <andrew.w.nose...@gmail.com>
Date: Mon, 13 Jun 2011 02:10:07 +0300
Local: Sun, Jun 12 2011 7:10 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

On Sat, Jun 11, 2011 at 21:00, Juri Linkov <j...@jurta.org> wrote:
>>>> Or "e" (for edit; like in Rmail).

>>> That sounds good.

>> But not for case, when user already switched the *Occur* buffer into
>> read/write mode for editing the buffer itself (not the underlying
>> files/buffers, where occurrences come from).

> Then maybe `M-e' (like in isearch mode)?

If separate apply-changes-to-underlying-buffers action to the own
function (may be even it already implemented in that way) then all
controversy will gone. -- Enter to read-write mode -- the same,
editing commands -- the same, all other behavior -- the same.  Just
because there will work one and the same code in the one and the same
mode.  Difference is only one between my usage model and usage model
of Leo (original author) -- after finishing I simple kill the occur
buffer, while Leo call the "apply-cachanges-to-underlying-buffers" for
"commit" the final results.

IMHO anyone can benefit from solving the problem in that way.

--
Andrew W. Nosenko <andrew.w.nose...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chong Yidong  
View profile  
 More options Jun 18 2011, 3:35 pm
Newsgroups: gnu.emacs.bug
From: Chong Yidong <c...@stupidchicken.com>
Date: Sat, 18 Jun 2011 15:35:41 -0400
Local: Sat, Jun 18 2011 3:35 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
"Andrew W. Nosenko" <andrew.w.nose...@gmail.com> writes:

>>> Or "e" (for edit; like in Rmail).

>> That sounds good.

> But not for case, when user already switched the *Occur* buffer into
> read/write mode for editing the buffer itself (not the underlying
> files/buffers, where occurrences come from).

That's already the case with "r" (occur-rename-buffer), "c"
(clone-buffer), and "o" (occur-mode-goto-occurrence-other-window).

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew W. Nosenko  
View profile  
 More options Jun 18 2011, 4:36 pm
Newsgroups: gnu.emacs.bug
From: "Andrew W. Nosenko" <andrew.w.nose...@gmail.com>
Date: Sat, 18 Jun 2011 23:36:49 +0300
Local: Sat, Jun 18 2011 4:36 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer

On Sat, Jun 18, 2011 at 22:35, Chong Yidong <c...@stupidchicken.com> wrote:
> "Andrew W. Nosenko" <andrew.w.nose...@gmail.com> writes:

>>>> Or "e" (for edit; like in Rmail).

>>> That sounds good.

>> But not for case, when user already switched the *Occur* buffer into
>> read/write mode for editing the buffer itself (not the underlying
>> files/buffers, where occurrences come from).

> That's already the case with "r" (occur-rename-buffer), "c"
> (clone-buffer), and "o" (occur-mode-goto-occurrence-other-window).

Yes, but: (1) these actions aren't destructive in respect to the
original data, and (2) I would to prefer to see the number of such
bindings decreasing, not increasing.

--
Andrew W. Nosenko <andrew.w.nose...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juri Linkov  
View profile  
 More options Sep 9 2011, 7:39 am
Newsgroups: gnu.emacs.bug
From: Juri Linkov <j...@jurta.org>
Date: Fri, 09 Sep 2011 14:39:23 +0300
Local: Fri, Sep 9 2011 7:39 am
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
I appreciate this new feature Occur-Edit.  It's especially powerful with
the ability of syncing replacements made by `query-replace' from the
*Occur* buffer to the source buffer.  It could provide a special
keybinding to start making replacements with the same regexp as used to run
`occur' like grep-x.el does in http://thread.gmane.org/gmane.emacs.devel/66418
and in http://thread.gmane.org/gmane.emacs.devel/108202/focus=108229

Also it has one little drawback: it adds too many undo boundaries,
so to undo changes in the source buffer, it requires too many `C-_'.
There is no such problem in all.el (from ELPA) because
`all-after-change-function' doesn't call `recenter' and `move-to-column'.

But there is a greater drawback: stealing the `C-x C-q' keybinding from
`toggle-read-only' and putting read-only properties on the *Occur* buffer
is unacceptable.  I'm used to run `flush-lines' and `keep-lines' to narrow
the search results, but can't do this anymore.  This is a regression.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juri Linkov  
View profile  
 More options Sep 14 2011, 3:04 pm
Newsgroups: gnu.emacs.bug
From: Juri Linkov <j...@jurta.org>
Date: Wed, 14 Sep 2011 22:04:30 +0300
Local: Wed, Sep 14 2011 3:04 pm
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
There is 2011-06-18 ChangeLog entry added by revno:104628 without actual
code changes:

        * replace.el (occur-mode-map): Set occur-edit-mode binding to "e".

I guess it was supposed to bind "e" to `occur-edit-mode' in `occur-mode-map'?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 28   Newer >
« Back to Discussions « Newer topic     Older topic »