EFLS / zetteldeft

A Zettelkasten system! Or rather, some functions on top of the emacs deft package.
https://efls.github.io/zetteldeft
GNU General Public License v3.0
394 stars 42 forks source link

zetteldeft-find-file not using follow mode #132

Closed AtomicNess123 closed 2 years ago

AtomicNess123 commented 2 years ago

Hi, I noticed that when scrolling the results of a search with zetteldeft-find-file, I can't preview the file at point as in follow-mode. This would greatly improve the searching capabilities. Otherwise, the user must visit every file to check if it's the one they are looking for.

EFLS commented 2 years ago

I don't know follow-mode, but from what I read it is not meant to preview minibuffer candidates when opening files? Why do you expect that to happen?

Otherwise, the user must visit every file to check if it's the one they are looking for.

You can use the Deft search functionality and use deft-open-file-other-window to preview the file under point.

AtomicNess123 commented 2 years ago

Do I understand that zetteldeft-find-file is exactly the same as deft-find-file? My aim is to preview the file at point when calling (zettel)deft-find-file. I don't think deft-open-file-other-window is doing this.

EFLS commented 2 years ago

Do I understand that zetteldeft-find-file is exactly the same as deft-find-file?

Not exactly the same, but it relies on some related functions. See the source code, or here: https://www.eliasstorms.net/zetteldeft/zetteldeft.html

My aim is to preview the file at point when calling (zettel)deft-find-file.

That's not provided by Deft, but you might be able to do that depending on your completing-read setup.

I don't think deft-open-file-other-window is doing this.

That function is meant to be called from the Deft search function. It's unrelated to the -find-file functions.

AtomicNess123 commented 2 years ago

Thanks. However, I don't understand these concepts (completing-read). How should my config be in order to be able to preview the file at point? You mentioned above: You can use the Deft search functionality and use deft-open-file-other-window to preview the file under point. If this indeed does what I need, how to use it? Thanks.

EFLS commented 2 years ago

Thanks. However, I don't understand these concepts (completing-read). How should my config be in order to be able to preview the file at point?

That is your Emacs config that deals with how you chose files to open etc. It's what's called by the Deft functions. I'm no specialist, so can't really help you with that.

If this indeed does what I need, how to use it?

Like I mentioned above: call Deft (e.g. with C-c d D), enter your search query, move through the files, and use deft-open-file-other-window.