emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: York Zhao <gtdplatform@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <CAD3zm21KWcq5CJGva40g2dsg7VG8hpPcyTxhBehSUfgB2kMB+w@mail.gmail.com> (raw)
In-Reply-To: <874lwfyw8j.fsf@kyleam.com>

[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]

> 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 <kyle@kyleam.com> wrote:

> York Zhao <gtdplatform@gmail.com> 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
>

[-- Attachment #2: Type: text/html, Size: 2494 bytes --]

  reply	other threads:[~2017-05-21  3:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-20 16:02 `org-store-link' to skip link storing functions without touching `org-context-in-file-links' York Zhao
2017-05-20 22:55 ` Kyle Meyer
2017-05-21  3:09   ` York Zhao [this message]
2017-05-21  5:47     ` [PATCH] org-store-link: Don't roll C-u behavior into C-u C-u behavior Kyle Meyer
2017-05-21  6:59       ` Nicolas Goaziou
2017-05-21 18:57         ` Kyle Meyer

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=CAD3zm21KWcq5CJGva40g2dsg7VG8hpPcyTxhBehSUfgB2kMB+w@mail.gmail.com \
    --to=gtdplatform@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    /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).