[emacs-w3m:13543] w3m-view-this-url-new-session in background

Michael Heerdegen <[email protected]>
Newsgroups gmane.emacs.w3m
Message-ID <[email protected]>
Ok,

I post here instead of with M-x report-emacs-w3m-bug since it is broken
for me (see my last message).

What I want to have is what S-RET (w3m-view-this-url-new-session) does
but in the background - a feature that is known from other web browsers.
That doesn't exist in w3m yet (at this level), correct?

If not, I would suggest to add it.  Or better use the currently unused
prefix arg of `w3m-view-this-url-new-session' to control the behavior.
I think ideally the default should be user configurable, and the prefix
arg would should the default behavior.

Seems w3m has all capabilities to do what I want, but it's not simple to
get it as a user.  Currently I use this hack:

#+begin_src emacs-lisp
(advice-add 'w3m-view-this-url-new-session :around
            (defun my-w3m-view-this-url-new-session-in-backgound (f &rest args)
              (cl-letf* ((w3m-goto-url-new-session--orig
                          (indirect-function 'w3m-goto-url-new-session))
                         ((symbol-function 'w3m-goto-url-new-session)
                          (lambda (&rest args)
                            (apply w3m-goto-url-new-session--orig
                                   (if current-prefix-arg args
                                     (mapcar
                                      (lambda (i)
                                        (if (< i 5) (nth i args) (not (nth i args))))
                                      (number-sequence 0 5)))))))
                (apply f args))))
#+end_src

Of course this obviously is really just a hack, I guess a BACKGROUND
flag should somehow be passed by the code up to the place where
`w3m-goto-url-new-session' gets called.

TIA,

Michael.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.