emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Vincent Belaïche" <vincent.b.1@hotmail.fr>
To: EMACS devel list <emacs-devel@gnu.org>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: info URL « open at point » patch
Date: Sun, 24 Jun 2018 06:57:53 +0000	[thread overview]
Message-ID: <AM6PR10MB1957E6380267C6C437E77D19844B0@AM6PR10MB1957.EURPRD10.PROD.OUTLOOK.COM> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1555 bytes --]

Bonjour tout l'monde !
I am writing to both Emacs-devel and org-mode list because this concerns
browsing URL, and Org-mode already has quite some stuff on this.
Recently I came across this that in an Info file a « file: » protocol
URL is not opened at point. Please find attached a patch to make it
known to the Emacs info browser.
My point was that I have some manual that are only in HTML or PDF, like
the SVN manual, In have a local copy, and I want to find it through a
manual index that I written in Texinfo to get an info node with this
index.
I suspect that some other people than me may have the same need, and as
such the patch is useful. If everybody agrees with the attached patch I
can commit/push it on the master branch.

Now, maybe it is the time to reconsider how the info browser consider
URL's, maybe there is some code factorization to do with org-mode, in
order to accept a wider range of variety of URL's. Org-mode is good at
that, and that is why I am having its forum in the loop of this
discussion.
For instance, I remember that at some point of time at my job I was
handling some requirements with IBM-Doors (it was a long time ago, and
that SW was named Telelogic-Doors at that time). I had a few org-mode
files with custom URL's pointing at Doors objects, and that was quite
useful to me to be able to keep in my TODO lists, and other Org-mode
stuff direct links to these objects. I suspect that some people may have
the same need with Texinfo documents when they want to use custom URL's…
  Vincent.

[-- Attachment #1.2: Type: text/html, Size: 2104 bytes --]

[-- Attachment #2: info-patch.diff --]
[-- Type: application/octet-stream, Size: 629 bytes --]

diff --git a/lisp/info.el b/lisp/info.el
index c45b7f9cb3..ab2c51d84b 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3938,8 +3938,8 @@ Info-try-follow-nearest-node
 If FORK is non-nil, it is passed to `Info-goto-node'."
   (let (node)
     (cond
-     ((setq node (Info-get-token (point) "[hf]t?tps?://"
-				 "\\([hf]t?tps?://[^ \t\n\"`‘({<>})’']+\\)"))
+     ((setq node (Info-get-token (point) "\\(?:f\\(?:ile\\|tp\\)\\|https?\\)://"
+				 "\\(\\(?:f\\(?:ile\\|tp\\)\\|https?\\)://[^ \t\n\"`‘({<>})’']+\\)"))
       (browse-url node)
       (setq node t))
      ((setq node (Info-get-token (point) "\\*note[ \n\t]+"

             reply	other threads:[~2018-06-24  6:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-24  6:57 Vincent Belaïche [this message]
2018-06-24 14:31 ` info URL « open at point » patch Eli Zaretskii
2018-06-24 16:48   ` Vincent Belaïche
2018-06-24 16:49     ` Vincent Belaïche
2018-06-24 17:03     ` Eli Zaretskii
2018-06-24 18:21       ` Vincent Belaïche
2018-06-24 18:45         ` Eli Zaretskii
2018-06-24 20:34           ` Vincent Belaïche
2018-06-25  2:30             ` Eli Zaretskii
2018-06-26  5:19               ` Vincent Belaïche
2018-06-26  5:47                 ` Vincent Belaïche
2018-06-26 14:34                   ` Eli Zaretskii
2018-06-27 17:39                     ` Vincent Belaïche
2018-06-27 18:11                       ` Eli Zaretskii
2018-06-26 14:30                 ` Eli Zaretskii
2018-06-24 14:46 ` Jean-Christophe Helary
2018-06-24 20:30   ` Vincent Belaïche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR10MB1957E6380267C6C437E77D19844B0@AM6PR10MB1957.EURPRD10.PROD.OUTLOOK.COM \
    --to=vincent.b.1@hotmail.fr \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).