unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9018: ido-find-file vs. dedicated windows
@ 2011-07-07 14:26 Juanma Barranquero
  2011-09-11  4:29 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2011-07-07 14:26 UTC (permalink / raw)
  To: 9018; +Cc: storm

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9018: ido-find-file vs. dedicated windows
  2011-07-07 14:26 bug#9018: ido-find-file vs. dedicated windows Juanma Barranquero
@ 2011-09-11  4:29 ` Lars Magne Ingebrigtsen
  2011-09-11 10:39   ` Juanma Barranquero
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11  4:29 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 9018

Juanma Barranquero <lekktu@gmail.com> writes:

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

The window code was rewritten again, I think.  Is this still a problem?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9018: ido-find-file vs. dedicated windows
  2011-09-11  4:29 ` Lars Magne Ingebrigtsen
@ 2011-09-11 10:39   ` Juanma Barranquero
  0 siblings, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2011-09-11 10:39 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 9018-done

> The window code was rewritten again, I think.  Is this still a problem?

No, it works as expected.

Thanks,

    Juanma





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-11 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 14:26 bug#9018: ido-find-file vs. dedicated windows Juanma Barranquero
2011-09-11  4:29 ` Lars Magne Ingebrigtsen
2011-09-11 10:39   ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).