From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.devel Subject: Re: bug#8615: bug#6954: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files Date: Sat, 16 Jul 2011 14:47:45 +0200 Message-ID: <871uxqtmry.fsf@gmail.com> References: <4E20C5DE.6070107@gmail.com> <871uxryvrq.fsf@jidanni.org> <4E20CED6.4070207@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1310820520 24934 80.91.229.12 (16 Jul 2011 12:48:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Jul 2011 12:48:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 16 14:48:36 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qi4IN-0006wT-2N for ged-emacs-devel@m.gmane.org; Sat, 16 Jul 2011 14:48:35 +0200 Original-Received: from localhost ([::1]:33705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi4IM-0002vi-6p for ged-emacs-devel@m.gmane.org; Sat, 16 Jul 2011 08:48:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi4I4-0002vW-5N for emacs-devel@gnu.org; Sat, 16 Jul 2011 08:48:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qi4I3-00034l-56 for emacs-devel@gnu.org; Sat, 16 Jul 2011 08:48:16 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:53386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi4I2-00034X-Sj for emacs-devel@gnu.org; Sat, 16 Jul 2011 08:48:15 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qi4I1-0006nB-5T for emacs-devel@gnu.org; Sat, 16 Jul 2011 14:48:13 +0200 Original-Received: from cab14-1-88-177-9-245.fbx.proxad.net ([88.177.9.245]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Jul 2011 14:48:13 +0200 Original-Received: from antoine.levitt by cab14-1-88-177-9-245.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Jul 2011 14:48:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 69 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cab14-1-88-177-9-245.fbx.proxad.net Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142043 Archived-At: --=-=-= Content-Type: text/plain 16/07/11 01:38, Lars Magne Ingebrigtsen > Christoph Scholtes writes: > >> Most other files (all?) are opened in view-mode, which binds `q' and >> z' differently. I think view-mode and special-mode need to agree on >> how to map certain keys, e.g. `q', i.e. common operations like quit or >> kill-buffer. Either by deriving view-mode from special-mode or >> matching the maps. > > It's not a view-mode issue. > > Open up a directory in dired. Select a sub-directory. Type `q'. End > up in a buffer that wasn't the one you started in. > > So `quit-window' and friends have apparently gotten a bit confused in > the last couple of days. I'm not 100% sure that's related, but the ordering in (buffer-list) has changed recently. I think there's a bug that the order of (buffer-list) is sometimes not modified when switching buffers. I attach a piece of code I use to quickly switch buffers, with debug info printing the first buffers in (buffer-list). The order of (buffer-list) is not modified when I press s-tab, but it is when I M-x switch-to-most-recent-buffer. This result in this code behaving in weird ways on recent versions of emacs. It used to be fine a few days ago (if this bug proves hard to track, I'm willing to bisect). I'll report this as a separate bug if this turns out to be unrelated. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=test.el Content-Transfer-Encoding: quoted-printable (defun switch-to-nth-buffer (n) "Switches to nth most recent buffer. Ignores erc buffers unless switch-in= clude-erc is non-nil." (catch 'tag (pp (car (buffer-list))) (pp (cadr (buffer-list))) (pp (caddr (buffer-list))) (pp (cadddr (buffer-list))) (mapcar (lambda (b) (unless (minibufferp b) (unless (string-match "^ " (buffer-name b)) (unless (equal b (current-buffer)) (if (=3D n 1) (progn (switch-to-buffer b) (throw 'tag nil)) (setq n (- n 1))))))) (buffer-list)))) (defun switch-to-most-recent-buffer () (interactive) (switch-to-nth-buffer 1)) (defun switch-to-second-most-recent-buffer () (interactive) (switch-to-nth-buffer 2)) (global-set-key (kbd "") 'switch-to-most-recent-buffer) (global-set-key (kbd "") 'switch-to-second-most-recent-buffer) --=-=-=--