New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keywords with hyphens get squeezed #184
Comments
In short, you have to follow some convention that control the letter
casing of individual words to make them readable, while keeping them
part of the same keyword. Using the new user option we provide:
(setq denote-file-name-letter-casing
'((title . downcase)
(signature . downcase)
(keywords . verbatim) ; notice the `verbatim' here
(t . downcase)))
With this in place, typing something like 'camelCase' at the keywords
prompt will insert that as-is and treat as a single keyword.
I am clarifying the documentation here as part of the process of
introducing the new 'denote-file-name-letter-casing' option. I do it
in response to the question raised by Peter Smith in issue 184 on the
GitHub mirror: <#184>.
|
Hello @psmith1303! We used to provide an option called To achieve what you want, you have to (i) use the new user option (ii) set it up so that it accepts your input for keywords verbatim, and (iii) rely on a letter casing convention to separate the constituent words of a keyword, like (setq denote-file-name-letter-casing
'((title . downcase)
(signature . downcase)
(keywords . verbatim) ; notice the `verbatim' here
(t . downcase))) |
|
Thanks Prot. I'll do that then. |
|
From: Peter Smith ***@***.***>
Date: Tue, 31 Oct 2023 13:09:55 -0700
Thanks Prot. I'll do that then.
You are welcome! Please let me know if you need anything.
…--
Protesilaos Stavrou
https://protesilaos.com
|
|
Here's a few lisp lines I've been using for several months now to make hyphens work in keywords again: (defun fixed-denote-sluggify-keyword (keyword)
(denote-sluggify keyword 'keywords))
(defun fixed-denote-sluggify-keywords (keywords)
(mapcar 'fixed-denote-sluggify-keyword keywords))
(advice-add 'denote-sluggify-keywords
:override 'fixed-denote-sluggify-keywords)If Org mode can't handle dashes in Denote keywords, that sounds like Org's problem. I don't use Org mode and I refuse to let its limitations be my problem. |
The manual says, "Keywords should not have spaces or other delimiters. If they do, they are converted into hyphens."
Super, that's perfect for me. I like keywords such as "strategy-as-practice".
I'm using Denote 2.0.0, and whenever I use such a keyword, it gets 'squeezed' to "strategyaspractice".
Alas, my ability in elisp isn't up to debugging this problem ... and hints or suggestions would be appreciated.
The text was updated successfully, but these errors were encountered: