Closed maw closed 3 years ago
Two points:
zetteldeft-completing-read
instead of completing-read
(see https://github.com/EFLS/zetteldeft/pull/93)C-c d T
. I think it's a lot more useful than zetteldeft-tag-buffer
. But it is of course up to you if you want to change defaults like that 😸 and I'll understand completely if you'd rather not break anybody's workflow.I've moved the defun, made some minor changes and renamed the function, since it is essentially a search function. Not sure yet about the keybinding it should get. As you suggest, I prefer not breaking existing bindings.
I'm not sure how the speed of this function holds up on large Deft directories, as the tag list is generated each new search. But the function seems to work well.
Thanks for introducing me to seq
functions -- seems like I should have known about those earlier 😄
Seems like something went wrong with the individual commits. Anyway, the final result should work.
Perhaps C-c d /
is a suitable keybinding?
Also, I'm wondering how useful the (optional) argument is, since it does the same as zetteldeft--search-global
when an argument is provided. Perhaps we can drop it for sake of simplicity?
That's a good choice.
My main argument against would be that it might be interesting to save it for a hypothetical "search everything" function. But since that function doesn't yet exist...
As to the optional argument: what is the convention in emacs lisp? I thought that anything that comes after package-name--
should be considered private to the package, but I might be mistaken here.
I added the option arg thinking that maybe somebody would find that function and use it in private pieces of code but all in all I think you're right and that the optional argument can go.
I interpreted the --
as indicating that it is not a function that the user should call interactively, but not sure about the convention.
I added the option arg thinking that maybe somebody would find that function and use it in private pieces of code
Yeah, that's already there, you could use (zetteldeft--search-global "string")
for that.
save it for a hypothetical "search everything" function
True, but the "search everything" is simply searching with Deft, or to use C-c d D
(zetteldeft-deft-new-search
) for convenience.
Is there another binding for tags? Perhaps something from Org-mode? I use evil
style bindings so not sure about the defaults.
I've further simplified the function and renamed it.
Thanks again for your contribution!
This is similar to zetteldeft-find-file but works by tag.