[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e7da53a116 2/2: * lisp/dired.el (dired-do-eww): New command.
From: |
Stefan Kangas |
Subject: |
master e7da53a116 2/2: * lisp/dired.el (dired-do-eww): New command. |
Date: |
Sun, 3 Jul 2022 05:44:53 -0400 (EDT) |
branch: master
commit e7da53a1169ff1796d71fb80b3a51c82821c4bbe
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
* lisp/dired.el (dired-do-eww): New command.
---
etc/NEWS | 3 +++
lisp/dired.el | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index 7403750677..af3240e504 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1061,6 +1061,9 @@ the following to your Init file:
(keymap-set dired-mode-map "N" nil)
(keymap-set dired-mode-map "I" nil))
+*** New command 'dired-do-eww'.
+This command visits the file on the current line with EWW.
+
** Elisp
*** New command 'elisp-eval-buffer' (bound to 'C-c C-e').
diff --git a/lisp/dired.el b/lisp/dired.el
index 6fe0ba0be6..2572bb79c0 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4827,6 +4827,11 @@ Interactively with prefix argument, read FILE-NAME."
(interactive nil dired-mode)
(info (dired-get-file-for-visit)))
+(defun dired-do-eww ()
+ "In Dired, visit file in EWW."
+ (interactive nil dired-mode)
+ (eww-open-file (dired-get-file-for-visit)))
+
(provide 'dired)
(run-hooks 'dired-load-hook) ; for your customizations