From: "Drew Adams" <drew.adams@oracle.com>
To: "'Emacs-Devel'" <emacs-devel@gnu.org>
Cc: 'Stefan Monnier' <monnier@iro.umontreal.ca>
Subject: pop-tag-mark - shouldn't it use pop-to-buffer instead of switch-to-buffer?
Date: Tue, 12 Feb 2008 23:18:02 -0800 [thread overview]
Message-ID: <001c01c86e10$923ecb20$f341908d@us.oracle.com> (raw)
In-Reply-To: <jwvmys4lvye.fsf-monnier+emacs@gnu.org>
From another thread:
> From: Stefan Monnier Sent: Thursday, December 20, 2007 4:43 PM
> Subject: Re: error "Cannot switch buffers in (minibuffer | a
> dedicated) window"
>
> > Am I missing something, or is this a gratuitous error that just gets
> > in the way?
>
> It's just a way to say "please get all authors to stop using
> switch-to-buffer from their elisp package and replace them
> with calls to pop-to-buffer".
A propos, shouldn't `pop-tag-mark' use `pop-to-buffer' here, instead of
`switch-to-buffer'? Otherwise, if you already have a window/frame open to
the marker's buffer, it doesn't reuse it.
(defun pop-tag-mark ()
"Pop back to where \\[find-tag] was last invoked.
This is distinct from invoking \\[find-tag] with a negative argument
since that pops a stack of markers at which tags were found, not from
where they were found."
(interactive)
(if (ring-empty-p find-tag-marker-ring)
(error "No previous locations for find-tag invocation"))
(let ((marker (ring-remove find-tag-marker-ring 0)))
(switch-to-buffer (or (marker-buffer marker)
(error "The marked buffer has been deleted")))
(goto-char (marker-position marker))
(set-marker marker nil nil)))
prev parent reply other threads:[~2008-02-13 7:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 22:27 error "Cannot switch buffers in (minibuffer | a dedicated) window" Drew Adams
2007-12-18 15:56 ` Richard Stallman
2007-12-18 16:29 ` Drew Adams
2007-12-19 10:12 ` Richard Stallman
2007-12-21 0:43 ` Stefan Monnier
2007-12-21 5:29 ` error "Cannot switch buffers in (minibuffer | a dedicated)window" Drew Adams
2008-02-13 7:18 ` Drew Adams [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001c01c86e10$923ecb20$f341908d@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.