[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org fa3c9c8 05/41: lisp/org-id.el: Small enhancements
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org fa3c9c8 05/41: lisp/org-id.el: Small enhancements |
Date: |
Sun, 16 May 2021 04:57:15 -0400 (EDT) |
branch: externals/org
commit fa3c9c8b69488858ee3eb776980f0add5ed70435
Author: Bastien <bzg@gnu.org>
Commit: Bastien <bzg@gnu.org>
lisp/org-id.el: Small enhancements
* lisp/org-id.el (org-id-locations-load, org-id-add-location):
Update messages.
(org-id-hash-to-alist, org-id-paste-tracker, org-id-find-id-file):
Docstring minor enhancements.
(org-id-new): Tiny refactoring.
---
lisp/org-id.el | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/lisp/org-id.el b/lisp/org-id.el
index c3d274d..784f41c 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -382,17 +382,15 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
(setq unique (org-id-uuid))))
((eq org-id-method 'org)
(let* ((etime (org-reverse-string (org-id-time-to-b36)))
- (postfix (if org-id-include-domain
- (progn
- (require 'message)
- (concat "@" (message-make-fqdn))))))
+ (postfix (when org-id-include-domain
+ (require 'message)
+ (concat "@" (message-make-fqdn)))))
(setq unique (concat etime postfix))))
((eq org-id-method 'ts)
(let ((ts (format-time-string org-id-ts-format))
- (postfix (if org-id-include-domain
- (progn
- (require 'message)
- (concat "@" (message-make-fqdn))))))
+ (postfix (when org-id-include-domain
+ (require 'message)
+ (concat "@" (message-make-fqdn)))))
(setq unique (concat ts postfix))))
(t (error "Invalid `org-id-method'")))
(concat prefix unique)))
@@ -591,7 +589,7 @@ When FILES is given, scan also these files."
(setf (car item) (expand-file-name (car item) loc))))
org-id-locations)))
(error
- (message "Could not read org-id-values from %s. Setting it to nil."
+ (message "Could not read `org-id-values' from %s, setting it to nil"
org-id-locations-file))))
(setq org-id-files (mapcar 'car org-id-locations))
(setq org-id-locations (org-id-alist-to-hash org-id-locations))))
@@ -600,7 +598,7 @@ When FILES is given, scan also these files."
"Add the ID with location FILE to the database of ID locations."
;; Only if global tracking is on, and when the buffer has a file
(unless file
- (error "bug: org-id-get expects a file-visiting buffer"))
+ (error "`org-id-get' expects a file-visiting buffer"))
(let ((afile (abbreviate-file-name file)))
(when (and org-id-track-globally id)
(unless org-id-locations (org-id-locations-load))
@@ -612,7 +610,8 @@ When FILES is given, scan also these files."
(add-hook 'kill-emacs-hook 'org-id-locations-save))
(defun org-id-hash-to-alist (hash)
- "Turn an org-id hash into an alist, so that it can be written to a file."
+ "Turn an org-id hash into an alist.
+This is to be able to write it to a file."
(let (res x)
(maphash
(lambda (k v)
@@ -636,7 +635,7 @@ When FILES is given, scan also these files."
res))
(defun org-id-paste-tracker (txt &optional buffer-or-file)
- "Update any IDs in TXT and assign BUFFER-OR-FILE to them."
+ "Update any ids in TXT and assign BUFFER-OR-FILE to them."
(when org-id-track-globally
(save-match-data
(setq buffer-or-file (or buffer-or-file (current-buffer)))
@@ -655,7 +654,7 @@ When FILES is given, scan also these files."
;;;###autoload
(defun org-id-find-id-file (id)
- "Query the id database for the file in which this ID is located."
+ "Query the id database for the file in which ID is located."
(unless org-id-locations (org-id-locations-load))
(or (and org-id-locations
(hash-table-p org-id-locations)
- [elpa] externals/org updated (e444181 -> 70d98b5), ELPA Syncer, 2021/05/16
- [elpa] externals/org dcb6013 02/41: agenda: Fix org-duration-to-minutes error (take 2), ELPA Syncer, 2021/05/16
- [elpa] externals/org 0e39bf8 03/41: Throw user errors when trying to drag inline tasks, ELPA Syncer, 2021/05/16
- [elpa] externals/org 3581f37 04/41: CONTRIBUTE: Small enhancements, ELPA Syncer, 2021/05/16
- [elpa] externals/org fa3c9c8 05/41: lisp/org-id.el: Small enhancements,
ELPA Syncer <=
- [elpa] externals/org 90a9ee1 08/41: lisp/org-agenda.el: Fix bug in `org-agenda-highlight-todo', ELPA Syncer, 2021/05/16
- [elpa] externals/org f318cd6 14/41: Fix test-org-element/cache "Preserve local structures when re-parenting.", ELPA Syncer, 2021/05/16
- [elpa] externals/org f00ad09 10/41: org-refile.el: Fix the case of emtpy buffer name, ELPA Syncer, 2021/05/16
- [elpa] externals/org 7dcb1af 11/41: Improve org-link-plain-re, ELPA Syncer, 2021/05/16
- [elpa] externals/org bfda3cc 13/41: lisp/org.el: Don't let RET indent in source code blocks, ELPA Syncer, 2021/05/16
- [elpa] externals/org 24473b5 15/41: lisp/org.el: Use "[BUG]" instead of "Bug:" for bug reports, ELPA Syncer, 2021/05/16
- [elpa] externals/org 8531bb6 09/41: lisp/org.el: Minor aesthetic clean-up, ELPA Syncer, 2021/05/16
- [elpa] externals/org 88fbe21 01/41: Add Luc Pellissier as maintainer for two ob-* files, ELPA Syncer, 2021/05/16
- [elpa] externals/org dd88356 06/41: lisp/org-inlinetask.el: Silent the byte-compiler, ELPA Syncer, 2021/05/16
- [elpa] externals/org 5a0f6c9 07/41: lisp/ox-md.el: Mark some arguments as unused, ELPA Syncer, 2021/05/16