[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Patch: org-link-ignore-path-to-self

From: Shintaro Katayama
Subject: [O] Patch: org-link-ignore-path-to-self
Date: Wed, 27 Jul 2016 09:38:03 +0000


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.


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]