bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9018: ido-find-file vs. dedicated windows


From: Juanma Barranquero
Subject: bug#9018: ido-find-file vs. dedicated windows
Date: Thu, 7 Jul 2011 16:26:55 +0200

Version: 24.0.50
Package: emacs
X-Debbugs-CC: address@hidden


Recently, `find-file' was changed to use `pop-to-buffer-same-window'
instead of `switch-to-buffer':


revno: 104946
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8911
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2011-07-04 12:08:16 -0400
message:
  * lisp/files.el (find-file): Use pop-to-buffer-same-window.
  [...]

=== modified file 'lisp/files.el'
--- lisp/files.el       2011-07-03 01:48:07 +0000
+++ lisp/files.el       2011-07-04 16:08:16 +0000
@@ -1341,8 +1341,8 @@
                         (confirm-nonexistent-file-or-buffer)))
   (let ((value (find-file-noselect filename nil nil wildcards)))
     (if (listp value)
-       (mapcar 'switch-to-buffer (nreverse value))
-      (switch-to-buffer value))))
+       (mapcar #'pop-to-buffer-same-window (nreverse value))
+      (pop-to-buffer-same-window value))))

 (defun find-file-other-window (filename &optional wildcards)
   "Edit file FILENAME, in another window.



which has the (intended) effect that

M-: (set-window-dedicated-p (selected-window) t) <RET>
C-x C-f some-file <RET>

pops another window instead of failing with "Cannot switch buffers in
a dedicated window".

However, the ido replacement, `ido-find-file', does not call
`find-file' but `find-file-noselect', so it fails.

    Juanma





reply via email to

[Prev in Thread] Current Thread [Next in Thread]