From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Schafer Subject: Add custom bare link syntax for intranet Date: Sun, 19 Jun 2016 07:00:30 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11352a06468c1805359c2534 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEWip-0007ZS-TV for emacs-orgmode@gnu.org; Sun, 19 Jun 2016 03:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEWin-0006b8-L5 for emacs-orgmode@gnu.org; Sun, 19 Jun 2016 03:00:42 -0400 Received: from mail-vk0-x235.google.com ([2607:f8b0:400c:c05::235]:32966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEWin-0006au-FG for emacs-orgmode@gnu.org; Sun, 19 Jun 2016 03:00:41 -0400 Received: by mail-vk0-x235.google.com with SMTP id d185so162550189vkg.0 for ; Sun, 19 Jun 2016 00:00:40 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --001a11352a06468c1805359c2534 Content-Type: text/plain; charset=UTF-8 Hi all, How can I linkify the following intranet links in org-mode? intra/link1-description code/description By linkify, I mean the links should be fontified and clickable in org-mode. I don't want to add a custom link handler like `intra:` because I often copy and paste links from the intranet. I tried the following hack which worked for fontification, but not clicking. (setq org-plain-link-re (concat "\\(" org-plain-link-re "\\|" "intra/[^ \n.]+" "\\)")) I originally posted this at emacs.stackexchange, http://emacs.stackexchange.com/posts/23828 -- Joe Schafer --001a11352a06468c1805359c2534 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

How can I linkify th= e following intranet links in org-mode?

=C2=A0 =C2= =A0 intra/link1-description
=C2=A0 =C2=A0 code/description
<= div>
By linkify, I mean the links should be fontified and cli= ckable in org-mode.

I don't want to add a cust= om link handler like `intra:` because I often copy and paste links from the= intranet.

I tried the following hack which worked= for fontification, but not clicking.

=C2=A0 = =C2=A0 (setq org-plain-link-re
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= (concat
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\\("=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0org-plain-link-re
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\\|"
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"intra/[^ \n.]+"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\\)"))
=

I originally posted this at emacs.stackexchan= ge,=C2=A0http://emac= s.stackexchange.com/posts/23828

--
J= oe Schafer

--001a11352a06468c1805359c2534-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add custom bare link syntax for intranet Date: Tue, 21 Jun 2016 23:28:35 +0200 Message-ID: <87lh1y9qpo.fsf@saiph.selenimh> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFTDw-00033a-7Y for emacs-orgmode@gnu.org; Tue, 21 Jun 2016 17:28:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFTDv-0005hj-Fc for emacs-orgmode@gnu.org; Tue, 21 Jun 2016 17:28:44 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:51370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFTDv-0005hb-8t for emacs-orgmode@gnu.org; Tue, 21 Jun 2016 17:28:43 -0400 In-Reply-To: (Joe Schafer's message of "Sun, 19 Jun 2016 07:00:30 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Joe Schafer Cc: emacs-orgmode@gnu.org Joe Schafer writes: > How can I linkify the following intranet links in org-mode? > > intra/link1-description > code/description > > By linkify, I mean the links should be fontified and clickable in org-mode. > > I don't want to add a custom link handler like `intra:` because I often > copy and paste links from the intranet. You cannot, at least without rewriting how Org handles links. However, I don't think how having "intra:" prefix is a burden, since you can easily add it automatically with a function. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Schafer Subject: Re: Add custom bare link syntax for intranet Date: Thu, 23 Jun 2016 04:11:32 +0000 Message-ID: References: <87lh1y9qpo.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114e51025508fd0535ea406f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFvzU-0002B0-Pi for emacs-orgmode@gnu.org; Thu, 23 Jun 2016 00:11:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFvzS-0007Bb-H4 for emacs-orgmode@gnu.org; Thu, 23 Jun 2016 00:11:43 -0400 Received: from mail-vk0-x231.google.com ([2607:f8b0:400c:c05::231]:36532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFvzS-0007BV-BR for emacs-orgmode@gnu.org; Thu, 23 Jun 2016 00:11:42 -0400 Received: by mail-vk0-x231.google.com with SMTP id u64so89611954vkf.3 for ; Wed, 22 Jun 2016 21:11:42 -0700 (PDT) In-Reply-To: <87lh1y9qpo.fsf@saiph.selenimh> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --001a114e51025508fd0535ea406f Content-Type: text/plain; charset=UTF-8 Adding http:// works. I'll stick with that for now. On Tue, Jun 21, 2016 at 2:28 PM Nicolas Goaziou wrote: > Joe Schafer writes: > > > How can I linkify the following intranet links in org-mode? > > > > intra/link1-description > > code/description > > > > By linkify, I mean the links should be fontified and clickable in > org-mode. > > > > I don't want to add a custom link handler like `intra:` because I often > > copy and paste links from the intranet. > > You cannot, at least without rewriting how Org handles links. However, > I don't think how having "intra:" prefix is a burden, since you can > easily add it automatically with a function. > > Regards, > > -- > Nicolas Goaziou > --001a114e51025508fd0535ea406f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Adding http:// works.=C2=A0 I'll stick with that for n= ow.

On Tue, Jun 21, 201= 6 at 2:28 PM Nicolas Goaziou <= mail@nicolasgoaziou.fr> wrote:
Joe Schafer <joesmoe10@gmail.com> writes:

> How can I linkify the following intranet links in org-mode?
>
>=C2=A0 =C2=A0 =C2=A0intra/link1-description
>=C2=A0 =C2=A0 =C2=A0code/description
>
> By linkify, I mean the links should be fontified and clickable in org-= mode.
>
> I don't want to add a custom link handler like `intra:` because I = often
> copy and paste links from the intranet.

You cannot, at least without rewriting how Org handles links. However,
I don't think how having "intra:" prefix is a burden, since y= ou can
easily add it automatically with a function.

Regards,

--
Nicolas Goaziou
--001a114e51025508fd0535ea406f--