* Opening html-File in Dired with w3m
@ 2004-07-20 8:56 Nicolas Neuss
2004-07-20 15:17 ` Marco Parrone
2004-07-27 8:45 ` Tim X
0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Neuss @ 2004-07-20 8:56 UTC (permalink / raw)
Hello!
Is it possible to configure Dired such that it uses w3m when opening a file
with html-extension? (Or info when opening a .info-File, etc?)
Thanks, Nicolas.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Opening html-File in Dired with w3m
2004-07-20 8:56 Opening html-File in Dired with w3m Nicolas Neuss
@ 2004-07-20 15:17 ` Marco Parrone
2004-07-27 8:45 ` Tim X
1 sibling, 0 replies; 3+ messages in thread
From: Marco Parrone @ 2004-07-20 15:17 UTC (permalink / raw)
Nicolas Neuss on 20 Jul 2004 10:56:38 +0200 writes:
> Hello!
>
> Is it possible to configure Dired such that it uses w3m when opening a file
> with html-extension? (Or info when opening a .info-File, etc?)
>
> Thanks, Nicolas.
Under X, a way may be to put the following code into your ~/.emacs,
restart emacs, then, when in dired mode, move the point on the file to
open, type `C-c x', insert the name of the command to run, and hit RET
(for example `C-c x w3m RET'). Or, instead to move the point on the
file to open, mark more files (tested with `C-c x emacs RET').
(defun dired-do-xterm-command (ARG)
(interactive "P")
(let ((files (list)))
(dired-map-over-marks
(setq files (cons (dired-get-filename) files)) ARG t)
(setq files
(apply (function concat)
(mapcar (lambda (a) (concat " " (shell-quote-argument a)))
files)))
(let ((command
(read-from-minibuffer (concat "xterm cmd on" files ": "))))
(shell-command (concat "xterm -e " command " " files " &")
(concat "*(xterm -e " command " " files ")*")))))
(defun .set-dired-xterm-keybinding ()
(define-key dired-mode-map [(control ?c) ?x] 'dired-do-xterm-command))
(add-hook 'dired-load-hook '.set-dired-xterm-keybinding)
--
Marco Parrone <marc0@autistici.org> [0x45070AD6]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Opening html-File in Dired with w3m
2004-07-20 8:56 Opening html-File in Dired with w3m Nicolas Neuss
2004-07-20 15:17 ` Marco Parrone
@ 2004-07-27 8:45 ` Tim X
1 sibling, 0 replies; 3+ messages in thread
From: Tim X @ 2004-07-27 8:45 UTC (permalink / raw)
>>>>> "Nicolas" == Nicolas Neuss <Nicolas.Neuss@iwr.uni-heidelberg.de> writes:
Nicolas> Hello! Is it possible to configure Dired such that it uses
Nicolas> w3m when opening a file with html-extension? (Or info when
Nicolas> opening a .info-File, etc?)
Nicolas> Thanks, Nicolas.
I use the browse-url package for this. Here is the section from my
.emacs (I "stole" this from a post to this group sometime ago - can't
remember who from :-(
(defun w3m-browse-url-other-window (url &optional arg)
"Browse URL with w3m, use other window."
(interactive
(browse-url-interactive-arg "w3m URL: "))
(when (stringp url)
(let ((buffer (get-buffer "*w3m*")))
(switch-to-buffer-other-window (if buffer buffer (current-buffer)))
(w3m-goto-url url))))
(global-set-key "\C-c\C-z." 'browse-url-at-point)
(global-set-key "\C-c\C-zb" 'browse-url-of-buffer)
(global-set-key "\C-c\C-zr" 'browse-url-of-region)
(global-set-key "\C-c\C-zu" 'browse-url)
(global-set-key "\C-c\C-zv" 'browse-url-of-file)
(add-hook 'dired-mode-hook
(lambda ()
(local-set-key "\C-c\C-zf" 'browse-url-of-dired-file)))
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-27 8:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-20 8:56 Opening html-File in Dired with w3m Nicolas Neuss
2004-07-20 15:17 ` Marco Parrone
2004-07-27 8:45 ` Tim X
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.