emacs-devel
[Top][All Lists]
Advanced

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

RE: *Occur in buf*?


From: Marshall, Simon
Subject: RE: *Occur in buf*?
Date: Thu, 25 Jul 2002 17:07:34 +0100

> I can add an `occur-rename' command (bound to `r') that would 
> rename the
> occur buffer as proposed and bind `clone-buffer' to 'c'.
> do you like this better?
> then the effect of my original patch can be accomplished by adding
> `occur-rename' to `occur-mode-hook'.

Sam, thanks for the suggestions.

I thought that this renaming might be optional, i.e., current behaviour
by default.  I was thinking in terms of a user variable rather than
adding to a hook.

But, I'm not sure how clean the Occur buffer key (to rename the *Occur*
buffer to *Occur: buf*) would actually be.  Suppose M-x occur simply
created an *Occur* buffer.  Suppose I was to rename one to *Occur: buf*
by using the key.  Then, I did another M-x occur (maybe for a different
regexp).  Should M-x occur create another *Occur* buffer?  Or reuse the
*Occur: buf* buffer?  The answer, of course, depends on what I happen to
feel like at the time.  Whichever it chooses will annoy me some of the
time.  "Damn, it went and created yet another buffer!"  Or "damn, it
overwrote my previous M-x occur buffer!".  M-x occur cannot know if I
had renamed the original *Occur* buffer so that *Occur: buf* is the
buffer I want for future M-x occur output or so that I could keep/save
that particular *Occur* buffer only.

Perhaps, in this case, it should create another *Occur* buffer.  If the
user uses the key again to rename it to *Occur: buf*, should Emacs
silently remove the old *Occur: buf* buffer?

Maybe it needs some more thought.

BTW, I prefer *Occur: buf* to *Occur:buf* though YMMV.
I find it easier to spot the original buffer name.
It follows the convention of other buffer names I've seen.



reply via email to

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