emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 65c6405: Add a command to view files in the browser


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 65c6405: Add a command to view files in the browser to dired
Date: Fri, 25 Dec 2015 19:37:11 +0000

branch: master
commit 65c64058b817f169e356ea7825d173eb4c27fcf6
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Add a command to view files in the browser to dired
    
    * lisp/dired.el (dired-mode-map): Add the `W' command
    (bug#18810).
---
 doc/emacs/dired.texi |    7 +++++++
 etc/NEWS             |    4 ++++
 lisp/dired.el        |    1 +
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index e7e4944..04cef38 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -1414,6 +1414,13 @@ names into arguments for other Emacs commands.  It also 
displays what
 it added to the kill ring, so you can use it to display the list of
 currently marked files in the echo area.
 
address@hidden W @r{(Dired)}
address@hidden browse-url-of-dired-file
+  If you have an HTML file in the file listing, it can be useful to
+view that file with a browser.  The @kbd{W}
+(@code{browse-url-of-dired-file}) command will use the standard
+configured browser to view that file.
+
 @kindex ( @r{(Dired)}
 @findex dired-hide-details-mode
 @vindex dired-hide-details-hide-symlink-targets
diff --git a/etc/NEWS b/etc/NEWS
index 76fac3e..edd8147 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -900,6 +900,10 @@ compress many marked files into a single named archive.  
The
 compression command is determined from the new
 `dired-compress-files-alist' variable.
 
++++
+*** `W' is now bound to `browse-url-of-dired-file', and is useful for
+viewing HTML files and the like.
+
 ** Obsolete packages
 
 ---
diff --git a/lisp/dired.el b/lisp/dired.el
index ab6a820..0a1b064 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1538,6 +1538,7 @@ Do so according to the former subdir alist 
OLD-SUBDIR-ALIST."
     (define-key map "u" 'dired-unmark)
     (define-key map "v" 'dired-view-file)
     (define-key map "w" 'dired-copy-filename-as-kill)
+    (define-key map "W" 'browse-url-of-dired-file)
     (define-key map "x" 'dired-do-flagged-delete)
     (define-key map "y" 'dired-show-file-type)
     (define-key map "+" 'dired-create-directory)



reply via email to

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