[Top][All Lists]

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

Re: several improvements in occur and *Occur* buffer functionality

From: Daniel Ortmann
Subject: Re: several improvements in occur and *Occur* buffer functionality
Date: 06 Jan 2002 23:24:36 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

Richard Stallman <address@hidden> writes:

>     Improvement 1:
>     Occur functionality would be highly improved if mouse2 caused the
>     selected *Occur* line to be moved to the top of the buffer.

> That seems like a strange idea to me.

Except that this behavior is exactly how M-x grep works.

>     Improvement 2:
>     Point should also be moved to the line mentioned above, i.e. the
>     selected line.  If this was done then I could leave my mouse over
>     that one line and continue to click the selection button without
>     having to move around to other lines.  It would greatly speed up
>     the use of occur functionality.

> I just added a C-o command in Occur mode which makes this easier.  So
> C-n C-o will do something like this.  Please try it.

I like it.  This is a good idea.

>     Improvement 4:
>     It would be *WONDERFUL* if a custom occur variable could be set to
>     enable grep-like behavior in occur mode.  For example, I have M-`
>     set to run "next-error".  If the custom setting is active then M-`
>     might run occur-next ... or perhaps next-error could process the
>     *Occur* buffer too?

> This is a reasonable idea, if someone wants to do it.  Probably it
> should operate on either a compilation buffer or an occur buffer,
> whichever you made most recently.

I wish I could help more.  This is beyond my current skills.

>     Improvement 5:
>     A custom occur variable setting should enable multiple *Occur*
>     buffers, where new *Occur* buffers have unique names and are
>     associated with only the buffer from which the occur command was
>     run.

> We have adopted a different general approach to this sort of issue:
> use M-x rename-uniquely to preserve a special buffer so that repeating
> the command won't overwrite it.

The difficulty is many keystrokes.  Renaming uniquely requires C-x o M-x
rename-uniquely (or a key bound to it) and then M-- M-1 C-x o.

I suppose I could do this through a hook.  But from my own experience,
it seems that the actions are general enough to warrant a custom
variable to change the behavior.

Daniel Ortmann, 2414 30 Av NW, #D, Rochester, MN 55901
address@hidden (h)   / 507.288.7732 (h)
address@hidden (w) / 507.529.3887 (w)

reply via email to

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