From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Zhao Subject: Re: `org-store-link' to skip link storing functions without touching `org-context-in-file-links' Date: Sat, 20 May 2017 23:09:32 -0400 Message-ID: References: <874lwfyw8j.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c07d7c661c40c0550001522" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCHFO-0006X7-J8 for emacs-orgmode@gnu.org; Sat, 20 May 2017 23:09:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCHFN-0005Ns-Fh for emacs-orgmode@gnu.org; Sat, 20 May 2017 23:09:34 -0400 Received: from mail-yb0-x232.google.com ([2607:f8b0:4002:c09::232]:36777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCHFN-0005Nm-98 for emacs-orgmode@gnu.org; Sat, 20 May 2017 23:09:33 -0400 Received: by mail-yb0-x232.google.com with SMTP id 130so6239523ybl.3 for ; Sat, 20 May 2017 20:09:33 -0700 (PDT) In-Reply-To: <874lwfyw8j.fsf@kyleam.com> 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: Kyle Meyer Cc: emacs-orgmode --94eb2c07d7c661c40c0550001522 Content-Type: text/plain; charset="UTF-8" > Yeah, org-store-link overloads ARG Exactly! > I think that, when negating org-context-in-file-links, the function should > check whether a single C-u was given rather than just checking if ARG is > non-nil. Seems to be a reasonable solution to me. So would you go ahead and make the change, or, would more people need to agreed on this solution? > If someone uses C-u C-u to fall back to core Org functions, I don't see any > reason to assume that they also want to reverse their > org-context-in-file-links preference. Maybe! Thanks, York On Sat, May 20, 2017 at 6:55 PM, Kyle Meyer wrote: > York Zhao writes: > > > However, the biggest problem I'm having now is that once I loaded > > org-git-link.el, I'm forced to always store links linking to git > repository > > which is not always I want because I also need to be able to store links > > linking to the files in the working directory instead of in the git > > repository. > > > > I'm aware of the 'C-u C-u' prefix of `org-store-link', however, by the > > current design, using 'C-u C-u' negates `org-context-in-file-links', > i.e., > > the link would be stored without embedding the text to search for. > > Yeah, org-store-link overloads ARG, and there seems to be an undesirable > interaction here. > > > Is it possible to make `org-store-link' able to skip the link storing > > functions without touching `org-context-in-file-links'? > > I think that, when negating org-context-in-file-links, the function > should check whether a single C-u was given rather than just checking if > ARG is non-nil. If someone uses C-u C-u to fall back to core Org > functions, I don't see any reason to assume that they also want to > reverse their org-context-in-file-links preference. > > -- > Kyle > --94eb2c07d7c661c40c0550001522 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Yeah, org-store-link overloads ARG

Exactly!
> I think that, when negating org-context-in-file-links, the functi= on should
> check whether a single C-u was given rather than just che= cking if ARG is
> non-nil.

Seems to be a reasonable solution t= o me. So would you go ahead and make the
change, or, would more people n= eed to agreed on this solution?

> If someone uses C-u C-u to fall= back to core Org functions, I don't see any
> reason to assume t= hat they also want to reverse their
> org-context-in-file-links prefe= rence.

Maybe!


Thanks,

York


On Sat, May 20, 2017 at 6:5= 5 PM, Kyle Meyer <kyle@kyleam.com> wrote:
York Zhao <gtdplatform@gmail.com> writes:

> However, the biggest problem I'm having now is that once I loaded<= br> > org-git-link.el, I'm forced to always store links linking to git r= epository
> which is not always I want because I also need to be able to store lin= ks
> linking to the files in the working directory instead of in the git > repository.
>
> I'm aware of the 'C-u C-u' prefix of `org-store-link',= however, by the
> current design, using 'C-u C-u' negates `org-context-in-file-l= inks', i.e.,
> the link would be stored without embedding the text to search for.

Yeah, org-store-link overloads ARG, and there seems to be an undesir= able
interaction here.

> Is it possible to make `org-store-link' able to skip the link stor= ing
> functions without touching `org-context-in-file-links'?

I think that, when negating org-context-in-file-links, the function<= br> should check whether a single C-u was given rather than just checking if ARG is non-nil.=C2=A0 If someone uses C-u C-u to fall back to core Org
functions, I don't see any reason to assume that they also want to
reverse their org-context-in-file-links preference.

--
Kyle

--94eb2c07d7c661c40c0550001522--