Comments (7)
The summary looks good!
Thank you! Closing now.
from denote.
That means if that some needs a "multiple word keyword", they will
need to writemultiple_word_keyword
when entering it through
M-x denote
interactively. Is that right?
Yes, this is the idea. What I have not done yet, is to forcibly
interpret spaces as underscores. The reason I have not finalised that
part is because I still have doubts if the underscore is the most
appropriate character. I think it is. Any opinion on that?
To put it a different way, spaces are not allowed in keywords. If
that's the case, then printing out those keywords in any front-matter
format (Org, YAML) will be easier to manage.
Indeed!
from denote.
Any opinion on that?
I like to interpret underscores as hyphens, but that's just my opinion. I dislike spaces in things like file names, keywords, etc
from denote.
I am re-opening this, as I think there is scope for change here.
I will make some experiments, but I think we should:
-
Prevent multi-word keywords. They look bad in file names and are generally awkward to use.
-
Configure the
crm-separator
at the KEYWORDS prompt to treat a space, a comma, and a plus sign as a separator. That way we do not get into counter-intuitive situations. Users shouldn't have to read the manual for such a point and get unwanted results that way. -
The underscore is a valuable character that we can use in filenames. In a private exchange, someone explained how
_tag
makes for an easy way to target specific entries directly. I like that approach and will introduce a breaking change so that file names are written thus:DATE--TITLE__KEYWORDS.EXTENSION
. For multiple KEYWORDS, it will look like__tag1_tag2_tag3
so all start with an underscore. -
I ultimately do not like the plus sign in file names. It draws too much attention to itself. Also,
+
is a common regexp character which adds a little bit of inconvenience.
What do you think?
from denote.
Prevent multi-word keywords. They look bad in file names and are generally awkward to use.
.. except that if someone really wants a multi-word keyword, hyphen can be used to separate the keyword parts, but never a space. I agree with the rest of the points below, so _
also cannot be used to separate keyword parts.
Configure the crm-separator at the KEYWORDS prompt to treat a space, a comma, and a plus sign as a separator. That way we do not get into counter-intuitive situations. Users shouldn't have to read the manual for such a point and get unwanted results that way.
Should _
also be added to this? If a user enters "abc_def" at the prompt for entering keywords, they will be read in as 2 keywords.
How about doing this "magic" at the keyword entry prompt? If a user types " " (space), ,
, +
or _
inside that prompt it auto-converts that types character to a consistent keyword separation character.. may be the ,
?
The underscore is a valuable character that we can use in filenames. In a private exchange, someone explained how _tag makes for an easy way to target specific entries directly. I like that approach and will introduce a breaking change so that file names are written thus: DATE--TITLE__KEYWORDS.EXTENSION. For multiple KEYWORDS, it will look like __tag1_tag2_tag3 so all start with an underscore.
I ultimately do not like the plus sign in file names. It draws too much attention to itself. Also, + is a common regexp character which adds a little bit of inconvenience.
Summary: Looks like you and the other user who provided that feedback collectively read my mind.
from denote.
Seems like you have read my mind! [...] Summary: Looks like you and the other user who provided that feedback collectively read my mind.
Haha! That sounds right. I think many of us are on the same wavelength and figure out what the best design is.
.. except that if someone really wants a multi-word keyword, hyphen can be used to separate the keyword parts, but never a space. I agree with the rest of the points below, so
_
also cannot be used to separate keyword parts.
I pushed the changes earlier. Multi-word keywords are separated by a hyphen. Any other character, such as spaces, underscores, the plus sign, is replaced with a hyphen.
Configure the crm-separator at the KEYWORDS
I opted against this. denote
can be used from Lisp (e.g. you can have a wrapper function which let
binds the denote-file-type
) so we want to handle things internally.
To input more than one keyword at the relevant prompt, use the standard crm-separator
which should be the comma.
To recap on what the state of affairs is.
- The file name is
DATE--TITLE__KEYWORDS.EXTENSION
. - Distinct keywords in KEYWORDS are separated by an underscore:
tag1_tag2
. - Multi-word keywords are written with hyphens as in
tag-one
. - So
tag-one_tag-two
is two keywords. - The new design lets us search for
_tag
explicitly. - The
__
delimiter makes it easier to visually identify where the TITLE field ends and the KEYWORDS begins.
In the manual, I also include this (maybe I should elaborate a bit more):
** Sluggified title and keywords
:PROPERTIES:
:CUSTOM_ID: h:ae8b19a1-7f67-4258-96b3-370a72c43f4e
:END:
Denote has to be highly opinionated about which characters can be used
in file names and the file's front matter in order to enforce its
file-naming scheme. The private variable ~denote--punctuation-regexp~
holds the relevant value. In simple terms:
+ What we count as "illegal characters" are converted into hyphens.
+ Input for a file title is hyphenated and downcased. The original
value is preserved only in the note's contents ([[#h:13218826-56a5-482a-9b91-5b6de4f14261][Front matter]]).
+ Keywords should not have spaces or other delimiters. If they do, they
are converted into hyphens. Keywords are always downcased.
from denote.
Any other character, such as spaces, underscores, the plus sign, is replaced with a hyphen.
To recap on what the state of affairs is. ..
The summary looks good!
from denote.
Related Issues (20)
- `denote-open-or-create` lisp error when working on an empty `denote-directory` HOT 7
- Denote org capture a template to save in a subdirectory HOT 5
- Org capture with denote while creating title programatically HOT 3
- Providing a way to extend the content of the backlinks buffer ? HOT 5
- "denote:" link for non-note files doesn't open HOT 22
- Adding denote-keywords-add and denote-keywords-remove as call able function HOT 14
- denote--get-silo-path: Symbol’s function definition is void: file-name-parent-directory HOT 7
- denote-file-types plist now has 11 elements and not 8 HOT 1
- defuns for implementing a zettelkasten in denote. HOT 14
- Selecting a non-denote file navigates to only to denote files with `denote-link-find-file` minibuffer HOT 1
- use consult for `denote-link-insert-*` HOT 6
- `denote-link-or-create` enters path instead of note name into title history HOT 5
- add a way to use `denote-link-or-create` programmatically HOT 2
- Delimiters in signatures HOT 6
- denote-rename-file-using-front-matter doesn't work since last update HOT 5
- double `#+title ` when called through keybinding but not through `M-x` HOT 12
- backlinks buffer doesn't support non-latin characters HOT 19
- [feature request] Only display TITLE in tabs HOT 19
- is there a way to skip the "file title" prompt when using the function denote-open-or-create HOT 2
- How to open denote links outside of denote when the note is located in a silo? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from denote.