Comments (14)
Hi Sven,
I do however get duplicates when using denote-link-add-links and
searching only for date, say 20220617. I guess this is because the
regex searches both filename and title, hence creates duplicates.
If your files have a date in their title field, then yes those results
you are getting are to be expected.
If you want to match the start of the file where the identifier/date is,
start your regexp with ^
. For example ^20220617
.
When I'm though in another folder, say Docs/journal and do the same
search it searches the /notes folder and respectively adds files
matching the same files with the difference that I can't seem to open
them. Adding a link via denote-link-insert-link adds the right link,
but I'm unable to open it.
Does this other folder have a .dir-locals.el
which sets the
denote-directory
to the current directory?
from denote.
I found the bug and pushed a change. If you were using .dir-locals.el
as the manual suggested, update its contents to this:
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((nil . ((denote-directory . default-directory))))
The old value was faulty and I forgot to review it earlier.
Please let me know if this addresses your problems.
from denote.
Hi Prot,
thanks for your reply. I just now had the chance to do some testing and the new code for the .dir-locals file fixes the issue with the links. Adding links via "denote-link-find-file" and following those links via "denote-link-find-file" does now work as expected.
Adding links via denote-link-insert-links-matching-regexp
"though doesn't seem to work and the error Opening input file: No such file or directory,
(below that it shows the path and filename of the current document) comes up in the Minibuffer. This would be in the secondary folder containing the .dir-locals.el
file.
In the primary folder it works, but still produces duplicates when for example searching for ^20220617 as you suggested. But that might be because I'm not familiar with regex (I would like to say "yet").
I also found something in the Backlinks buffer:
I'm not sure if this is intended or not, but it seems that the backlinks-buffer is build and fontified correctly, but it doesn't seem to be possible to open any of the links at the moment (Buffer is read only). The buffer also produces duplicates and also includes a link to the current document.
I noticed this behaviour both in the default folder, as well as in the secondary folder, that is the one containing the .dir-locals.el file.
from denote.
Hello Sven,
the new code for the .dir-locals file fixes the issue with the links. Adding links via "denote-link-find-file" and following those links via "denote-link-find-file" does now work as expected.
Good!
Adding links via
denote-link-insert-links-matching-regexp
"though doesn't seem to work and the errorOpening input file: No such file or directory,
(below that it shows the path and filename of the current document) comes up in the Minibuffer. This would be in the secondary folder containing the.dir-locals.el
file.
I can reproduce this. Will figure out what the problem is and report back to you.
In the primary folder it works, but still produces duplicates when for example searching for ^20220617 as you suggested. But that might be because I'm not familiar with regex (I would like to say "yet").
You mean duplicates as in the same file more than once or matches that are not exactly what you would like? If you show me some examples, I can help further.
I also found something in the Backlinks buffer:
I broke this yesterday when I added the sort mechanism. It should be fixed now per commit 429763c, aab484d.
from denote.
Great!
And I just figured out why there are duplicates showing.
Both instances open the same document, but looking at the folder in the files-app and not Dired reveals two files, but one with an .org~ ending. I guess that's an autosave or such file?
from denote.
I guess that's an autosave or such file?
Yes, I noticed this a few minutes ago and pushed some changes. Thanks!
Now working on the error you reported.
from denote.
Oh, I should ask here: the ~
in those files is only at the end? If so, I need to tweak the filter.
from denote.
Oh, I should ask here: the
~
in those files is only at the end? If so, I need to tweak the filter.
Yes, only at the end (checked also in eshell)
I should maybe set a different backup/autosave location in the process :--)
from denote.
I should maybe set a different backup/autosave location in the process :--)
In principle, there should be no need to change that (if you like it that way). I just improved the check for it.
from denote.
I believe I fixed the bug now. Please check.
from denote.
Great! Adding links the in a secondary folder works now as one might expect.
I noticed though that the Backlinks-Buffer also includes links to the backup/autosave files, which might cause confusion. This happens in both folders, the default and the secondary/alternative one.
from denote.
Great! Adding links the in a secondary folder works now as one might expect.
Very well!
I noticed though that the Backlinks-Buffer also includes links to the backup/autosave files, which might cause confusion. This happens in both folders, the default and the secondary/alternative one.
Just pushed a change. It should remove all false positive. Please give it a try.
from denote.
Nice! Everything seems to work as expected! Perfect!
from denote.
Excellent! Thanks again for the feedback! I am now closing this.
from denote.
Related Issues (20)
- Denote Backlinks don't work when using silos HOT 15
- `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
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.