From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: `org-store-link' to skip link storing functions without touching `org-context-in-file-links' Date: Sat, 20 May 2017 18:55:08 -0400 Message-ID: <874lwfyw8j.fsf@kyleam.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCDHJ-0008EP-Rw for emacs-orgmode@gnu.org; Sat, 20 May 2017 18:55:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCDHG-0002sa-PJ for emacs-orgmode@gnu.org; Sat, 20 May 2017 18:55:17 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:51402 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCDHG-0002qo-GL for emacs-orgmode@gnu.org; Sat, 20 May 2017 18:55:14 -0400 In-Reply-To: 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: York Zhao , emacs-orgmode 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