emacs-devel
[Top][All Lists]
Advanced

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

RE: Versions of Emacs Manuals on web


From: Drew Adams
Subject: RE: Versions of Emacs Manuals on web
Date: Thu, 21 May 2020 08:20:03 -0700 (PDT)

> >   > You can evaluate this from within emacs itself for getting
> >   > the right copy for your emacs version:
> >   > (info "(emacs) File Variables")
> >
> > That idea could be better than just a note.
> 
> It will fail miserably, though, if the specified node does not
> exist on the user's machine. I recently went looking for `(info
> "(elisp) Special Read Syntax")` on Emacs 26 and didn't find it,
> because it's new in Emacs 27.

Yes.  And if we're considering doing this for
more than the Emacs, Elisp, and Intro Elisp
manuals, then the given _manual_ might not exist.
___

I, for one, think it would be good if GNU hosted
manuals (Emacs, Elisp, Intro Elisp, at least)
for older Emacs releases, as well as the latest.
And for a pretest (such as Emacs 27).
___

Not too related, but a bit: In Info+ I have `G'
bound to `Info-goto-node-web', which uses
`browse-url' to go to the given node using a
web browser.  With a prefix arg it reverses the
effect of option `browse-url-new-window-flag'.

I use it all the time, to quickly grab the URL
of the web version of some node and post it as
help in forums such as emacs.StackExchange and
Reddit.  (I usually also say how you can get to
the node in Emacs itself.)

(defun Info-goto-node-web (node &optional flip-new-win)
  "Use `browse-url' to go to Info node NODE using a Web browser.
With a prefix arg, reverse the effect of option
`browse-url-new-window-flag'.

NODE is the name of a node in the GNU Emacs or Elisp manual.
Alternatively, NODE can have the form (MANUAL)NODE, where MANUAL is
\"emacs\" or \"elisp\" and NODE is the name of the node in that
manual.  Empty NODE in (MANUAL) defaults to the `Top' node."
  (interactive
    (list (Info-read-node-name "Go to node: " Info-current-node)
          current-prefix-arg))
  (require 'browse-url)
  (unless Info-current-file
    (error "This command must be invoked from Info"))
  (browse-url (Info-url-for-node node)
              (list (if flip-new-win
                        (not browse-url-new-window-flag)
                      browse-url-new-window-flag))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]