From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: storm@cua.dk (Kim F. Storm), Miles Bader <miles@gnu.org>,
rms@gnu.org, simon.marshall@misys.com, emacs-devel@gnu.org
Subject: Re: *Occur in buf*?
Date: Fri, 09 Aug 2002 03:32:24 -0400 [thread overview]
Message-ID: <200208090732.g797WQh11673@rum.cs.yale.edu> (raw)
In-Reply-To: sa08z3ts3fa.fsf@glip.premonitia.com
> > > > Alternatively, always name the buffer *Occur*, but provide a
> > > > occur-save-buffer command (bound to `s') which renames the buffer
> > > > to *Occur: buffer*; then the user can easily save precious occur
> > > > buffers on a needed basis.
> > > As I noted, there already is such a command -- it's called `clone-buffer'.
> > I know, but the idea was to rename the occur buffer automatically to
> > include the name of the original buffer. E.g. *Occur: xdisp.c* .
>
> TRT, IMO, is to make `generate-new-buffer-name' mode-specific.
I think this is a good idea. I'm not sure if a generic function
is necessary or if we can get away with a standard `buffer-topic'
variable (would contain the source buffer name for *Occur* buffers,
or the command name for *Help* buffers, ...) which rename-uniquely
and friends would use to generate pretty names.
I like the idea of `buffer-topic' (better name welcome) since we could
display it in ibuffer as well.
This issue of "*Help*" vs "*Help fun*" and friends is old. There are
two issues:
- how to generate pretty names when calling rename-uniquely
(or clone-buffer since Miles seems to shy away from r-u ;-) and I think
your proposal above is a good solution to this problem (although
not as easy as it seems because the current foo<N> stuff is hardcoded
at a few places).
- whether to use a single buffer or several. This one is more difficult
and will probably require customization. Ideally
(add-hook 'occur-mode-hook 'give-unique-name)
is all that's needed, but `give-unique-name' is still to be written.
Also ideally, there should be some way to set this hook "globally".
Of course this is also related to `uniquify', of course. E.g.
in PCL-CVS I use "several buffers" by default so you don't need
to M-x r-u but then you may need to kill old *cvs* buffers
after a while. By default the first buffer is called *cvs* but
is renamed by uniquify (just like dired buffers) as soon as
a second *cvs* buffer is created.
Maybe `buffer-topic' could be somewhat merged with
list-buffers-directory (used by dired and PCL-CVS to tell ibuffer
and uniquify which directory this is related to).
Stefan
next prev parent reply other threads:[~2002-08-09 7:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-25 10:05 *Occur in buf*? Marshall, Simon
2002-07-25 13:42 ` Sam Steingold
2002-07-25 14:37 ` Miles Bader
2002-07-25 15:01 ` Sam Steingold
2002-07-26 15:36 ` Richard Stallman
2002-07-26 19:53 ` Sam Steingold
2002-07-26 15:36 ` Richard Stallman
2002-07-26 17:53 ` Benjamin Rutt
2002-07-28 0:15 ` Kim F. Storm
2002-07-28 1:10 ` Miles Bader
2002-07-29 8:31 ` Kim F. Storm
2002-07-30 14:20 ` Sam Steingold
2002-07-31 1:36 ` Miles Bader
2002-07-31 5:54 ` Richard Stallman
2002-07-31 15:33 ` Sam Steingold
2002-08-09 7:32 ` Stefan Monnier [this message]
2002-08-09 7:34 ` Stefan Monnier
2002-07-29 1:42 ` Miles Bader
-- strict thread matches above, loose matches on Subject: below --
2002-07-25 16:07 Marshall, Simon
2002-07-25 18:46 ` Robert J. Chassell
2002-07-29 13:52 Marshall, Simon
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=200208090732.g797WQh11673@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=rms@gnu.org \
--cc=simon.marshall@misys.com \
--cc=storm@cua.dk \
/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).