[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: w3m display buffer
From: |
José A . Romero L . |
Subject: |
Re: w3m display buffer |
Date: |
Wed, 08 Dec 2010 15:47:37 -0000 |
User-agent: |
G2/1.0 |
On 18 Lis, 21:10, Haines Brown <hai...@HistoricalMaterialism.info>
wrote:
(...)
> Just realized I'm in the "gnus" group, not "gnu" emacs group. I really
> must move my question about emacs and w3m elsewhere.
Yes, I guess you should.
>
> At present, in order to display a html file (I have a different emacs
> seesion for when I want to edit it), I do
>
> ! w3m filename.html
>
> There are two problems with this. Most of these html files have an eight
> or twn digit file name, and copying it is subject to error and takes a
> little time. Second, Sunrise-Commander appears as two panes, but beneat
> these panes is a scratch buffer (Lisp Interaction) mode. When I run the
> above command, the scratch buffer is divided into two panes, and the
> right one (Shell Command Output) displays the w3m rendering of the file.
Not the best solution IMHO -- that won't allow you to follow the
links.
> First, I need to get rid of the scratch buffer altogether, for I don't
> use it for this session of emas. Doing that might for the (Shell Command
> Output) to occupy the right Sunrise-Commander pane, which is fine.
Give the PopViewer extension a try, then.
> Also I have to figure out how to run w3m on the current html file with
> simply a RET, like I do with PDF. There is a browse-url.el that might
> help, but I don't know if it is compatible with Sunrise-Commander.
Maybe what you need is a "magic handler" -- something like this:
(defun my-html-handler (operation &rest args)
(let ((inhibit-file-name-handlers
(cons 'my-html-handler
(and (eq inhibit-file-name-operation operation)
inhibit-file-name-handlers)))
(inhibit-file-name-operation operation))
(when (and (eq operation 'insert-file-contents)
(fboundp 'w3m)
(y-or-n-p "Browse in w3m? "))
(kill-buffer (current-buffer))
(apply 'w3m (list (car args)))
(error "handled by w3m"))
(apply operation args)))
(add-to-list 'file-name-handler-alist '("\\.html?\\'" . my-html-
handler))
> Actually a third problem is that I don't see that I'm using
> emacs-w3m. Other than a faster loading, I don't see what it is supposed
> to do beyond whast the above command does.
(...)
Did you install one of w3m-el or w3m-el-snapshot in debian?
Cheers,
--
José A. Romero L.
escherdragon at gmail
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)