unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Stefan Reichör" <stefan@xsteve.at>
Subject: Re: emacs-w3m configs
Date: Mon, 27 Jun 2005 22:38:58 +0200	[thread overview]
Message-ID: <8764vzzg9p.fsf@utanet.at> (raw)
In-Reply-To: slrndbver7.2d5.fab@node1.ddorf.de

Hi Fabian!

> Hi,
>
> I want to configure w3m inside emacs a little bit and wonder
> if anybody can provide me some sample configs, e.g. for
> coloring and keyadjustments.

Here is some stuff from my .emacs:

(setq w3m-key-binding 'info)
(setq w3m-search-default-engine "google")
(setq w3m-fill-column 100)
(setq w3m-use-cookies t)

;; Select a better coding system to display umlauts correctly
(setq w3m-coding-system 'utf-8
      w3m-file-coding-system 'utf-8
      w3m-file-name-coding-system 'utf-8
      w3m-input-coding-system 'utf-8
      w3m-output-coding-system 'utf-8
      w3m-terminal-coding-system 'utf-8)

(add-hook 'w3m-mode-hook
          '(lambda()
             (define-key w3m-mode-map [?w] 'w3m-copy-link)
             (define-key w3m-mode-map [(meta ?c)] 'w3m-print-current-url)))
;(setq w3m-async-exec nil)

(eval-after-load "w3m"
 '(progn
    (unless w3m-icon-directory
      (setq w3m-icon-directory (concat emacs-site-lisp-directory "w3m/icons")))

    ;; w3m-minor-mode-map is active when showing html articles in gnus
    ;; w3m-minor-mode-map is not active, when mm-inline-text-html-with-w3m-keymap is nil
    (define-key w3m-minor-mode-map "\C-m" 'w3m-view-url-with-external-browser)
    (define-key w3m-minor-mode-map [mouse-2] 'w3m-view-url-with-external-browser)

    (require 'w3m-search)
    (add-to-list 'w3m-search-engine-alist
                 '("emacs-wiki" "http://www.emacswiki.org/cgi-bin/wiki.pl?search=%s"))
    (add-to-list 'w3m-search-engine-alist
                 '("leo" "http://dict.leo.org/?search=%s"))

    ;; Make the previous search engine the default for the next search.
    (defadvice w3m-search (after change-default activate)
      (let ((engine (nth 1 minibuffer-history)))
        (when (assoc engine w3m-search-engine-alist)
          (setq w3m-search-default-engine engine))))))


Stefan.

  reply	other threads:[~2005-06-27 20:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-27  8:33 emacs-w3m configs Fabian Braennstroem
2005-06-27 20:38 ` Stefan Reichör [this message]
2005-06-28  6:23   ` Fabian Braennstroem
2005-06-28 19:56     ` David Hansen
2005-06-29 14:37       ` Fabian Braennstroem

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8764vzzg9p.fsf@utanet.at \
    --to=stefan@xsteve.at \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).