[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here are some handy tips to use emacs-w3m with other Emacs facilities.
You can use emacs-w3m with the browse-url
feature. For instance,
put the following lines in your `~/.emacs' file:
(setq browse-url-browser-function 'w3m-browse-url) (global-set-key "\C-xm" 'browse-url-at-point) |
Emacs-w3m will now be invoked when you type the C-x m key on a
string which looks like a URL in any Emacs buffer. In addition, you can
use emacs-w3m to preview an HTML file that you are just editing by
typing the C-c C-v key (note that you need to use Emacs and the
html-mode
major mode to edit the HTML file).
If you'd like to use another web browser than emacs-w3m when using the C-x m key when you are in an emacs-w3m buffer (who wants to do so?), add the following advice to `~/.emacs' file:
(defadvice browse-url-at-point (around change-browse-url-browser-function activate) "Use Netscape only when it is invoked in an emacs-w3m buffer." (let ((browse-url-browser-function (if (eq major-mode 'w3m-mode) 'browse-url-netscape 'w3m-browse-url))) ad-do-it)) |
You can use emacs-w3m to browse an HTML file in a dired
buffer by
typing the C-x m key. Use the following settings in your
`~/.emacs' file:
(eval-after-load "dired" '(define-key dired-mode-map "\C-xm" 'dired-w3m-find-file)) (defun dired-w3m-find-file () (interactive) (require 'w3m) (let ((file (dired-get-filename))) (if (y-or-n-p (format "Use emacs-w3m to browse %s? " (file-name-nondirectory file))) (w3m-find-file file)))) |
You can see the newest diary using emacs-w3m and the hyper nikki system.
Put the following lines in your `~/.emacs' file and type the
C-c C-b key in an hnf-mode
buffer:
(defun w3m-hnf-browse-url-w3m (url &optional new-window) (interactive (browse-url-interactive-arg "URL: ")) (save-selected-window (pop-to-buffer (get-buffer-create "*w3m*")) (w3m-browse-url url new-window))) (setq hnf-browse-url-browser-function #'w3m-hnf-browse-url-w3m) |
You've mistaken the entrance if you are a Gnus user and this section is the first page you read in this Info. See 6. Hooking emacs-w3m into mail/newsreaders first.
By default, Gnus will not apply the treatment variables, for instance
gnus-treat-strip-banner
, to `text/html' parts. To have them
applied to `text/html' parts automatically, there are two ways to
do that:
;; Apply all the treatments to text/html parts. (eval-after-load "gnus-art" '(add-to-list 'gnus-article-treat-types "text/html")) |
;; Apply a certain treatment to text/html parts. (setq gnus-treat-strip-banner '(or t (typep "text/html"))) |
Also See section `Customizing Articles' in The Gnus Manual, for details.
In addition, the experimental code below is used to display `multipart/related' pictures. The place might be something wrong.
(eval-after-load "gnus-art" '(or (assoc "multipart/related" gnus-mime-multipart-functions) (setq gnus-mime-multipart-functions (cons (cons "multipart/related" (byte-compile (lambda (handle) (gnus-mime-display-mixed (cdr handle))))) gnus-mime-multipart-functions)))) |
You can use emacs-w3m to preview an HTML file that just you are editing
with the yahtml-mode
. Here is an example:
(defadvice yahtml-browse-html (around w3m-yahtml-browse-html activate compile) (w3m-goto-url (ad-get-arg 0) t)) |
You can use JIS X 0213 character set in Emacs using the jis0213
module which is bundled in the Mule-UCS package. Although the
decode-char
function in Emacs 21 and later is overridden by
mucs
(jis0213
loads mucs
) and it stops working
properly for the ucs
coded character set, it has been reported
that also to load the unicode
module seems to solve the problem.
The reason has not been made clear yet. Here is an example for the
`~/.emacs' file:
(require 'unicode) (require 'un-define) (require 'jisx0213) |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |