[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark f97f201719 1/2: rm: Adding Org-ID automatica
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark f97f201719 1/2: rm: Adding Org-ID automatically to file level when file is empty |
Date: |
Sun, 30 Jan 2022 13:57:51 -0500 (EST) |
branch: externals/org-remark
commit f97f20171964d9bb12a3375be3f9c32729c90567
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
rm: Adding Org-ID automatically to file level when file is empty
This is supposed to help bridge org-remark with org-roam. It turns out to
clutter the backlinks because every highlight would be shown as a backlink.
The
ID should be manually added when the user decides the marginal notes are
worth
backlink by adding Org-ID to turn the entry into a node.
---
NEWS | 1 +
org-remark.el | 15 ++-------------
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/NEWS b/NEWS
index 80da7863fd..02e972699f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
Version 0.2.0
- add: org-remark-delete
+ - rm: Adding Org-ID automatically to file level when file is empty
Version 0.1.0
* Features & additions
diff --git a/org-remark.el b/org-remark.el
index c260448db3..fc54f235f2 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
;; URL: https://github.com/nobiot/org-remark
;; Version: 0.2.0
;; Created: 22 December 2020
-;; Last modified: 28 January 2022
+;; Last modified: 30 January 2022
;; Package-Requires: ((emacs "27.1") (org "9.4"))
;; Keywords: org-mode, annotation, writing, note-taking, marginal-notes
@@ -744,12 +744,7 @@ buffer with serach option \"::line-number\".
ORGID can be passed to this function. If user option
`org-remark-use-org-id' is non-nil, this function will add an
Org-ID link in the body text of the headline, linking back to the
-source with using ORGID.
-
-When a new marginal notes file is to be created and
-`org-remark-use-org-id' is non-nil, this function will also add
-an Org-ID property to the file level. This can be helpful with
-other packages such as Org-roam's backlink feature."
+source with using ORGID."
;;`org-with-wide-buffer is a macro that should work for non-Org file'
(let* ((path (org-remark-source-path path))
(id (plist-get props 'org-remark-id))
@@ -760,8 +755,6 @@ other packages such as Org-roam's backlink feature."
;; TODO Want to add a check if save is applicable here.
(with-current-buffer (find-file-noselect org-remark-notes-file-path)
;; If it is a new empty marginalia file
- (when (and (org-remark-empty-buffer-p) org-remark-use-org-id)
- (org-id-get-create))
(when (featurep 'org-remark-convert-legacy)
(org-remark-convert-legacy-data))
(org-with-wide-buffer
(let ((file-headline (or (org-find-property
@@ -1085,10 +1078,6 @@ path."
;; (funcall org-remark-notes-path-function path)))
(abbreviate-file-name path))
-(defun org-remark-empty-buffer-p ()
- "Return t when the current buffer is empty."
- (when (= 0 (buffer-size)) t))
-
(defun org-remark-region-or-word ()
"Return beg and end of the active region or of the word at point.
It is meant to be used within `interactive' in place for \"r\"