From: Shintaro Katayama <shintaro.katayama@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Patch: org-link-ignore-path-to-self
Date: Wed, 27 Jul 2016 09:38:03 +0000 [thread overview]
Message-ID: <CAA0xz1N3usPPpAn=0Q=mjXOJGujgXAU2fWEKwofsREH_MyN6zQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
Hi,
The attached patch enables to choose whether link contains a (file-)path to
self, or not. One new variable "org-link-ignore-path-to-self" should be
true as the original behavior (~ no path to self by org-insert-link).
However, the path-to-self will remain when the value is nil.
This feature is helpful, especially for org-journal - you can use
org-insert-link from TODOs to journal entries in a journal; the links are
preserved even after carryover.
Regards,
Shintaro
--- /Users/shin/.emacs.d/elpa/org-20160711/org.el~ 2016-07-16
01:46:09.000000000 +0200
+++ /Users/shin/.emacs.d/elpa/org-20160711/org.el 2016-07-27
10:40:30.000000000 +0200
@@ -10386,6 +10386,7 @@
;; option If yes, simplify the link by using only the search
;; option.
(when (and buffer-file-name
+ org-link-ignore-path-to-self
(string-match "^file:\\(.+?\\)::\\(.+\\)" link))
(let* ((path (match-string 1 link))
(case-fold-search nil)
[-- Attachment #2: Type: text/html, Size: 1307 bytes --]
reply other threads:[~2016-07-27 9:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA0xz1N3usPPpAn=0Q=mjXOJGujgXAU2fWEKwofsREH_MyN6zQ@mail.gmail.com' \
--to=shintaro.katayama@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.