[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote-menu 8a490728de 10/15: Change tone of doc string
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote-menu 8a490728de 10/15: Change tone of doc strings |
Date: |
Thu, 9 Mar 2023 11:00:07 -0500 (EST) |
branch: externals/denote-menu
commit 8a490728de763c5b5a2a9c905b92d5eda5203755
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Change tone of doc strings
---
denote-menu.el | 56 +++++++++++++++++++++++++-------------------------------
1 file changed, 25 insertions(+), 31 deletions(-)
diff --git a/denote-menu.el b/denote-menu.el
index fcf1bf60d8..cd363a025f 100644
--- a/denote-menu.el
+++ b/denote-menu.el
@@ -56,8 +56,7 @@ denote file corresponding to the button."
:group 'denote-menu)
(defcustom denote-menu-initial-regex "."
- "A regex that is used to initially populate the buffer with
-matching denote files."
+ "Regex used to initially populate the buffer with matching denote files."
:type 'string
:group 'denote-menu)
@@ -66,8 +65,7 @@ matching denote files."
;;;###autoload
(defun denote-menu-list-notes ()
- "Displays a list of the denote files located in
-`denote-directory'."
+ "Display list of Denote files in variable `denote-directory'."
(interactive)
(let ((buffer (get-buffer-create "*Denote*")))
(with-current-buffer buffer
@@ -103,16 +101,14 @@ list entry following the defined form. Then updates the
buffer."
(revert-buffer))
(defun denote-menu--entries-to-filenames ()
- "Returns a list of the file names of the Denote files currenty
- presented in the *Denote* buffer."
+ "Return list of file names present in the *Denote* buffer."
(mapcar (lambda (entry)
(let ((id (car entry)))
(file-name-nondirectory (denote-get-path-by-id id))))
(funcall tabulated-list-entries)))
(defun denote-menu--entries-to-paths ()
- "Returns a list of the file paths of the Denote files currenty
- presented in the *Denote* buffer."
+ "Return list of file paths present in the *Denote* buffer."
(mapcar (lambda (entry)
(let ((id (car entry)))
(denote-menu-get-path-by-id id)))
@@ -131,8 +127,7 @@ list entry following the defined form. Then updates the
buffer."
(seq-filter (lambda (f) (string-match-p regexp f)) files))
(defun denote-menu--path-to-entry (path)
- "Converts a denote file PATH to an entry matching the form of
-`tabulated-list-entries'."
+ "Convert PATH to an entry matching the form of `tabulated-list-entries'."
`(,(denote-retrieve-filename-identifier path)
[(,(denote-menu-date path) . (action ,(lambda (button) (funcall
denote-menu-action path))))
,(denote-menu-title path)
@@ -152,45 +147,44 @@ list entry following the defined form. Then updates the
buffer."
(format "%s-%s-%s %s:%s" year month day hour seconds)))
(defun denote-menu-title (path)
- "If the denote file PATH has no title, returns the string \"(No
-Title)\". Otherwise returns the path's title. Determines whether
-a denote file has a title based on the following rule derived from the file
naming scheme:
+ "Return title of PATH.
+If the denote file PATH has no title, return the string \"(No
+Title)\". Otherwise return PATH's title.
+
+Determine whether a denote file has a title based on the
+following rule derived from the file naming scheme:
1. If the path does not have a \"--\", it has no title."
(if (or (not (string-match-p "--" path)))
(propertize "(No Title)" 'face 'font-lock-comment-face)
(denote-retrieve-filename-title path)))
-(defun denote-menu-filter ()
- "Prompts for a regex and filters the `tabulated-list-entries' with
-denote files that match and reverts the *Denotes* buffer to
-reflect the
-changes."
- (interactive)
- (setq denote-menu-current-regex (read-regexp "Filter regex: "))
+(defun denote-menu-filter (regexp)
+ "Filter `tabulated-list-entries' matching REGEXP.
+When called interactively, prompt for REGEXP.
+
+Revert the *Denotes* buffer to include only the matching entries."
+ (interactive (list (read-regexp "Filter regex: ")))
+ (setq denote-menu-current-regex regexp)
(denote-menu-update-entries))
-(defun denote-menu-filter-by-keyword ()
- "Prompts for keywords and filters the list for denote files tagged
-with the input keywords."
- (interactive)
- (let* ((keywords (denote-keywords-prompt))
- (regex (concat "\\(" (mapconcat (lambda (keyword) (format "_%s"
keyword)) keywords "\\|") "\\)")))
+(defun denote-menu-filter-by-keyword (keywords)
+ "Prompt for KEYWORDS and filters the list accordingly.
+When called from Lisp, KEYWORDS is a list of strings."
+ (interactive (list (denote-keywords-prompt)))
+ (let ((regex (concat "\\(" (mapconcat (lambda (keyword) (format "_%s"
keyword)) keywords "\\|") "\\)")))
(setq denote-menu-current-regex regex)
(denote-menu-update-entries)))
(defun denote-menu-clear-filters ()
- "Resets `denote-menu-current-regex' to be
-`denote-menu-initial-regex' and updates the list."
+ "Reset filters to `denote-menu-initial-regex' and update buffer."
(interactive)
(setq denote-menu-current-regex denote-menu-initial-regex)
(setq tabulated-list-entries nil)
(denote-menu-update-entries) )
(defun denote-menu-export-to-dired ()
- "Switches to a dired buffer showing `denote-directory' with the
-currently displayed denote
-files marked."
+ "Switch to variable `denote-directory' and mark filtered *Denotes* files."
(interactive)
(let ((files-to-mark (denote-menu--entries-to-filenames)))
(dired denote-directory)
- [elpa] branch externals/denote-menu created (now c9cb089bfa), ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu 05d6d38ee1 02/15: README, screenshots, and fixes, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu 52ebd5eae4 04/15: fix custom filter example, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu 7ca56a3cfe 05/15: remove copyright and screenshot, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu aa92fc2f98 06/15: fix screenshot, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu d8121e610c 09/15: Make 'list-denotes' alias of 'denote-menu-list-notes', ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu f901a2dba5 08/15: fix denote get path by id, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu 5bc393e6d2 03/15: README typo, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu 8a490728de 10/15: Change tone of doc strings,
ELPA Syncer <=
- [elpa] externals/denote-menu f73afbdacb 13/15: fix list-denotes alias and typo in README, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu 3bd7cf7d12 01/15: initial commit, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu 6a2cde289b 07/15: add denote requirement, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu 4a1bbb38f8 11/15: remove all occurences of `denote-get-path-by-id', ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu b3c33b9fd3 12/15: Merge pull request #1 from protesilaos/master, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu ec8349a77a 14/15: added commentary, ELPA Syncer, 2023/03/09
- [elpa] externals/denote-menu c9cb089bfa 15/15: added new user option and unique ids taking file type, ELPA Syncer, 2023/03/09