Commit graph

118 commits

Author SHA1 Message Date
Protesilaos Stavrou 6000313eec
Enforce sluggification of keywords; document it 2022-06-11 12:19:26 +03:00
Protesilaos Stavrou 60d64ca07c
Document ways to change the front matter 2022-06-11 09:38:13 +03:00
Protesilaos Stavrou c5a5748594
Abstract plain text front matter delimiter 2022-06-11 09:21:25 +03:00
Protesilaos Stavrou bca23b3e3d
Clarify how front matter variables are used
This "hidden option" lets the user do something like this (I prepend >
to escape the #):

>    (setq denote-org-front-matter
>          ":PROPERTIES:
>    :ID: %4$s
>    :END:
>    #+title:      %1$s
>    #+date:       %2$s
>    #+filetags:   %3$s
>    #+identifier: %4$s
>    \n")

Ultimately though, it gives us more flexibility if we ever want to
support extra features.

One such feature is the ability to create links using the org-id.el
library.  See issue 8 over at the GitHub mirror, with feedback from
Kaushal Modi: <https://github.com/protesilaos/denote/issues/8>.
2022-06-11 09:13:11 +03:00
Protesilaos Stavrou a70b4cd32d
Refine backlinks' heading per file type 2022-06-11 09:00:20 +03:00
Protesilaos Stavrou 73dc07ac00
Make front matter variables "public"
By removing the double hyphens, we indicate that these variables can be
relied upon by the user.  In other words: these are hidden customisation
options for those who want to maintain some Do-It-Yourself code.
2022-06-11 08:37:29 +03:00
Protesilaos Stavrou 254a6cd0f3
Update date function; enforce RFC3339 when needed
Thanks ot Kaushal Modi for the feedback in issue 7 over at the GitHub
mirror: <https://github.com/protesilaos/denote/issues/7>.
2022-06-11 08:33:46 +03:00
Protesilaos Stavrou 21e415e2e7
Remove obsolete symbol of command 2022-06-10 20:58:52 +03:00
Protesilaos Stavrou 82eeb381dc
Make all front matter abstractions consistent 2022-06-10 20:27:59 +03:00
Protesilaos Stavrou f1f9f757ef
Include markdown-toml sample in the manual
This concludes the work done on issue 4 over at the GitHub mirror with
the help of Kaushal Modi: <https://github.com/protesilaos/denote/issues/4>.
2022-06-10 20:16:11 +03:00
Protesilaos Stavrou 308322afab
Fix markdown-toml identifier value
Thanks to Kaushal Modi for the feedback in issue 4 over at the GitHub
mirror: <https://github.com/protesilaos/denote/issues/4>.
2022-06-10 20:11:48 +03:00
Protesilaos Stavrou 85e33cb523
Remove needless single quotes 2022-06-10 19:55:17 +03:00
Protesilaos Stavrou 7366004e91
Fix markdown-toml front matter format
Thanks to Kaushal Modi for the feedback in issue 4 over at the GitHub
mirror: <https://github.com/protesilaos/denote/issues/4>.
2022-06-10 19:51:58 +03:00
Protesilaos Stavrou 5fd4e97dad
Add support for markdown-toml
Thanks to Kaushal Modi for the feedback in issue 4 over at the GitHub
mirror: <https://github.com/protesilaos/denote/issues/4>.
2022-06-10 19:19:54 +03:00
Protesilaos Stavrou 1a8b57a9a8
Fix const in denote-file-type (extends 2bc5df6) 2022-06-10 17:49:37 +03:00
Protesilaos Stavrou 2bc5df6011
denote-file-type: 'markdown-yaml', not 'markdown'
This makes it specific that the front matter is YAML-compliant.  It also
gives us the option to support TOML.

Thanks to Kaushal Modi for the feedback in issue 4 over at the GitHub
mirror: <https://github.com/protesilaos/denote/issues/4>.
2022-06-10 17:32:24 +03:00
Protesilaos Stavrou f9b86149fc
Rephrase package overview 2022-06-10 16:10:07 +03:00
Protesilaos Stavrou 3f9bfcb74e
Name the FSF as the copyright holder
This is for the eventual inclusion in the official GNU ELPA archive (as
with all my Emacs packages: <https://protesilaos.com/emacs>).
2022-06-10 16:01:46 +03:00
Protesilaos Stavrou 6227df012f
Make org-capture always set .org extension 2022-06-10 15:04:10 +03:00
Protesilaos Stavrou 3e2b560548
Elaborate on the Overview of Denote 2022-06-10 14:21:55 +03:00
Protesilaos Stavrou e840648623
Fix typo in the manual 2022-06-10 14:21:35 +03:00
Protesilaos Stavrou 17ad20f356
Document section on front matter 2022-06-10 14:21:09 +03:00
Protesilaos Stavrou 3df88a05d0
Make linking aware of file types (extends 299b897)
I think this is a cool feature, especially the ability to read the
relevant file in order to use the correct link format.
2022-06-10 13:30:05 +03:00
Protesilaos Stavrou 299b8970ee
Add support for notes in Markdown and Plain Text
The new user option 'denote-file-type' lets the user pick between the
aforementioned two or Org (which remains the default).
2022-06-10 13:29:36 +03:00
Protesilaos Stavrou e1bd4c9cb8
BREAKING Put keywords after the title
Putting the tags/keywords at the end of the file has several advantages:

1. It is consistent with how such interfaces are designed, such as with
   the 'elfeed', 'notmuch', and 'mu4e' Emacs packages.

2. It makes it easier to read the title of the file even if it is
   truncated.

3. Makes fontification look better, as the more intensely coloured
   keywords are further apart from the date/identifier which is also
   colourful.

One way to update existing file names in Dired:

* Switch to wdired (C-x C-q by default)
* M-x isearch-forward-regexp (bound to C-M-s by default)
* Search for (without the quotes) '--\(.*?\)--\(.*?\)\.org'
* While in isearch, type M-%
* For the replacement use (without the quotes) '--\2--\1.org'
* Verify the conversion as you go through the query-replace.

A similar series of steps can be followed for file contents (e.g. by
making the grep buffer editable with the wgrep package).
2022-06-10 08:08:37 +03:00
Protesilaos Stavrou db9584f51d
BREAKING Change date/identifier pattern
Before it was like 20220531_091625, but now it is 20220531T091625.

I also introduced a new face, in case someone wants to style the time
part separately.
2022-06-10 07:46:52 +03:00
Protesilaos Stavrou 9f192263db
Remove file path from front matter; improve links
It is not necessary to pollute the front matter with such details.
Files are always relative to the present directory.  The linking
facility is updated to work as intended (per commit 929157d).

This is an update on commit cfe6e98, which was reverted earlier by
8167d0c.
2022-06-10 05:43:42 +03:00
Protesilaos Stavrou 8167d0c30c
Revert "Stop recording the file path in the front matter"
This reverts commit cfe6e98e7b.

We actually need it for making links.  Perhaps we can find a way to only
rely on the identifier.  Will need to check this further.
2022-06-10 05:14:35 +03:00
Protesilaos Stavrou cfe6e98e7b
Stop recording the file path in the front matter
It ultimately is irrelevant as links are always relative to the current
directory.  Also see commit 929157d.
2022-06-10 05:12:05 +03:00
Protesilaos Stavrou 929157d424
Stop using link abbreviation
Links will now always be relative to the current directory and use the
standard "file:" prefix.

This means that other packages, like org-transclusion, will work with
our notes without further tweaks.
2022-06-10 05:05:21 +03:00
Protesilaos Stavrou ba7299d878
Add TODO about styling 'denote-link' command 2022-06-09 08:38:05 +03:00
Protesilaos Stavrou a809e9ea1d
Clarify active development; things might break 2022-06-09 08:36:13 +03:00
Protesilaos Stavrou ab27f5a547
Tweak sample configuration 2022-06-09 08:33:54 +03:00
Protesilaos Stavrou 5dace99b8d
Acknowledge Kaushal Modi for commit f97f1f8 2022-06-08 19:41:15 +03:00
Protesilaos Stavrou e8c1e31dec
Expand gitignore 2022-06-08 19:40:19 +03:00
Protesilaos Stavrou 91f4780779
Merge pull request #3 from kaushalmodi/add-gitignore
chore: Ignore compiled and autoloads Emacs-Lisp files
2022-06-08 19:36:36 +03:00
Kaushal Modi f97f1f8b56 chore: Ignore compiled and autoloads Emacs-Lisp files 2022-06-08 12:32:43 -04:00
Protesilaos Stavrou d08a72e19a
Re-indent line 2022-06-08 19:16:30 +03:00
Protesilaos Stavrou 0e65f05bbb
Use 'delete-region' instead of 'delete-line'
The latter requires 'subr'.

Thanks to Kaushal Modi for reporting the bug in issue 2 over at the
GitHub mirror: <https://github.com/protesilaos/denote/issues/2>.
2022-06-08 19:13:44 +03:00
Protesilaos Stavrou 739d485600
Fix bug about missing point in link de-duplication 2022-06-08 14:45:14 +03:00
Protesilaos Stavrou e2c49771f7
Placate the compiler about symbol disambiguation 2022-06-08 14:44:57 +03:00
Protesilaos Stavrou d8b2903fa9
Acknowledge Jack Baty for commit dfc3a8f
Jack's contribution is below the ~15 line threshold that is required for
projects that are distributed via GNU ELPA (denote will be one of them
in the near future).

Contributions exceeding that limit require that the author assigns
copyright to the Free Software Foundation.
2022-06-08 14:36:23 +03:00
Protesilaos Stavrou eafc777268
Use 'denote-directory' function for '#+link'
The function ensures that the path is always returned as a directory.

This commit builds on dfc3a8f.  Thanks to Jack Baty for recognising the
problem.
2022-06-08 14:34:19 +03:00
Protesilaos Stavrou 2eeedaf86a
Placate the compiler about 'denote-directory' 2022-06-08 14:29:11 +03:00
Protesilaos Stavrou a6303a6101
Update doc string of variable 'denote-directory' 2022-06-08 14:27:46 +03:00
Protesilaos Stavrou ebdacb3fea
Update doc string of denote-directory function 2022-06-08 14:26:27 +03:00
Protesilaos Stavrou 147901f971
Rename 'denote--directory' to 'denote-directory' 2022-06-08 14:25:13 +03:00
Jack Baty dfc3a8fc60
Use denote-directory rather than hardcoded path 2022-06-08 14:23:19 +03:00
Protesilaos Stavrou 69e35281da
Document denote-front-matter-date-format 2022-06-08 12:33:07 +03:00
Protesilaos Stavrou 52fd454153
Document denote-sort-keywords 2022-06-08 12:32:52 +03:00