[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 2b1e19ad22 5/7: Move denote-file-name-letter-cas
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 2b1e19ad22 5/7: Move denote-file-name-letter-casing further up and add :info link |
Date: |
Fri, 13 Oct 2023 06:57:55 -0400 (EDT) |
branch: externals/denote
commit 2b1e19ad224198aacfddc0d2a49a4103b87436cf
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Move denote-file-name-letter-casing further up and add :info link
---
denote.el | 87 ++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 44 insertions(+), 43 deletions(-)
diff --git a/denote.el b/denote.el
index d6fe6c2b00..77648e7a66 100644
--- a/denote.el
+++ b/denote.el
@@ -491,6 +491,50 @@ and `denote-link-after-creating-with-command'."
:link '(info-link "(denote) Choose which commands to prompt for")
:type '(repeat symbol))
+(defcustom denote-file-name-letter-casing
+ '((title . downcase)
+ (signature . downcase)
+ (keywords . downcase)
+ (t . downcase))
+ "Specify the method Denote uses to affect the letter casing of file names.
+
+The value is an alist where each element is a cons cell of the
+form (COMPONENT . METHOD).
+
+- The COMPONENT is an unquoted symbol among `title', `signature',
+ `keywords', which refer to the corresponding component of the
+ file name. The special t COMPONENT is a fallback value in case
+ the others are not specified.
+
+- The METHOD is the letter casing scheme, which is an unquoted
+ symbol of either `downcase' or `verbatim'. A nil value has the
+ same meaning as `downcase'. Other non-nil METHOD types are
+ reserved for possible future use.
+
+ The `downcase' METHOD converts user input for the given
+ COMPONENT into lower case. The benefit of this approach (which
+ is the default behaviour) is that file names remain consistent
+ over the long-term. The user never needs to account for
+ varying letter casing while working with them.
+
+ The `verbatim' METHOD means that Denote will not affect the
+ letter casing of user input when generating the given file name
+ COMPONENT. As such, conventions like CamelCase or camelCase
+ are respected. The user thus assumes responsibility to keep
+ file names in a good state over the long term."
+ :group 'denote
+ :type '(alist
+ :key (choice :tag "File name component"
+ (const :tag "The --TITLE component of the file name"
title)
+ (const :tag "The ==SIGNATURE component of the file
name" signature)
+ (const :tag "The __KEYWORDS component of the file name"
keywords)
+ (const :tag "Fallback for any unspecified file name
component" t))
+ :value (choice :tag "Letter casing method"
+ (const :tag "Downcase file names (default)" downcase)
+ (const :tag "Accept file name inputs verbatim"
verbatim)))
+ :link '(info-link "(denote) Contol the letter casing of file names")
+ :package-version '(denote . "2.1.0"))
+
;;;; Main variables
;; For character classes, evaluate: (info "(elisp) Char Classes")
@@ -588,49 +632,6 @@ leading and trailing hyphen."
"-\\{2,\\}" "-"
(replace-regexp-in-string "_\\|\s+" "-" str))))
-(defcustom denote-file-name-letter-casing
- '((title . downcase)
- (signature . downcase)
- (keywords . downcase)
- (t . downcase))
- "Specify the method Denote uses to affect the letter casing of file names.
-
-The value is an alist where each element is a cons cell of the
-form (COMPONENT . METHOD).
-
-- The COMPONENT is an unquoted symbol among `title', `signature',
- `keywords', which refer to the corresponding component of the
- file name. The special t COMPONENT is a fallback value in case
- the others are not specified.
-
-- The METHOD is the letter casing scheme, which is an unquoted
- symbol of either `downcase' or `verbatim'. A nil value has the
- same meaning as `downcase'. Other non-nil METHOD types are
- reserved for possible future use.
-
- The `downcase' METHOD converts user input for the given
- COMPONENT into lower case. The benefit of this approach (which
- is the default behaviour) is that file names remain consistent
- over the long-term. The user never needs to account for
- varying letter casing while working with them.
-
- The `verbatim' METHOD means that Denote will not affect the
- letter casing of user input when generating the given file name
- COMPONENT. As such, conventions like CamelCase or camelCase
- are respected. The user thus assumes responsibility to keep
- file names in a good state over the long term."
- :group 'denote
- :type '(alist
- :key (choice :tag "File name component"
- (const :tag "The --TITLE component of the file name"
title)
- (const :tag "The ==SIGNATURE component of the file
name" signature)
- (const :tag "The __KEYWORDS component of the file name"
keywords)
- (const :tag "Fallback for any unspecified file name
component" t))
- :value (choice :tag "Letter casing method"
- (const :tag "Downcase file names (default)" downcase)
- (const :tag "Accept file name inputs verbatim"
verbatim)))
- :package-version '(denote . "2.1.0"))
-
(defun denote-letter-case (component args)
"Apply letter casing specified by COMPONENT to ARGS.
COMPONENT is a symbol representing a file name component, as
- [elpa] externals/denote updated (a820e94081 -> b954ade554), ELPA Syncer, 2023/10/13
- [elpa] externals/denote 33afae3d87 2/7: Fix version number in two obsolete calls, ELPA Syncer, 2023/10/13
- [elpa] externals/denote b954ade554 7/7: Fix typo in the manual, ELPA Syncer, 2023/10/13
- [elpa] externals/denote 4026e574eb 1/7: REMOVE deprecation notices that were about older Denote versions, ELPA Syncer, 2023/10/13
- [elpa] externals/denote 2b1e19ad22 5/7: Move denote-file-name-letter-casing further up and add :info link,
ELPA Syncer <=
- [elpa] externals/denote eba5cd4c35 3/7: Make denote-commands-for-new-notes a user option, ELPA Syncer, 2023/10/13
- [elpa] externals/denote 86493c565e 4/7: Add :info link to denote-region-after-new-note-functions, ELPA Syncer, 2023/10/13
- [elpa] externals/denote 8d489a33fe 6/7: BREAKING: Deprecate denote-allow-multi-word-keywords; use denote-file-name-letter-casing, ELPA Syncer, 2023/10/13