emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Patch: org-link-ignore-path-to-self
@ 2016-07-27  9:38 Shintaro Katayama
  0 siblings, 0 replies; only message in thread
From: Shintaro Katayama @ 2016-07-27  9:38 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-27  9:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-27  9:38 Patch: org-link-ignore-path-to-self Shintaro Katayama

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).