Giter Club home page Giter Club logo

emacs-w3m's Introduction

       This package contains emacs-w3m, an Emacs interface to w3m

1. Introduction

   w3m is a pager with WWW capability, developed by Akinori ITO.
   Although it is a pager, it can be used as a text-mode WWW browser.
   Visit the official w3m page for details:

       http://w3m.sourceforge.net/

   (See the next section `Requirements' for the place where you can get
    the latest w3m source.)

   Emacs-w3m is a simple Emacs interface to w3m.  Its official web page
   is available at:

        http://emacs-w3m.namazu.org/

   You can find more detailed version of the following explanations
   in the form of HTML'ized info:

        http://emacs-w3m.namazu.org/info/

   (But the info has not been being maintained for a long period,
    so some descriptions might have probably been obsolescent and
    the new features are not necessarily all described, sorry.)


2. Requirements

   Check whether your system meets the following requirements before
   installing emacs-w3m.

   Now emacs-w3m will work with Emacs 28, 29, and hopefully 30 (not
   released yet, though).

   Emacs-w3m requires the latest version of w3m (version 0.3.1 and
   later).  Since this program is much sensitive to the version of w3m,
   you should confirm it with `w3m --version' if you already have w3m
   installed.  To get the latest source of w3m, visit this page:

       https://salsa.debian.org/debian/w3m

   If you want to use the shimbun library that is included in the
   emacs-w3m distribution, you have to install the APEL and the FLIM
   packages in order.  To get those latest sources, visit this page:

       https://github.com/wanderlust/


3. Installation

3.1. Installing emacs-w3m on UNIX-like systems

     At the first, run the `configure' script.

         % ./configure

     If you can't find the `configure' script, rus the `autoconf'
     command. It create this script.

         % autoconf

     If you've installed APEL, FLIM or something in non-standard
     directories other than the default `load-path', you must specify
     them using the --with-addpath option as follows (this is the case
     where you want to use the shimbun library):

         % ./configure --with-addpath=/opt/share/apel:/opt/share/flim

     Next, execute the following commands to install emacs-w3m to an
     appropriate directory.

         % make
         % make install

     You may as well install icon image files, too.  To do this:

         % make install-icons
     or
         % make install-icons30

     The latter will install the slightly larger icons with characters.

     The info files will also be installed by `make install'.

3.2. Installing on non-UNIX-like systems

     If you cannot execute the `configure' script on your system, or if
     no `make' command is available, execute the following command:

         % emacs -batch -q -no-site-file -l w3mhack.el NONE -f w3mhack-nonunix-install

     If APEL, FLIM (or any other library) aren't installed in the
     ordinary places, the installer will leave them out.  In such a
     case, it is necessary to tell those places to the installer as
     shown below:

         % emacs -batch -q -no-site-file -l w3mhack.el //c/share/apel://c/share/flim -f w3mhack-nonunix-install


4. Configuration

   When you want to twiddle some options referenced by emacs-w3m, use
   the ~/.emacs-w3m.el file (its base name is the default value of the
   `w3m-init-file' variable, the name ~/.emacs-w3m is also allowed).
   That is similar to Emacs' init file (~/.emacs, etc.) but is read
   when emacs-w3m starts.  Note that there are a few options, e.g.,
   `w3m-command', that should be put into Emacs' init file, rather than
   the ~/.emacs-w3m.el file.


4.1. Essential Configuration

     Put this line into your Emacs' init file (i.e., ~/.emacs, etc.):

         (require 'w3m-load)

4.2. mime-w3m.el

     In order to let SEMI MUAs, such as Wanderlust, render text/html
     parts in messages using emacs-w3m, put the following line in your
     Emacs' init file (i.e., ~/.emacs, etc):

         (require 'mime-w3m)

4.3. Proxy Gateway

     There are some ways to do this, one is to set the "http_proxy"
     environment variable globally in the shell something like:

         export http_proxy='http://proxy.hogege.com:8000/'

     Another way is to customize the `w3m-command-arguments' variable
     so to have the option:

         '("-o" "http_proxy=http://PROXY_SERVER_NAME:PORT/")

     This can be done in your ~/.emacs-w3m.el file as shown below:

     (setq w3m-command-arguments
           (nconc w3m-command-arguments
                  '("-o" "http_proxy=http://proxy.hogege.com:8000/")))

     To specify `no-proxy' hosts, that shouldn't be connected to with
     proxy gateways, you can set the "no_proxy" environment variable
     with the comma separated host names, or set the
     `w3m-no-proxy-domains' variable with a list of domain names (not
     host names) as follows:

         (setq w3m-no-proxy-domains '("local.com" "neighbor.com"))

     See also the documentation for the `w3m-command-arguments-alist'
     variable to use regexps to specify the `no-proxy' hosts.


5. Contact the emacs-w3m community

   To contact the emacs-w3m community for reporting bugs, contributing
   improvements, making a suggestion or asking us for help, send a mail
   to the open list <[email protected]>.  You can also send a bug
   report using the `report-emacs-w3m-bug' command or the `C-c C-b' key
   if you have set the `mail-user-agent' variable so to work properly.


6. Acknowledgments

   w3m, that is an essential part of this package, was written by
   Akinori ITO.  We'd like to address our thanks to him for his nice
   work.


Local Variables:
mode: indented-text
mode: outline-minor
outline-regexp: "[0-9]\\.[0-9]\\.[0-9]\\.\\|[0-9]\\.[0-9]\\.\\|[0-9]\\."
fill-column: 72
End:

emacs-w3m's People

Contributors

boruch-baum avatar clefru avatar equwal avatar eush77 avatar fgunbin avatar hideyuki-shirai avatar ikazuhiro avatar jaor avatar linearcombination avatar mgi avatar michael-heerdegen avatar naota avatar tats avatar thierryvolpiatto avatar tsuchm avatar tsuyoshicho avatar vjorlikowski avatar vsedach avatar yamaoka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

emacs-w3m's Issues

bookmark title bug

Function w3m-bookmark-add-all-urls in file w3m-bookmark.el ~line 368
sets a variable title, but then doesn't use it. It should be used by
the call to the nearby function w3m-bookmark-write-file. There's no
need to use it in the nearby w3m-message since w3m-current-url is
already being displayed there.

I discovered this when working on PR #56, which needs to make other
changes to that function, so the fix is there. If you plan on merging
that PR, then when you do this issue can be closed; otherwise do you
want a separate PR just for this?

Review of Travis-CI configuration is required

I have just added Travis-CI configuration to do automatic syntax check for every pull requests. However, I wonder whether I successfully configured it as the free plan for open source projects or not. If you have an information to check it, please let me know.

autoconf command does not exist

When installing through package mode, it is prompted that the Autoconf command does not exist。

 Message: error
        Data: (error . ":pre-build command error in \"emacs-w3m\" recipe in command \"(\\\"autoconf\\\")\"")
        Backtrace:
          (signal error (":pre-build command error in \"emacs-w3m\" recipe in comman
          (error ":pre-build command error in %S recipe in command %S" "emacs-w3m" "
          (condition-case err (if (cl-every #'stringp command) (if (apply #'straight
          (let ((command (car --dolist-tail--))) (condition-case err (if (cl-every #
          (while --dolist-tail-- (let ((command (car --dolist-tail--))) (condition-c
          (let ((--dolist-tail-- (if (cl-every #'listp commands) commands (list comm
          (let ((default-directory repo) (commanderror nil)) (let ((--dolist-tail--
          (if repo (let ((default-directory repo) (commanderror nil)) (let ((--dolis
          (let* ((commands (and t (if post post-build pre-build))) (repo (and comman
          (let* ((--cl-rest-- recipe) (pre-build (car (cdr (plist-member --cl-rest--
      ! Extended backtrace logged to ~/.emacs.d/.local/doom.error.log

Missing styles in w3m-display-mode

Missing styles in w3m-display-mode

To say "This variable is now DEPRECATED!" (see w3m.el) there are missing two kinds of the styles should be added to w3m-display-mode.   They would be named to something like windows and tabbed-windows corresponding to:

                      windows    tabbed-windows
       w3m-use-tab      nil           t
w3m-pop-up-windows      t             t
 w3m-pop-up-frames      nil           nil

Where t for w3m-pop-up-windows in those styles is meant to launch or raise the emacs-w3m buffer in another window of the current frame (if nil, open the buffer in the selected window).   Just before bringing up this issue I've fixed how w3m-pop-up-windows to control the behavior, that's a long standing bug!

Ideas for making search engines more powerful

I've been playing with the search engine features of emacs-w3m recently and I'm really enjoying them, but I have some ideas on how they could be improved. Some of these are related, and so rather than open many separate, interdependant issues, this is a dump of my thoughts, which can be hopefully be teased out into something more definite based on the following discussion.

I define quite a few of my own search engines, and for all of them I also define an abbreviation. This means modifying both w3m-search-engine-list and w3m-uri-replace-alist. The format for the first list is not obvious. I think it would be better to have a single method for defining a search engine, which could work something like this:

(defengine DuckDuckgo
	   :action "https://lite.duckduckgo.com/%s"
	   :coding utf-8
           :description "The search engine that respects your privacy"
	   :abbreviation "ddg")

Only the :action field would be mandatory. It could also be possible to specify a different :name field, providing a string to display search engine with, though this would default to the string of the symbol used in the def (DuckDuckgo). The :abbreviation would be automatically handled for use in w3m-uri-replace-alist. It might even be possible to define a global function which generates a default abbreviation from search engine (e.g. the shortest unique prefix of its name). Using a more structured approach to defining engines in the first place would make more complex stuff like this easier I think.

Personally, I would also find it useful to have a :description field, separate from the name of the engine. This would be a sort of docstring for the search engine, expected to span multiple lines and maybe include minimal markup (like actual docstrings). This would be displayed in a function w3m-describe-search-engine. It might be useful to have a similar describe-search-engines (plural), which lists all currently registered engines and gives some minimal information (a bit like describe-repeat-maps). Not everyone might find this particularly useful though, so it could be optional, like docstrings in defun declarations.

Finally, I think it would be great to include some support for history and/or suggestions in search engines. There are lots of ways this could be done: a good start might be being able to specify a different history file (:history-file) for each engine, and maybe the format history is read and written in. Then there could be a few different functions available for generating lists of suggestions (specify which one the engine uses under ``:suggestion-functio)`, some of which could use the history. This would allow for things like frecency suggestions to be implemented.

Most of the optional fields would have global defaults which could be set in customizable variables, so that the behaviour of all engines could be changed without having to set them all manually (e.g. if you wanted to keep all of your history in one file, or only use search engines with a certain, non-standard coding (!?)).

I have some ideas about implementing most of this, and would be happy to take it on as a project to improve my elisp a bit.

How to properly set w3m-display-mode?

Hello, I am using Spacemacs with this layer:

https://github.com/venmos/w3m-layer

I'm confused as to how to properly set w3m-display-mode at startup so it affects the first web page visited. Setting the variable does not do anything, and instead I need to M-x w3m-display-mode and select the mode before it takes effect.

I tried something like the following in my config:

(setq w3m-display-mode "Plain")

Reformat after each text zoom

$ gunzip f.htm.gz
$ emacs -q --eval '(w3m "f.htm")'
c-x c-+ c-+ ...

The table should be reformatted.
Instead words start going off the screen.

R (w3m-reload-this-page) doesn't help.

emacs-w3m-version "1.4.632"

w3m-redisplay-pages-automatically hook interferes with exwm

Right now, w3m-mode unconditionally adds w3m-redisplay-pages-automatically to window-configuration-hook (incidentally, doing this every time w3m-mode is called seems redundant, and makes harder than it should removing the hook). It would be nice if this were configurable: there're circumstances where i don't want w3m to redisplay (or try to) behind my back, and the logic of that hook is a bit convoluted. As an example, exwm is picky in how it handles focus and layouts, and that w3m hook interferes with the final focus of windows; while that's not necessarily w3m's fault (exwm layout handler should be most robust), it be nice to be able to customize out this interference :)

Thanks!

w3m-form-submit behavior for setting POINT

When using function w3m-form-submit, POINT is restored to the same location, at the end of the operation. This usually ends up being desirable because usually the web page that is returned by the HTTP request is the same as before. A notable example of an exception is the popular Duckduckgo search engine. That website uses form submissions to navigate to previous and next pages of a web search, so if the user presses those form button widgets at the bottom of the search pages, POINT will be set to that value in the new search page, which could be anywhere in the middle or end of the new page, but certainly not at the top of the new page, which is the desired behavior.

Duckduckgo is my default search engine, but I never noticed it because the first page of search results I receive has 31 entries, which has always been sufficient for me. I came across this behavior when applying intelligent scrolling / page navigation to that website.

Programmatically going to POINT-MIN after submitting the form isn't sufficient because the call is asynchronous. Maybe it's necessary to modify the form vector itself?

MELPA version w3m-20190709.548 - another break

GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-09-20 on lcy01-07, modified by Debian

Ubuntu 16.04

$ emacs -nw --debug-init

Debugger entered--Lisp error: (error "Unknown upattern `(quote (nil nil nil))'")
  signal(error ("Unknown upattern `(quote (nil nil nil))'"))
  error("Unknown upattern `%s'" (quote (nil nil nil)))
  pcase--u1(((match val quote (nil nil nil))) #[257 "\302\301\242>\204^N^@\301\302\301\242B\240\210\303\302A!\203^Y^@\304\202^Z^@\300\302A^B\"\207" [#[514 "\211C^B\301\242\236\211\204 ^@\302^D$
  pcase--u((((match val quote (nil nil nil)) #[257 "\302\301\242>\204^N^@\301\302\301\242B\240\210\303\302A!\203^Y^@\304\202^Z^@\300\302A^B\"\207" [#[514 "\211C^B\301\242\236\211\204 ^@\302^D^$
  pcase--expand((list (and w3m-use-tab t) (and w3m-pop-up-windows t) (and w3m-pop-up-frames t)) (((quote (nil nil nil)) (quote plain)) ((quote (t nil nil)) (quote tabbed)) ((quote (nil t nil))$
  #[385 "\301^A@^H\"^B^A@\232\203 ^@^A^A\211A@\262^A\232\203 ^@\211\211AA\262^A\202:^@\211\203(^@\302\303!\210\304^C^C\"\305^C@^E^E^DBB^H#\210\211\262^A\207" [pcase--memoize gethash message "p$
  (pcase (list (and w3m-use-tab t) (and w3m-pop-up-windows t) (and w3m-pop-up-frames t)) ((quote (nil nil nil)) (quote plain)) ((quote (t nil nil)) (quote tabbed)) ((quote (nil t nil)) (quote $
  eval((pcase (list (and w3m-use-tab t) (and w3m-pop-up-windows t) (and w3m-pop-up-frames t)) ((quote (nil nil nil)) (quote plain)) ((quote (t nil nil)) (quote tabbed)) ((quote (nil t nil)) (q$
  byte-code("\303^H\304N\211^Y\203^N^@  @\202^O^@\n)!\207" [symbol sv exp eval saved-value] 4)
  custom-initialize-reset(w3m-display-mode (pcase (list (and w3m-use-tab t) (and w3m-pop-up-windows t) (and w3m-pop-up-frames t)) ((quote (nil nil nil)) (quote plain)) ((quote (t nil nil)) (qu$
  custom-declare-variable(w3m-display-mode (pcase (list (and w3m-use-tab t) (and w3m-pop-up-windows t) (and w3m-pop-up-frames t)) ((quote (nil nil nil)) (quote plain)) ((quote (t nil nil)) (qu$
  eval-buffer(#<buffer  *load*-279234> nil "/home/user/.emacs.d/elpa/w3m-20190709.548/w3m.el" nil t)  ; Reading at buffer position 429944
  load-with-code-conversion("/home/user/.emacs.d/elpa/w3m-20190709.548/w3m.el" "/home/user/.emacs.d/elpa/w3m-20190709.548/w3m.el" nil t)
  require(w3m)
  eval-buffer(#<buffer  *load*> nil "/home/user/.emacs" nil t)  ; Reading at buffer position 21760
  load-with-code-conversion("/home/user/.emacs" "/home/user/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "^H\205\262^@     \306=\203^Q^@\307^H\310Q\202;^@ \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\202;^@\313\307\314\317#\203:^@\320\nB^R\321\202;^@\316\322^S\323^A\322\211#\$
  command-line()
  normal-top-level()

Wrong usage of aref in `w3m-form-p`

Even if this function seems to be used nowhere in w3m, it is useful (I use it), aref is called with INDEX as first arg instead of ARRAY, here correct usage:

(defun w3m-form-p (obj)
  "Return t if OBJ is a form object."
  (and (vectorp obj)
       (symbolp (aref obj 0))
       (eq (aref obj 0) 'w3m-form-object)))

wiki is closed for editing

It may be that the wiki is set "Restrict editing to collaborators only", and so if I'm not listed as a collaborator on the "collaborators" tab of the "settings" page, I won't be able to contribute to the wiki.

Or it could be some other reason ...

My suggestion is to allow anyone to edit the wiki (ie. no restrictions). I don't see the privilege being abused on other wikis on github or on emacswiki ; any occassional abuse ought to be easy to revert; and if abuse does turn out to be a real issue, the restriction can always be re-imposed.

emacs-w3m cannot render frame

there's a problem i get recently.

emacs28.1 and latest emacs-w3m from here.

i test html with frame using w3m in terminal:

$ w3m -F index.html

the html code:

<html>
  <title>frame</title>
  <frameset cols="33%,34%,33%">
    <frame src="./page/a.html">
    <frame src="./page/b.html">
    <frame src="./page/c.html">
  </frameset>
</html>

and it renders frame very well.

but when i use emacs-w3m to view this html,it gives no frame.

my emacs-w3m config elisp:

(require 'w3m)

(setq w3m-home-page "~/index.html")
(setq w3m-make-new-session t)
(setq w3m-cookie-accept-bad-cookies t)
(setq w3m-fill-column 44)
(setq w3m-keep-arrived-urls 50000)
(setq w3m-keep-cache-size 1000)
(setq w3m-edit-function (quote find-file-other-
window))
(setq w3m-session-automatic-save t)
(setq w3m-session-deleted-save nil)
(setq w3m-use-tab t)
(setq w3m-tab-width 8)
(setq w3m-use-tab-menubar nil)
(setq w3m-default-display-inline-images nil)
(setq w3m-redirect-with-get t)
(setq w3m-toggle-inline-images-permanently t)
(setq w3m-use-filter t)
(setq w3m-fb-mode t)
(setq w3m-session-load-crashed-sessions t)
(w3m-fb-mode 1)
(setq w3m-command-arguments '("-cookie" "-F"))

can someone help me please?

Specify http_proxy and https_proxy at the same time.

On Ubuntu 20.04, I try to use emacs-w3m within the self compiled git master version of Emacs. The emacs-w3m document told the following for proxy setting:

     (setq w3m-command-arguments
           (nconc w3m-command-arguments
                  '("-o" "http_proxy=http://proxy.hogege.com:8000/")))

But I want to set the http_proxy and https_proxy variables at the same time and tried with the following settings in ~/.emacs-w3m.el:

     (setq w3m-command-arguments
           (nconc w3m-command-arguments
                  '(
                  ("-o" "http_proxy=http://127.0.0.1:8000/")
                  ("-o" "https_proxy=http://127.0.0.1:8000/")
                  )
                  ))

It seems that the above settings doesn't work at all. Any hints will be highly appreciated.

Regards,
HY

Emacs 29.1 warnings, seen in *Async-native-compile-log* buffer

Examples:

■ Warning (comp): w3m-search.el:221:53: Warning: ‘point-at-bol’ is an obsolete function (as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ ins

■ Warning (comp): w3m-session.el:112:2: Warning: defvar `w3m-session-group-open' docstring has wrong usage of unescaped single quotes (use = or differ

notification pulls should be asynchronous

Notification pulling can take a long time, so it would be nice to have
it done in the background so that users can doing something else while
the operation is being performed.

w3m causes (require 'ffap) to fail if ffap-url-regexp is nil

in eval-after-load "ffap" part in w3m.el file, a string matching is done without guarding against a nil value in ffap-url-regexp.

which by the variable documentation should be a legal value:

ffap-url-regexp is a variable defined in ‘ffap.el’.
Its value is nil

Regexp matching the beginning of a URI, for ffap.
If the value is nil, disable URL-matching features in ffap.

this will cause requiring ffap to fail, along with every function in emacs that depends on it.

Any help on this, please? : `w3m.el package cl is deprecated`

Hi, group.
I am a user of the 28.1 version of GNU/Emacs on Fedora 36 and starting to get the warning pasted below from the Async-native-compile-log buffer. Would anyone know to give a clue about what I should do to fix it, if so?
I would appreciate it.

w3m.el.gz:61:13: Warning: Package cl is deprecated
w3m.el.gz:150:14: Warning: autoload `w3m-toggle-filtering' docstring wider than 80 characters
/usr/share/emacs/site-lisp/w3m/w3m.el.gz: Error: Wrong type argument sequence

Repeated same img tags are packed

When img tags which have the same src parameter are repeated without any characters, only one image is displayed.

<img src="image.jpg"><img src="image.jpg>

If there is a SPACE between tags, two images are displayed.

<img src="image.jpg"> <img src="image.jpg>

quick-search doesn't work when POST-DATA is required

This came to light when reviewing PR#51

Reproducible: From a w3m buffer type 'G ddg:namazu'. Instead of
returning a search results page, emacs-w3m returns a blank search
input page.

The basic problem seems to me to be that function w3m-input-url
itself calls function w3m-canonicalize-url instead of letting its
own callers decide whether to do so.

What is happening is that function w3m-goto-url calls function
w3m-input-url as part of its interactive spec, so at the very
beginning of the function w3m-goto-url, the URL arg has already been
'sanitizied'. However, in Jakub's case of using the quick search
feature for duckduckgo (ie. user inputs a url "ddg:foo"), the tail of
that url needs to parsed and placed in arg POST-DATA, because the
entry for "ddg:" in w3m-uri-replace-alist uses function
w3m-search-uri-replace and the duckduckgo entry in variable
w3m-search-engine-alist has a fourth argument - POST-DATA.

So, because of this quick-search feature, w3m-input-url in its
current form can not be used by w3m-goto-url. Function
w3m-goto-url looks to me to be used in ten separate places, so a
refactor would need to be careful.

The simple solution seems to be to remove from function
w3m-goto-urlthe call to function w3m-canonicalize-url, and have
each caller itself decide whether and when to do so.

In the case of function w3m-goto-url, what looks to me to be a
solution is to replace

(when (and (stringp url) (not (w3m-interactive-p)))
  (setq url (w3m-canonicalize-url url)))

with

(when not post-data
  (let* ((uri-replace ; based upon: `w3m-uri-replace'
          (catch 'found-replacement
            (dolist (elem w3m-uri-replace-alist)
              (when (string-match (car elem) url)
                (throw 'found-replacement  elem)))))
        (query (substring url (match-end 0)))
        engine-info)
    (when (and uri-replace query
               (eq (nth 1 uri-replace) 'w3m-search-uri-replace))
      ; based upon `w3m-search-uri-replace'
      (setq engine-info (assoc (nth 2 uri-replace) w3m-search-engine-alist))
      (when (and engine-info (< 2 (length engine-info)))
        (setq post-data (w3m-search-escape-query-string query (nth 2 engine-info)))))))
(setq url (w3m-canonicalize-url url)))

(edit: put let clause within (when not post-data ...) )

Problem with brotli compression

I noticed a while ago after some updates that some web sites stopped rendering correctly and produced binary-looking buffers. I didn't resolve this. A little later another person mentioned the same thing in the emacs help mailing list. But some others don't have the problem. I tracked it down and it appears to be that emacs-w3m doesn't have a "brotli" handler for brotli web page compression, as used by slashdot, duckduckgo, and others. Strangely this only seems to affect the later versions of the w3m command; earlier versions seem okay although I can't be more specific about which versions.

I added two lines of code that for me and the other user resolve the problem. The patch requires that the "brotli" command be in the command path. I don't check for this. I didn't generate a diff but the following in w3m.el should be hopefully clear enough. This has been tested on Endeavour (Arch), OpenBSD, and Debian systems.

defcustom w3m-decoder-alist should add this line to the list of types

(br "brotli" ("-d"))

defconst w3m-encoding-alist should add this line to the list of types

	     (br . ("br"))

I hope this is of some use.

Change suspicious links warning customizable

Hi emacs-w3m contributers,

Do you have a plan to make suspicious links warning customizable?
Actually, I'm using w3m on emacs mailer, sometimes a lot of ⚠️ is a bit annoying.

Here is my change:

modified   w3m.el
@@ -2348,6 +2348,16 @@ Echo messages will be displayed no matter what this variable is unless
   :group 'w3m
   :type 'boolean)
 
+(defcustom w3m-warning-propertize-function
+  (lambda (warning)
+    (if (display-graphic-p)
+        (propertize "⚠️" 'help-echo warning)
+      (propertize "▲!" 'help-echo warning
+				  'face '(:background "Yellow" :foreground "Black"))))
+  "Function used to propertize warn suspicious links"
+  :group 'w3m
+  :type 'function)
+
 (defvar w3m-safe-url-regexp nil
   "Regexp matching urls which are considered to be safe.
 The nil value means all urls are considered to be safe.
@@ -3584,12 +3594,7 @@ external `convert' program respectively."
 					   'help-echo help
 					   'keymap w3m-link-map))
 	    (when warning
-	      (insert
-	       (if (display-graphic-p)
-		   (propertize "⚠️" 'help-echo warning)
-		 (propertize "▲!" 'help-echo warning
-			     'face
-			     '(:background "Yellow" :foreground "Black")))))
+	      (insert (funcall w3m-warning-propertize-function warning)))
 	    (and (w3m-handle-non-anchor-buttons) (not first)
 		 ;; Add a widget so `forward-button' and `widget-forward'
 		 ;; work from outside of rendered area."

Thanks,

Trouble with the recent change of w3m-external-view

Miscellaneous fixes (4067e57)
* w3m.el [...]
(w3m-external-view): Enable the symbols `file' and `url' specified in
`w3m-content-type-alist' to be substituted by the lexical ones.

ukordes wrote:

Hi Katsumi
somehow this commit stops w3m-namazu to pass files arg to xpdf, at least when
customized as below, instead xpdf is called without the files

cheers
Uwe

  • '(w3m-content-type-alist
    ..
    ("application/pdf" ".pdf'"
    ("xpdf" file)
    nil)
    ...

Error displaying inline images

Hi, i'm using emacs-w3m from melpa (latest version there) and since a week or so ago displaying inline images (via, e.g., I in an emacs-w3m buffer, or when i use it to render emails) is throwing an error with the message:

       error in process sentinel: Wrong type argument: markerp, 3033 [6 times]

(the number 3033 varies with the page, i guess it's a position). If i toggle again twice (I I) the image(s) appear fine, so it seems an error thrown only the first time right after downloading the images.

Thanks!

github main page should have "description" and "topics" set

On the main page, you should be able to click on "No description.." and enter something like "emacs full-featured web browser (using w3m back-end)".

Also, just beneath that, should be a link for "manage topics" to enter keywords that can make it easier for search engines to find the project here, eg. "emacs web-browser w3m elisp".

placement of history defun / defvar / etc.

Currently, the history 'subsystem' is divided seemingly arbitrarily between w3.el and w3m-hist.el. I'd like to volunteer to move all of it to w3m-hist.el, if that's acceptable / desirable. I wanted to ask before doing it and making a PR because it will affect at least one other PR I'm working on.

Here are the resources I suggest moving from w3m.el:

1031:(defface w3m-history-current-url
2427:(defvar w3m-name-anchor-from-hist nil
2516:(defvar w3m-input-url-history nil)
2842:(defconst w3m-history-ignored-regexp
7773:(defvar w3m-goto-anchor-hist nil)
10725:(defvar w3m-about-history-max-indentation '(/ (* (window-width) 2) 3)
10731:(defvar w3m-about-history-indent-level 4
10735:(defun w3m-about-history (&rest args)
10819:(defun w3m-about-db-history (url &rest args)
10909:(defun w3m-history-highlight-current-url (url)
10943:(defcustom w3m-db-history-display-size
10950:(defun w3m-db-history (&optional start size)
10959:(defun w3m-history (&optional arg)

940:(defcustom w3m-arrived-file
946:(defcustom w3m-keep-arrived-urls 500
997:(defface w3m-arrived-anchor

2545:(defconst w3m-arrived-db-size 1023)
2546:(defvar w3m-arrived-db nil
2554:(defvar w3m-arrived-setup-functions nil
2556:(defvar w3m-arrived-shutdown-functions nil
2836:(defconst w3m-arrived-ignored-regexp
2950:(defmacro w3m-arrived-intern (url &optional soft)
2968:(defun w3m-arrived-add (url &optional title modification-time
2989:(defun w3m-arrived-p (url)
2994:(defun w3m-arrived-time (url)
2999:(defsetf w3m-arrived-time (url) (value)
3002:(defun w3m-arrived-put (url property value)
3009:(defun w3m-arrived-get (url property)
3015:(defsetf w3m-arrived-get w3m-arrived-put)
3017:(defmacro w3m-arrived-title (url)
3021:(defmacro w3m-arrived-last-modified (url)
3026:(defmacro w3m-arrived-content-charset (url)
3032:(defmacro w3m-arrived-content-type (url)
3038:(defun w3m-arrived-load-list ()
3064:(defun w3m-arrived-setup ()
3086:(defun w3m-arrived-shutdown ()

Should `w3m-pop-up-windows` be marked as DEPRECATED?

In recent versions of emacs-w3m, when I use functions like w3m-search-new-session or w3m-goto-url-new-session, w3m will pop up new windows even my w3m-display-mode is tabbed.

It seems that w3m-popup-window-p only cares about w3m-pop-up-windows and its set to t. If it's the correct behavior, should w3m-pop-up-windows be marked as DEPRECATED? Or should we change w3m-popup-window-p to respect the display mode?

Integrate with pass (perhaps by integrating with auth-source) for form-filling

I've just discovered w3m and I have to say it's awesome. One thing I miss from firefox is easy form filling for passwords and usernames, which I have in a carefully curated pass database. Emacs has excellent libraries for dealing with pass through auth-source, which is just a more general way of looking after secrets. It would be great if w3m could do automatic form-filling with passwords and usernames based on page url, html tags etc, like this client does for firefox for example.

Since auth-source is the more general interface and emacs uses it to connect with pass anyway, perhaps it would be good to integrate filling and submission of anything from auth-source.

New MELPA version (20190225.443) is broken

After updating from MELPA (version 20190225.443) today, the w3m function seems to be broken.

Just execute w3m command and it says:

mapcar: Wrong type argument: arrayp, (("-no-cookie" "-o" "follow_redirection=0" "-o" "user_agent=Emacs-w3m/1.4.632 w3m/0.5.3+git20180125" "-dump_extra" "http://www.google.fr/") [w3m-process-object #<buffer  *w3m-work*-375554> nil nil])

The complete debugging trace is:

Debugger entered--Lisp error: (wrong-type-argument arrayp (("-no-cookie" "-o" "follow_redirection=0" "-o" "user_agent=Emacs-w3m/1.4.632 w3m/0.5.3+git20180125" "-dump_extra" "http://www.google.fr/") [w3m-process-object #<buffer  *w3m-work*-375554> nil nil]))
  #f(compiled-function (obj) #<bytecode 0x1fbb4e5>)(("/usr/bin/w3m" ("-no-cookie" "-o" "follow_redirection=0" "-o" "user_agent=Emacs-w3m/1.4.632 w3m/0.5.3+git20180125" "-dump_extra" "http://www.google.fr/") [w3m-process-object #<buffer  *w3m-work*-375554> nil nil]))
  mapcar(#f(compiled-function (obj) #<bytecode 0x1fbb4e5>) (("/usr/bin/w3m" ("-no-cookie" "-o" "follow_redirection=0" "-o" "user_agent=Emacs-w3m/1.4.632 w3m/0.5.3+git20180125" "-dump_extra" "http://www.google.fr/") [w3m-process-object #<buffer  *w3m-work*-375554> nil nil])))
  w3m-process-stop(#<buffer *w3m*>)
  w3m--goto-url--valid-url("about://bookmark/" nil nil nil nil nil nil nil nil)
  w3m-goto-url("about://bookmark/" nil)
  w3m-bookmark-view(nil)
  funcall-interactively(w3m-bookmark-view nil)
  call-interactively(w3m-bookmark-view nil nil)
  command-execute(w3m-bookmark-view)

Removed test on image-types in w3m-favicon causes an error in 20190712

Note: edited to clarify as my title may be misleading.

Possible regression: just prior to 20190712 the defcustom w3m-favicon-type (in w3-favicon.el) included a feature test for xemacs. The code looks to have been refactored and now image-types is referenced as a variable without a check. In a non-graphic environment image-types is undefined (at least, in my Termux setup, that's the case).

My temporary workaround in my startup code is, prior to setting up w3m, inserting a check for non-graphics environment and then setting image-types to nil.

Doesn't work correctly with display-line-numbers-mode

Emacs 26 introduced display-line-numbers-mode to replace linum-mode. Unfortunately display-line-numbers-mode doesn't correct the value of window-width, and emacs developers consider this a feature. See emacsorphanage/yascroll#23 and https://groups.google.com/d/msg/gnu.emacs.bug/pxOxaocXa2s/Gg4Z8N0QAAAJ

Steps to reproduce:

  1. Enable display-line-numbers-mode globally (I did it from customize, which ends up with something like (custom-set-variables '(display-line-numbers t))).
  2. Open a website with long lines in w3m
    screenshot
    Notice that some lines are truncated

I think w3m should either subtract line-number-display-width from window-width in w3m-display-width or forcefully disable display-line-numbers-mode when it is enabled globally.

Suspicious code in defcustom

I am not sure how this is expected to work, but i was expecting this line in the definitionof w3m-key-binding:

 `(setq w3m-mode-map (if (eq ,value 'info)

to be instead

 `(setq w3m-mode-map (if (eq ',value 'info)

please note the quote in ',value, which is missing in the current code, so that an invocation
of the form:

(customize-set-variable 'w3m-key-binding 'info)

would work as expected (i.e., set w3m-key-binding to the symbol info, plus its
other duites). With the current definition (without the quote in ,value), evaluating
the customize-set-variable call above throws an error (quite naturally) because the
variable info is not defined. The same thing happens if one tries the customize interface.

Is this a genuine bug?

Thanks!

mailing list still down

Since late last week, I haven't been able to post to the email list, and for several days had trouble even accessing the namazu web site. Now, the website seems okay, but I'm still getting my emails bounced.

notification not auto-updated

I just used forge to add a comment to issue #150, and my expectation
was that after successfully sending the addition, that it would appear
in the view topic buffer, but what needed to happen was for me to
manually re-fetch all notifications (a surprisingly lengthy process; I
should create an issue for that if it doesn't already exist).

Supported Emacs version?

Document says emacs-w3m can run on Emacs 21.x. But emacs-w3m uses utf-8-emacs coding system, which is available since Emacs 23.

w3m-create-page kills external process displaying external viewers

Hi. When one tries to open a page that will invoke a external viewer via w3m-external-view called in w3m-create-page (say, a pdf for which my mailcap has an entry that calls a shell script that then calls emacsclent after doing other things), the external process is started and immediately w3m-process-stop is invoked on the page buffer (see w3m lines 6497-8). That call to w3m-process-stop kills the external viewer process and the display is thus abruptly aborted.

w3m-search - does not work with DuckDuckGo (DuckDuckGo Lite)

It used to work in DuckDuckGo with the following code in my dot-emacs:

(require 'w3m-search)
(setq w3m-search-default-engine "DuckDuck Go")
(add-to-list 'w3m-search-engine-alist
  	'("DuckDuck Go" "https://duckduckgo.com/?q=%s"))

(global-set-key (kbd "M-g M-w") 'w3m-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))))

But recently DuckDuckGo redirect the search to https://lite.duckduckgo.com/lite/ and the GET method does not work anymore:
The (correct) search result page of https://lite.duckduckgo.com/lite/ contains no search string and its form use the POST method instead.

With a search string attached at the end of the URL, e.g. searching for 'emacsclient' with my code posted above (https://lite.duckduckgo.com/lite/?q=emacsclient) links of the search results become malformed, e.g. link to emacswiki's Emacsclient page will become
https://lite.duckduckgo.com/l/?kh=-1&uddg=https%3A%2F%2Fwww.emacswiki.org%2Femacs%2FEmacsClient instead of https://www.emacswiki.org/emacs/EmacsClient

Is it a bug in w3m-search or is there something w3m-search can do to make it work again?

Wrong type argument: stringp, w3m-filter-prefer-lazy-images

The following error occurs when w3m starts
error in process sentinel: Wrong type argument: stringp, w3m-filter-prefer-lazy-images

他の w3m-filter-* を見ると フィルタ関数の前に URL の文字列を指定していました。
意図した動作になっているかはわからないですが、 w3m-filter-iframe と同じように空文字("")を追加することで起動時のエラーは発生しなくなりました。

--- w3m-filter.el.org   2019-05-09 08:52:17.473465049 +0900
+++ w3m-filter.el       2019-05-09 09:12:42.858943673 +0900
@@ -145,6 +145,7 @@
      w3m-filter-iframe)
     (t ("Prefer a lazy image specified with data-src= in img tags"
        "img タグ内の data-src= で指定される遅延画像を優先します")
+       ""
        w3m-filter-prefer-lazy-images))
   "List of filter configurations applied to web contents.
 Each filter configuration consists of the following form:

melpa stable and melpa badges

  1. The README.md file for the project should have an additional badge to point to melpa. For markdown, the format of the badge is:

    MELPA

I've done this on my master branch, so you can see there what it looks like.

  1. Once the badge exists, clicking on it (and enabling enough javascript) will give you a summary page with all kinds of useful and trivia information about the project. The page also contains the code for how to insert the badge in different README formats.

  2. There does exist a second type of melpa badge, called 'melpa stable', and it might be worthwhile to consider setting the project up to be able to use that because there are bound to be users who want to take a more conservative approach rather than pulling a pseudo-random latest commit. However, I'm not sure how to get a package added to 'melpa stable'. I see different indications on different search results. One page says that 'melpa stable' is built from the latest git tag of a project, while another page says that 'melpa stable' is somehow curated. If the project is interested in pursuing this, the thing to do might be to open an issue with melpa.

What does 'no such anchor' means and how-to sort it out?

Hi, everyone. I got the following lines of code, I wish someone could do help on this. There is a (corpora for collocations) search engine I wanted to add to my w3m-search function but unsuccessful, whenever a try I got the following output which I ignore what it means so sorting it out, any help?

No such anchor: result?query=inquired&lang=en&f=concordance

here my lines of code:

(global-set-key (kbd "s-g") (lambda ()
                         (interactive)
                         (let ((current-prefix-arg t))
                           (call-interactively 'w3m-search))))

(require 'w3m-search)

(add-to-list 'w3m-search-engine-alist
             '("skell" "https://skell.sketchengine.eu/#result?query=%s&lang=en&f=concordance"))

mime-view package is not available in melpa install

It seems that now APEL package is deprecated and unsafe to install.
But w3m still require mime-view which is part of APEL resulting in an error when compiling.
Even if this error which is here since ages now doesn't prevent using w3m, it is annoying, could you make a soft require of this library to prevent errors at compile time?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.