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

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

[elpa] externals/denote 841af5baaa 2/3: Rephrase the doc string of denot


From: ELPA Syncer
Subject: [elpa] externals/denote 841af5baaa 2/3: Rephrase the doc string of denote-filetype-heuristics
Date: Wed, 13 Mar 2024 06:58:04 -0400 (EDT)

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

    Rephrase the doc string of denote-filetype-heuristics
---
 README.org | 15 ++++++++-------
 denote.el  | 16 ++++++++--------
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/README.org b/README.org
index 30575e0805..24b6e33939 100644
--- a/README.org
+++ b/README.org
@@ -4199,15 +4199,16 @@ might change them without further notice.
 
 #+findex: denote-filetype-heuristics
 + Function ~denote-filetype-heuristics~ :: Return likely file type of
-  =FILE=.  Use the file extension to detect the file type of the file.
+  =FILE=. If in the process of ~org-capture~, consider the file type to
+  be that of Org. Otherwise, use the file extension to detect the file
+  type of =FILE=.
 
-  If more than one file type correspond to this file extension, use the
-  first file type for which the key-title-kegexp matches in the file or,
-  if none matches, use the first type with this file extension in
-  ~denote-file-type~.
+  If more than one file type correspond to this file extension, use
+  the first file type for which the :title-key-regexp in
+  ~denote-file-types~ matches in the file.
 
-  If no file types in ~denote-file-types~ has the file extension, the
-  file type is assumed to be the first of ~denote-file-types~.
+  If no file type in ~denote-file-types~ has the file extension, the
+  file type is assumed to be the first one in ~denote-file-types~.
 
 #+findex: denote-format-file-name
 + Function ~denote-format-file-name~ :: Format file name. =DIR-PATH=,
diff --git a/denote.el b/denote.el
index a2f48c17a9..43e21aa37a 100644
--- a/denote.el
+++ b/denote.el
@@ -2505,20 +2505,20 @@ See the format of `denote-file-types'."
 
 (defun denote-filetype-heuristics (file)
   "Return likely file type of FILE.
-Use the file extension to detect the file type of the file.
+If in the process of `org-capture', consider the file type to be that of
+Org.  Otherwise, use the file extension to detect the file type of FILE.
 
-If more than one file type correspond to this file extension, use
-the first file type for which the key-title-kegexp matches in the
-file or, if none matches, use the first type with this file
-extension in `denote-file-type'.
+If more than one file type correspond to this file extension, use the
+first file type for which the :title-key-regexp in `denote-file-types'
+matches in the file.
 
-If no file types in `denote-file-types' has the file extension,
-the file type is assumed to be the first of `denote-file-types'."
+If no file type in `denote-file-types' has the file extension,
+the file type is assumed to be the first one in `denote-file-types'."
   (if (denote--file-type-org-capture-p)
       'org
     (let* ((extension (denote-get-file-extension-sans-encryption file))
            (types (denote--file-types-with-extension extension)))
-      (cond ((not types)
+      (cond ((null types)
              (caar denote-file-types))
             ((= (length types) 1)
              (caar types))



reply via email to

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