From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel 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 Message-ID: <001c01c86e10$923ecb20$f341908d@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1202887139 8352 80.91.229.12 (13 Feb 2008 07:18:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2008 07:18:59 +0000 (UTC) Cc: 'Stefan Monnier' To: "'Emacs-Devel'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 13 08:19:23 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JPBtl-0006DG-Au for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2008 08:19:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPBtH-0003I0-JV for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2008 02:18:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPBtD-0003Hv-HP for emacs-devel@gnu.org; Wed, 13 Feb 2008 02:18:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPBtB-0003Hg-8T for emacs-devel@gnu.org; Wed, 13 Feb 2008 02:18:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPBtA-0003Hd-VZ for emacs-devel@gnu.org; Wed, 13 Feb 2008 02:18:41 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JPBtB-0007IV-6Z for emacs-devel@gnu.org; Wed, 13 Feb 2008 02:18:41 -0500 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m1D7Icm9026252; Wed, 13 Feb 2008 01:18:38 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m1D19iFw025663; Wed, 13 Feb 2008 00:18:37 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3573081061202887082; Tue, 12 Feb 2008 23:18:02 -0800 Original-Received: from dradamslap1 (/141.144.65.243) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 12 Feb 2008 23:18:02 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AchuEJF2K4XQMztoSy+2IqhSHHb7ng== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88936 Archived-At: >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)))