all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: 9018@debbugs.gnu.org
Cc: storm@cua.dk
Subject: bug#9018: ido-find-file vs. dedicated windows
Date: Thu, 7 Jul 2011 16:26:55 +0200	[thread overview]
Message-ID: <CAAeL0STbWuUC44bQHFbj6AN6395RS8VRa2YSQA20svhiEZeVmg@mail.gmail.com> (raw)

Version: 24.0.50
Package: emacs
X-Debbugs-CC: storm@cua.dk


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 <monnier@iro.umontreal.ca>
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	other threads:[~2011-07-07 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 14:26 Juanma Barranquero [this message]
2011-09-11  4:29 ` bug#9018: ido-find-file vs. dedicated windows Lars Magne Ingebrigtsen
2011-09-11 10:39   ` Juanma Barranquero

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=CAAeL0STbWuUC44bQHFbj6AN6395RS8VRa2YSQA20svhiEZeVmg@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=9018@debbugs.gnu.org \
    --cc=storm@cua.dk \
    /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.