emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/denote d13bb705ff 10/12: Make denote-directory-subdirec


From: ELPA Syncer
Subject: [elpa] externals/denote d13bb705ff 10/12: Make denote-directory-subdirectories public
Date: Wed, 14 Sep 2022 05:57:40 -0400 (EDT)

branch: externals/denote
commit d13bb705ff03514587fff8e2562e54bdf1e8f27e
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Make denote-directory-subdirectories public
    
    We are working towards version 1.0.0.  The idea is to provide functions
    that users/developers can rely on.  By making them public (removing the
    double hyphens) we signify that those forms are (i) in a stable
    state, and (ii) any change to them will be handled with care and
    documented accordingly.
---
 README.org |  4 ++++
 denote.el  | 25 +++++++++++++++----------
 2 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index a801d03f3d..c6eee8896f 100644
--- a/README.org
+++ b/README.org
@@ -2038,6 +2038,10 @@ might change them without further notice.
   ~denote-file-type~.  Remember that the ~denote-directory~ accepts a
   directory-local value ([[#h:15719799-a5ff-4e9a-9f10-4ca03ef8f6c5][Maintain 
separate directories for notes]]).
 
++ ~denote-directory-subdirectories~ :: Return list of subdirectories in
+  variable ~denote-directory~.  Note that the ~denote-directory~ accepts
+  a directory-local value ([[#h:15719799-a5ff-4e9a-9f10-4ca03ef8f6c5][Maintain 
separate directories for notes]]).
+
 + ~denote-directory-files-matching-regexp~ :: Return list of files
   matching =REGEXP= in ~denote-directory-files~.
 
diff --git a/denote.el b/denote.el
index 24d82ff798..1f2392b1e2 100644
--- a/denote.el
+++ b/denote.el
@@ -569,6 +569,20 @@ value, as explained in its doc string."
   'denote-directory-files
   "1.0.0")
 
+(defun denote-directory-subdirectories ()
+  "Return list of subdirectories in variable `denote-directory'."
+  (seq-remove
+   (lambda (filename)
+     (or (not (file-directory-p filename))
+         (string-match-p "\\`\\." 
(denote-get-file-name-relative-to-denote-directory filename))
+         (string-match-p "/\\." 
(denote-get-file-name-relative-to-denote-directory filename))))
+   (directory-files-recursively (denote-directory) ".*" t t)))
+
+(define-obsolete-function-alias
+  'denote--subdirs
+  'denote-directory-subdirectories
+  "1.0.0")
+
 (defun denote-get-path-by-id (id)
   "Return absolute path of ID string in `denote-directory-files'."
   (seq-find
@@ -1220,15 +1234,6 @@ where the former does not read dates without a time 
component."
   'denote-barf-duplicate-id
   "1.0.0")
 
-(defun denote--subdirs ()
-  "Return list of subdirectories in variable `denote-directory'."
-  (seq-remove
-   (lambda (filename)
-     (or (not (file-directory-p filename))
-         (string-match-p "\\`\\." 
(denote-get-file-name-relative-to-denote-directory filename))
-         (string-match-p "/\\." 
(denote-get-file-name-relative-to-denote-directory filename))))
-   (directory-files-recursively (denote-directory) ".*" t t)))
-
 ;;;;; The `denote' command and its prompts
 
 ;;;###autoload
@@ -1372,7 +1377,7 @@ Use Org's more advanced date selection utility if the 
user option
 The table uses the `file' completion category (so it works with
 packages such as `marginalia' and `embark')."
   (let* ((root (directory-file-name (denote-directory)))
-         (subdirs (denote--subdirs))
+         (subdirs (denote-directory-subdirectories))
          (dirs (push root subdirs)))
     (denote--subdirs-completion-table dirs)))
 



reply via email to

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