[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: error upon load and tab navigation [PATCH included]

On 2017-07-14 10:02, Katsumi Yamaoka wrote:
> In [emacs-w3m : No.12745]
> On Thu, 13 Jul 2017 08:33:06 -0400, Boruch Baum wrote:
> > For example, `C-x m' (browse-url-at-point) does not work without the
> > patch, but does with the patch.
> I made sure that w3m.elc is not loaded, and then tried this
> (setq browse-url-browser-function 'w3m-browse-url)
> and invoked `M-x browse-url-at-point RET' on a url string.
> However, nothing happened other than having launched emacs-w3m
> normally.  Isn't this procedure the same as yours?  Isn't any
> message shown in the echo area (or logged in the *Messages*
> buffer) then?

1] I'll need some time, maybe a few hours, to get back to you on that
   exact test, because I'm in the middle of something and can't
   shut-down and restart emacs-w3m right now.

2] I can share with you now what happens to an already-open instance
   of emacs-w3m when I restore `w3m-replace-in-string' to its
   unpatched value.

2.1.1] I get a message in the minibuffer:

           Wrong type argument: arrayp, nil

2.1.2] In the *Messages* buffer, the error message is:

           funcall: Wrong type argument: arrayp, nil
           When done with a buffer, type C-x #

2.1.3] In my case, Emacs does open a new blank w3m buffer, named
       "*server*-nnnnnn", where nnnnnn is an integer. For me, this is
       the long-standing behavior of w3m buffer names that I have
       commented on in the past, and which I attribute to my use of
       emacsclient / server. The title of the buffer in the buffer
       list (`w3m-select-buffer') is "<no-title>".


> Note: The value of `post-command-hook' in a w3m-mode buffer would
> normally be (w3m-check-current-position t), in which the local
> part `w3m-check-current-position' runs `w3m-print-this-url', etc.
> But Emacs will make it (t) if an error once occurs by a function
> listed in the variable `w3m-after-cursor-move-hook', i.e.,
> `w3m-highlight-current-anchor', `w3m-show-form-hint',
> `w3m-print-this-url' and `w3m-auto-show' by default.  In my case,
> `post-command-hook' didn't get changed through the above test.

2.2.1] My value for `post-command-hook' was t for all already-open
       emacs-w3m buffers, so I manually set it to
       (w3m-check-current-position t) in several, and tried `C-x m'.
       The result was a blank buffer, a value of that new buffer's
       `post-command-hook' being


2.2.2] and the value of `post-command-hook' remains the same in the
       prior w3m buffers (the buffers in which I manually set it).

2.2.3] The error message in the *Messages* buffer is:

         funcall: Wrong type argument: arrayp, nil

2.2.4] At this point, I re-evaluated my patched version of
       `w3m-replace-in-string', and performed `C-x m'. It successfully
       loaded the page and show what you said should be the correct
       value for `post-command-hook', (w3m-check-current-position t).

3] As I mentioned, I'm in the middle of other work just now. If this
   information turns out to be sufficient, let me know. Otherwise,
   I'll conduct the tests from an emacs totally un-loaded of

CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0