From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#1121: 23.0.60; `buffer-list' returns buffers in wrong order Date: Fri, 10 Oct 2008 08:36:44 -0700 Message-ID: <004701c92aee$001ec790$0200a8c0@us.oracle.com> References: <005a01c92978$28f92240$c2b22382@us.oracle.com> <00e401c92a29$8a57ded0$c2b22382@us.oracle.com> <48EF6FFB.8010806@gmx.at> Reply-To: Drew Adams , 1121@emacsbugs.donarmstrong.com 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 1223653878 18025 80.91.229.12 (10 Oct 2008 15:51:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Oct 2008 15:51:18 +0000 (UTC) Cc: 1121@emacsbugs.donarmstrong.com To: "'martin rudalics'" , "'Juanma Barranquero'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 10 17:52:11 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KoKHg-0006Rz-2N for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Oct 2008 17:52:08 +0200 Original-Received: from localhost ([127.0.0.1]:45131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KoKGb-0007U0-1P for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Oct 2008 11:51:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KoKFi-000780-67 for bug-gnu-emacs@gnu.org; Fri, 10 Oct 2008 11:50:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KoKFf-00076V-G0 for bug-gnu-emacs@gnu.org; Fri, 10 Oct 2008 11:50:05 -0400 Original-Received: from [199.232.76.173] (port=41717 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KoKFf-00076L-6K for bug-gnu-emacs@gnu.org; Fri, 10 Oct 2008 11:50:03 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39463) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KoKFe-0004px-Bu for bug-gnu-emacs@gnu.org; Fri, 10 Oct 2008 11:50:03 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9AFnwm4013910; Fri, 10 Oct 2008 08:49:58 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9AFj2OK012766; Fri, 10 Oct 2008 08:45:02 -0700 X-Loop: don@donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 10 Oct 2008 15:45:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1121 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1121-submit@emacsbugs.donarmstrong.com id=B1121.122365301711462 (code B ref 1121); Fri, 10 Oct 2008 15:45:02 +0000 Original-Received: (at 1121) by emacsbugs.donarmstrong.com; 10 Oct 2008 15:36:57 +0000 Original-Received: from agminet01.oracle.com (agminet01.oracle.com [141.146.126.228]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9AFasDF011456 for <1121@emacsbugs.donarmstrong.com>; Fri, 10 Oct 2008 08:36:55 -0700 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 m9AFaj25025933; Fri, 10 Oct 2008 10:36:45 -0500 Original-Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m9AFaiIc009685; Fri, 10 Oct 2008 09:36:45 -0600 Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 10 Oct 2008 15:36:43 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <48EF6FFB.8010806@gmx.at> thread-index: Ackq60bIU1wOeJPxTx+/HL/XIE/uJwAAbIew X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 10 Oct 2008 11:50:05 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21379 Archived-At: > > Yes, I get the same result as you do: > > > > (# # # > > # # # *Minibuf-0*> ...) > > I checked in a fix. Could you please try whether it changes anything? > Drew. Could you try the attached patch? Hi Martin; thanks for working on this. I put the following in a file foo.el: ---------8<---------------------- (defun pop-to-buffer (buffer-or-name &optional other-window norecord) (let ((buffer (if (null buffer-or-name) (other-buffer (current-buffer)) (or (get-buffer buffer-or-name) (let ((buf (get-buffer-create buffer-or-name))) (set-buffer-major-mode buf) buf)))) (old-window (selected-window)) (old-frame (selected-frame)) new-window new-frame) (set-buffer buffer) ;; REMOVED norecord <=================== (setq new-window (display-buffer buffer other-window)) (unless (eq new-window old-window) ;; `display-buffer' has chosen another window, select it. ;; ADDED norecord <=================== (select-window new-window norecord) (setq new-frame (window-frame new-window)) (unless (eq new-frame old-frame) ;; `display-buffer' has chosen another frame, make sure it gets ;; input focus and is risen. (select-frame-set-input-focus new-frame))) buffer)) (setq enable-recursive-minibuffers t) (find-file "c:/dir/buf001.txt") (find-file-other-frame "c:/dir/buf002.txt") (switch-to-buffer-other-frame "buf001.txt") ---------8<---------------------- I did emacs -Q, C-x C-f foo.el I did M-x M-: (buffer-list) in buffer buf001.txt. I got this (same as before): (# # # # # # # # # # # # ...) IOW, there was no change; the problem is as before. Did it work for you? Let me know if I'm not testing it correctly.