From: Sam Steingold <sds@gnu.org>
Cc: Miles Bader <miles@gnu.org>,
rms@gnu.org, simon.marshall@misys.com, emacs-devel@gnu.org
Subject: Re: *Occur in buf*?
Date: 30 Jul 2002 10:20:25 -0400 [thread overview]
Message-ID: <sa08z3ts3fa.fsf@glip.premonitia.com> (raw)
In-Reply-To: <5xeldn7x5s.fsf@kfs2.cua.dk>
> * In message <5xeldn7x5s.fsf@kfs2.cua.dk>
> * On the subject of "Re: *Occur in buf*?"
> * Sent on 29 Jul 2002 10:31:27 +0200
> * Honorable storm@cua.dk (Kim F. Storm) writes:
>
> Miles Bader <miles@gnu.org> writes:
>
> > On Sun, Jul 28, 2002 at 02:15:01AM +0200, Kim F. Storm wrote:
> > > 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.
E.g., have a buffer-local variable 'uniquify-buffer-name' or a similar
property of the major-mode name, which would hold a mode-specific
function which is to be run in the buffer being renamed.
E.g., for occur-mode:
(defun occur-mode-uniquify ()
(concat "*Occur: " (mapconcat #'buffer-name
(car (cddr occur-revert-arguments)) "/")
"*"))
for help-mode:
(defun help-mode-uniquify ()
(concat "*Help: "
(case (car help-xref-stack-item)
((describe-function describe-variable)
(symbol-name (cadr help-xref-stack-item)))
((describe-bindings)
(concat "keybindings in buffer "
(buffer-name (window-buffer
(car help-return-method)))))
(t "???"))
"*"))
etc.
Then `rename-buffer', `clone-buffer' &c will DTRT automatically.
--
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
When you are arguing with an idiot, your opponent is doing the same.
next prev parent reply other threads:[~2002-07-30 14:20 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 [this message]
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
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=sa08z3ts3fa.fsf@glip.premonitia.com \
--to=sds@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=rms@gnu.org \
--cc=simon.marshall@misys.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).