[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 9012433549 5/6: chg: org-remark-source-file-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 9012433549 5/6: chg: org-remark-source-file-name and org-remark-source-get-file-name |
Date: |
Sat, 5 Feb 2022 07:57:43 -0500 (EST) |
branch: externals/org-remark
commit 90124335498cfeccdbcdaa13b7b623bfc23a42ea
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
chg: org-remark-source-file-name and org-remark-source-get-file-name
User option changed:
from org-remark-source-file-name-function
to org-remark-source-file-name
This is to align with anothger user option: org-remark-notes-file-name
---
NEWS | 33 ++++++++++++++++++++++++++++++++-
org-remark.el | 14 +++++++-------
2 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index 270e22c9d9..016d4bb020 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,40 @@
Current development version
+ - chg: align with GNU convention: path -> file name
+
+ Regarding user option `org-remark-notes-file-path`, the GNU convention
+ is to call this a "file name" rather than a "path"; "path" is only used
+ for lists of directories as in `load-path` (pointed out by Stefan
+ Monnier; thank you).
+
+ To align with the GNU convention, the following changes are done.
Users
+ should not have to change their existing customization as the old names
+ are aliased to the new ones.
+
+ User option:
+ - org-remark-notes-file-path -> org-remark-notes-file-name
+ - org-remark-source-path-function -> 'org-remark-source-file-name
+
+ Function:
+ - org-remark-notes-file-path-function ->
org-remark-notes-file-name-function
+
+ Private Function:
+ - org-remark-notes-get-file-path -> org-remark-notes-get-file-name
+
+ `org-remark-notes-file-path`, `org-remark-source-path-function`, and
+ `org-remark-notes-file-path-function` are used by existing
+ customization, thus both explicitly made obsolete and aliased to the
new
+ file-name equivalents.
+
+ - fix: Relative file name of the source file in the notes file
+
+ The relative file name of the source was not relative from the
marginal notes
+ file but from the source file itself -- this should be relative from
the
+ marginal notes.
- chg: `org-remark-global-tracking-mode' has been simplified.
This is not expected to break the user's workflow or configuration
- -- simply removing a superfluous feature.
+ -- simply removing a superfluous feature.
.org-remark-tracking file is no longer necessary and can be safely
deleted from the user's Emacs configuraiton directory if present.
diff --git a/org-remark.el b/org-remark.el
index f5e5649d47..5413a15962 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -78,7 +78,7 @@ for more detail and expected elements of the list."
buffer with this name."
:type 'string)
-(defcustom org-remark-source-file-name-function #'file-relative-name
+(defcustom org-remark-source-file-name #'file-relative-name
"Function that return the file name to point back at the source file.
The function is called with a single argument: the absolute path
@@ -94,10 +94,10 @@ file will be relative to it."
(function :tag "Other function")))
(defvaralias
- 'org-remark-source-path-function 'org-remark-source-file-name-function)
+ 'org-remark-source-path-function 'org-remark-source-file-name)
(make-obsolete-variable
- 'org-remark-source-path-function 'org-remark-source-file-name-function
"0.2.0")
+ 'org-remark-source-path-function 'org-remark-source-file-name "0.2.0")
(defcustom org-remark-use-org-id nil
"Define if Org-remark use Org-ID to link back to the main note."
@@ -747,7 +747,7 @@ 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."
- (let* ((filename (org-remark-source-file-name filename))
+ (let* ((filename (org-remark-source-get-file-name filename))
(id (plist-get props 'org-remark-id))
(text (org-with-wide-buffer (buffer-substring-no-properties beg end)))
(orgid (org-remark-highlight-get-org-id beg))
@@ -933,7 +933,7 @@ The file name is returned by
`org-remark-notes-get-file-name'.
Each highlight is a list in the following structure:
(ID (BEG . END) LABEL)"
(when-let ((notes-buf (find-file-noselect (org-remark-notes-get-file-name)))
- (source-file-name (org-remark-source-file-name
(buffer-file-name))))
+ (source-file-name (org-remark-source-get-file-name
(buffer-file-name))))
;; TODO check if there is any relevant notes for the current file
;; This can be used for adding icon to the highlight
(let ((highlights))
@@ -1065,7 +1065,7 @@ Case 2. The overlay points to no buffer
;;;;; Other utilities
-(defun org-remark-source-file-name (filename)
+(defun org-remark-source-get-file-name (filename)
"Convert FILENAME either to absolute or relative for marginal notes files.
Returns the standardized filename.
@@ -1074,7 +1074,7 @@ The current buffer is assumed to be visiting the source
file.
FILENAME should be an absolute file name of the source file."
;; Get the default-directory of the notes
(with-current-buffer (find-file-noselect (org-remark-notes-get-file-name))
- (funcall org-remark-source-file-name-function filename)))
+ (funcall org-remark-source-file-name filename)))
(defun org-remark-region-or-word ()
"Return beg and end of the active region or of the word at point.
- [elpa] externals/org-remark updated (916924ad29 -> d1230de80f), ELPA Syncer, 2022/02/05
- [elpa] externals/org-remark e58c6ae139 1/6: chg: var/func names to align with GNU convention: path -> file name, ELPA Syncer, 2022/02/05
- [elpa] externals/org-remark 871531decb 2/6: chg: align with GNU convention: path -> file name, ELPA Syncer, 2022/02/05
- [elpa] externals/org-remark 42b77e896b 3/6: fix: Relative file name of the source file in the notes file, ELPA Syncer, 2022/02/05
- [elpa] externals/org-remark 23c038138e 4/6: docs: docstrings spell-checked via checkdoc, ELPA Syncer, 2022/02/05
- [elpa] externals/org-remark d1230de80f 6/6: docs: minior style update to NEWS, ELPA Syncer, 2022/02/05
- [elpa] externals/org-remark 9012433549 5/6: chg: org-remark-source-file-name and org-remark-source-get-file-name,
ELPA Syncer <=