From: Richard M. Stallman Date: Tue, 18 Mar 2014 12:07:01 +0000 (-0400) Subject: Ensure dired-display-file displays it in other window. X-Git-Tag: emacs-24.3.90~157 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11eff3aedbbf64bfe015406dd7478afb266ab2d0;p=emacs.git Ensure dired-display-file displays it in other window. * dired.el (dired-display-file): Force use of other window. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6155d7237a..9bf92ae1b58 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7,6 +7,10 @@ (http://lists.gnu.org/archive/html/emacs-devel/2014-03/msg00488.html) (comment-start-skip): Update the docstring. +2014-03-18 Richard Stallman + + * dired.el (dired-display-file): Force use of other window. + 2014-03-18 Daniel Colascione * startup.el (tty-handle-args): Remove debug message from 2007. @@ -1600,6 +1604,7 @@ * net/shr.el (shr-tag-img): Prefer the title over the alt text (bug#16537). +>>>>>>> MERGE-SOURCE 2014-01-24 Juanma Barranquero * net/eww.el (eww-download-callback): diff --git a/lisp/dired.el b/lisp/dired.el index 162c9beb0c0..7cb22b1cc9b 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2136,7 +2136,8 @@ Otherwise, display it in another buffer." (defun dired-display-file () "In Dired, display this file or directory in another window." (interactive) - (display-buffer (find-file-noselect (dired-get-file-for-visit)))) + (display-buffer (find-file-noselect (dired-get-file-for-visit)) + t)) ;;; Functions for extracting and manipulating file names in Dired buffers. @@ -3639,6 +3640,7 @@ With a prefix argument, edit the current listing switches instead." ;; Remove a switch of the form -XtY for some X and Y. (setq dired-actual-switches (replace-match "" t t dired-actual-switches 3)))) + ;; Now, if we weren't sorting by date before, add the -t switch. ;; Some simple-minded ls implementations (eg ftp servers) only ;; allow a single option string, so try not to add " -t" if possible. @@ -3671,6 +3673,9 @@ Values matching `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp' set the minor mode accordingly, others appear literally in the mode line. With optional second arg NO-REVERT, don't refresh the listing afterwards." (dired-sort-R-check switches) + (unless (string-match "\\(\\`\\| \\)-\\([b-zA-Z]*\\)a" + switches) + (debug "No -a in Dired switches")) (setq dired-actual-switches switches) (dired-sort-set-mode-line) (or no-revert (revert-buffer)))