Hello everyone,
The silos have thus far been assumed to be flat directories. I just
made a change that should, in principle, allow them to be treated as
directory trees (i.e. they can have subdirectories). Below is the
relevant entry from the manual:
https://protesilaos.com/emacs/denote#h:3aeacd4d-8cd2-49b7-bc49-15bbbf4281c0
If anyone here uses silos and has time to test this in a real-world
scenario, please let me know what you think.
3.4.1. Determine levels of depth in a silo
[ Part of 1.3.0-dev. ]
Silos have a directory-local variable that isolates them from the
default value of the user option denote-directory. When the silo is a
flat directory, Denote can easily know about it. Otherwise it needs to
search the parents of the current directory in order to determine if
the current file belongs to a silo.
To this end, the user can specify a natural number as the value of the
user option denote-silo-nesting-depth. The default value is 1, meaning
that Denote will check the current directory and its parent directory
to determine if either of those paths constitute a silo. If they are,
Denote will return the given path, else it will use the default
(global) value of the denote-directory.
Maintain separate directory silos for notes: https://protesilaos.com/emacs/denote#h:15719799-a5ff-4e9a-9f10-4ca03ef8f6c5
Levels of depth are needed to allow silos to have subdirectories.
Otherwise they are assume to be flat.
All the best,
Protesilaos (or simply "Prot")
--
Protesilaos Stavrou
https://protesilaos.com
Hello Prot,
On 2023-02-15 13:10, Protesilaos Stavrou <info@protesilaos.com> writes:
> The silos have thus far been assumed to be flat directories. I just> made a change that should, in principle, allow them to be treated as> directory trees (i.e. they can have subdirectories). Below is the> relevant entry from the manual:> https://protesilaos.com/emacs/denote#h:3aeacd4d-8cd2-49b7-bc49-15bbbf4281c0
It seems that these changes use `file-name-parent-directory'. This
function is not defined in my emacs (GNU Emacs 28.2). Is this a bug only
for me?
Best,
Alan
Hello again,
On 2023-02-17 09:13, Alan Schmitt <alan.schmitt@petitepomme.net> writes:
> It seems that these changes use `file-name-parent-directory'. This> function is not defined in my emacs (GNU Emacs 28.2). Is this a bug only> for me?
After some investigation, it seems that this function was introduced in
emacs 29.1. Maybe you could have denote be dependent on the compat.el
package?
https://elpa.gnu.org/devel/doc/compat.html#Added-Definitions-4
Best,
Alan
> From: Alan Schmitt <alan.schmitt@petitepomme.net>> Date: Fri, 17 Feb 2023 09:55:15 +0100>> Hello again,
Hello Alan,
> On 2023-02-17 09:13, Alan Schmitt <alan.schmitt@petitepomme.net> writes:>>> It seems that these changes use `file-name-parent-directory'. This>> function is not defined in my emacs (GNU Emacs 28.2). Is this a bug only>> for me?>> After some investigation, it seems that this function was introduced in> emacs 29.1. Maybe you could have denote be dependent on the compat.el> package?>> https://elpa.gnu.org/devel/doc/compat.html#Added-Definitions-4
Indeed, that function is for Emacs 29. My plan was to add compat as a
requirement, anyway, because I want to make Denote available for Emacs
27.1. Will do it now and then eventually do the changes necessary for
the port to Emacs 27.1.
All the best,
Prot
--
Protesilaos Stavrou
https://protesilaos.com
Hello folks!
I have greatly simplified the way we check for a path to the root of a
silo. This should, in principle, remove the performance penalty that
you experienced recently. The user option for a depth level is no more.
This works with a standard function that finds the path of the
.dir-locals. Please test Denote with the latest commit. I will post
this message also on the GitHub mirror.
commit d5cf35ec2e11fb2891f15e405644768105a6a119
Author: Protesilaos Stavrou <info@protesilaos.com>
Date: Mon Feb 20 08:06:15 2023 +0200
REMOVE recursive search for silo root; keep simpler check
This was never a good idea but I wanted to see what the implications
are. We do not need this anymore due to commit 3d2e1d5 which
simplifies 'denote--silo-p'.
Thanks to relict007, Hilde Rhyne, Mirko Hernández, Noboru
Ota (nobiot), Alan Schmitt, and hapst3r for their participation in the
relevant discussions:
- https://lists.sr.ht/~protesilaos/denote/%3C87fsb72nge.fsf%40protesilaos.com%3E
- https://lists.sr.ht/~protesilaos/denote/%3C80CBB671-D812-4EA8-8C80-85F9F4144051%40disroot.org%3E
- https://lists.sr.ht/~protesilaos/denote/%3C87pma6t59i.fsf%40kotlak.com%3E
- https://github.com/protesilaos/denote/issues/129 (GitHub mirror)
README.org | 26 --------------------------
denote.el | 41 +----------------------------------------
2 files changed, 1 insertion(+), 66 deletions(-)
All the best,
Prot
--
Protesilaos Stavrou
https://protesilaos.com