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

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

[elpa] externals/denote 996b71dfd9 3/4: Provide 'day' option for denote-


From: ELPA Syncer
Subject: [elpa] externals/denote 996b71dfd9 3/4: Provide 'day' option for denote-journal-extras-title-format
Date: Thu, 12 Oct 2023 00:57:56 -0400 (EDT)

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

    Provide 'day' option for denote-journal-extras-title-format
---
 README.org               | 21 ++++++++++++++++++---
 denote-journal-extras.el |  5 +++++
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index c284dcc885..0679999f35 100644
--- a/README.org
+++ b/README.org
@@ -2286,9 +2286,24 @@ the ~denote-journal-extras-keyword~ 
([[#h:1a953736-86c2-420b-b566-fb22c97df197][
 Furthermore, the command ~denote-journal-extras-new-entry~ will use
 the current date as the title of the new entry.  The exact format is
 controlled by the user option ~denote-journal-extras-title-format~.
-Refer to its documentation for the available formats.  If the value of
-this user option is ~nil~, then ~denote-journal-extras-new-entry~ will
-prompt for a title.
+Acceptable values for ~denote-journal-extras-title-format~ and their
+corresponding styles are:
+
+| Symbol                  | Style                             |
+|-------------------------+-----------------------------------|
+| day                     | Monday                            |
+| day-date-month-year     | Monday 19 September 2023          |
+| day-date-month-year-24h | Monday 19 September 2023 20:49    |
+| day-date-month-year-12h | Monday 19 September 2023 08:49 PM |
+
+For example:
+
+#+begin_src emacs-lisp
+(setq denote-journal-extras-title-format 'day-date-month-year)
+#+end_src
+
+If the value of this user option is ~nil~, then
+~denote-journal-extras-new-entry~ will prompt for a title.
 
 In terms of workflow, using the current date as the title is better
 for maintaining a daily journal.  A prompt for an arbitrary title is
diff --git a/denote-journal-extras.el b/denote-journal-extras.el
index c8665f7c9e..6531b33dad 100644
--- a/denote-journal-extras.el
+++ b/denote-journal-extras.el
@@ -69,6 +69,7 @@ Acceptable symbols and their corresponding styles are:
 
 | Symbol                  | Style                             |
 |-------------------------+-----------------------------------|
+| day                     | Monday                            |
 | day-date-month-year     | Monday 19 September 2023          |
 | day-date-month-year-24h | Monday 19 September 2023 20:49    |
 | day-date-month-year-12h | Monday 19 September 2023 08:49 PM |
@@ -78,6 +79,9 @@ for a title."
   :group 'denote-journal-extras
   :type '(choice
           (const :tag "Prompt for title with 
`denote-journal-extras-new-entry'" nil)
+          (const :tag "Monday"
+                 :doc "The `format-time-string' is: %A"
+                 day)
           (const :tag "Monday 19 September 2023"
                  :doc "The `format-time-string' is: %A %e %B %Y"
                  day-date-month-year)
@@ -112,6 +116,7 @@ journal entry (refer to the `tmr' package on GNU ELPA)."
    ((symbolp denote-journal-extras-title-format)
     (format-time-string
      (pcase denote-journal-extras-title-format
+       ('day "%A")
        ('day-date-month-year "%A %e %B %Y")
        ('day-date-month-year-24h "%A %e %B %Y %H:%M")
        ('day-date-month-year-12h "%A %e %B %Y %I:%M %^p"))))



reply via email to

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