Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: "José A. Romero L." <escherdragon@gmail.com>
To: info-gnus-english@gnu.org
Subject: Re: w3m display buffer
Date: Thu, 18 Nov 2010 15:46:06 -0800 (PST)	[thread overview]
Message-ID: <b020ffb9-ce76-4956-9159-ab463d578a25@r29g2000yqj.googlegroups.com> (raw)
In-Reply-To: <87mxp6l7ej.fsf@engels.HistoricalMaterialism.info>

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)

      reply	other threads:[~2010-11-18 23:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17 18:15 Haines Brown
2010-11-18  0:46 ` José A. Romero L.
2010-11-18 20:10   ` Haines Brown
2010-11-18 23:46     ` José A. Romero L. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b020ffb9-ce76-4956-9159-ab463d578a25@r29g2000yqj.googlegroups.com \
    --to=escherdragon@gmail.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).