Keep a single configuration block for denote
This is a gotcha of elpaca, it only allows you to specify one use-package block for a single recipe. The last one was taking precedence in our case.
This commit is contained in:
parent
315bea5400
commit
baa0fc9e2b
2 changed files with 117 additions and 126 deletions
|
@ -5263,6 +5263,9 @@ Prot is the developer and maintainer of this package.
|
|||
;; `org-mode-map', `markdown-mode-map', and/or `text-mode-map'.
|
||||
("C-c d j" . denote-journal-extras-new-entry)
|
||||
("C-c d s" . denote-sort-dired)
|
||||
;; Bindings to personal functions (defined below)
|
||||
("C-c d p m" . vedang/denote-publishing-extras-new-microblog-entry)
|
||||
("C-c d p b" . vedang/denote-publishing-extras-new-blog-entry)
|
||||
:map text-mode-map
|
||||
("C-c d B" . denote-backlinks)
|
||||
("C-c d b" . denote-find-backlink)
|
||||
|
@ -5333,7 +5336,7 @@ Prot is the developer and maintainer of this package.
|
|||
,#+filetags: %3$s
|
||||
,#+date: %2$s
|
||||
,#+identifier: %4$s
|
||||
\n"))
|
||||
\n")
|
||||
|
||||
(defun vedang/denote-publishing-extras-new-blog-entry (&optional date)
|
||||
"Create a new blog entry.
|
||||
|
@ -5424,15 +5427,8 @@ Prot is the developer and maintainer of this package.
|
|||
Perform the comparison with `string<'."
|
||||
(string< (vedang/denote--pad-sig sig1) (vedang/denote--pad-sig sig2)))
|
||||
|
||||
(use-package denote
|
||||
:ensure t
|
||||
:bind
|
||||
( :map global-map
|
||||
;; Bindings to personal functions (defined above)
|
||||
("C-c d p m" . vedang/denote-publishing-extras-new-microblog-entry)
|
||||
("C-c d p b" . vedang/denote-publishing-extras-new-blog-entry))
|
||||
:config
|
||||
(setq denote-sort-signature-comparison-function #'vedang/denote-sort-for-signatures))
|
||||
|
||||
#+end_src
|
||||
|
||||
*** The =unravel-study.el= integration between Consult and Denote (~consult-denote~)
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
;; `org-mode-map', `markdown-mode-map', and/or `text-mode-map'.
|
||||
("C-c d j" . denote-journal-extras-new-entry)
|
||||
("C-c d s" . denote-sort-dired)
|
||||
;; Bindings to personal functions (defined below)
|
||||
("C-c d p m" . vedang/denote-publishing-extras-new-microblog-entry)
|
||||
("C-c d p b" . vedang/denote-publishing-extras-new-blog-entry)
|
||||
:map text-mode-map
|
||||
("C-c d B" . denote-backlinks)
|
||||
("C-c d b" . denote-find-backlink)
|
||||
|
@ -112,9 +115,9 @@
|
|||
#+filetags: %3$s
|
||||
#+date: %2$s
|
||||
#+identifier: %4$s
|
||||
\n"))
|
||||
\n")
|
||||
|
||||
(defun vedang/denote-publishing-extras-new-blog-entry (&optional date)
|
||||
(defun vedang/denote-publishing-extras-new-blog-entry (&optional date)
|
||||
"Create a new blog entry.
|
||||
|
||||
With optional DATE as a prefix argument, prompt for a date. If
|
||||
|
@ -134,7 +137,7 @@
|
|||
;; See YASnippet
|
||||
"fullblog")))
|
||||
|
||||
(defun vedang/denote-publishing-extras-new-microblog-entry (&optional date)
|
||||
(defun vedang/denote-publishing-extras-new-microblog-entry (&optional date)
|
||||
"Create a new microblog entry.
|
||||
Set the title of the new entry according to the value of the user option
|
||||
`denote-journal-extras-title-format'.
|
||||
|
@ -156,7 +159,7 @@
|
|||
;; See YASnippet
|
||||
"microblog")))
|
||||
|
||||
(defun vedang/denote-link-ol-get-id ()
|
||||
(defun vedang/denote-link-ol-get-id ()
|
||||
"Get the CUSTOM_ID of the current entry.
|
||||
|
||||
If the entry already has a CUSTOM_ID, return it as-is, else create a new
|
||||
|
@ -180,7 +183,7 @@ modifications."
|
|||
(org-entry-put pos "CREATED" created))
|
||||
id))
|
||||
|
||||
(defun vedang/denote--split-luhman-sig (signature)
|
||||
(defun vedang/denote--split-luhman-sig (signature)
|
||||
"Split numbers and letters in Luhmann-style SIGNATURE string."
|
||||
(replace-regexp-in-string
|
||||
"\\([a-zA-Z]+?\\)\\([0-9]\\)" "\\1=\\2"
|
||||
|
@ -188,7 +191,7 @@ modifications."
|
|||
"\\([0-9]+?\\)\\([a-zA-Z]\\)" "\\1=\\2"
|
||||
signature)))
|
||||
|
||||
(defun vedang/denote--pad-sig (signature)
|
||||
(defun vedang/denote--pad-sig (signature)
|
||||
"Create a new signature with padded spaces for all components"
|
||||
(combine-and-quote-strings
|
||||
(mapcar
|
||||
|
@ -197,20 +200,12 @@ modifications."
|
|||
(split-string (vedang/denote--split-luhman-sig signature) "=" t))
|
||||
"="))
|
||||
|
||||
(defun vedang/denote-sort-for-signatures (sig1 sig2)
|
||||
(defun vedang/denote-sort-for-signatures (sig1 sig2)
|
||||
"Return non-nil if SIG1 is smaller that SIG2.
|
||||
|
||||
Perform the comparison with `string<'."
|
||||
(string< (vedang/denote--pad-sig sig1) (vedang/denote--pad-sig sig2)))
|
||||
|
||||
(use-package denote
|
||||
:ensure t
|
||||
:bind
|
||||
( :map global-map
|
||||
;; Bindings to personal functions (defined above)
|
||||
("C-c d p m" . vedang/denote-publishing-extras-new-microblog-entry)
|
||||
("C-c d p b" . vedang/denote-publishing-extras-new-blog-entry))
|
||||
:config
|
||||
(setq denote-sort-signature-comparison-function #'vedang/denote-sort-for-signatures))
|
||||
|
||||
(use-package consult-denote
|
||||
|
|
Loading…
Reference in a new issue