Comments (11)
I don't get what's happening here, as it looks like deft is called with the correct search string, i.e. the note's ID.
In any case, I noticed there are some issues with zetteldeft-avy-file-search
. It relies on avy-goto-char
while it might be better to use avy-jump
.
I've tried [[
as link indicator and it seems to work. Can you try to override zetteldeft-avy-file-search
with the code below and see whether it helps?
(defun zetteldeft-avy-file-search (&optional otherWindow)
"Use `avy' to follow a zetteldeft link.
Links are found via `zetteldeft-link-indicator'
Open that file (in another window if OTHERWINDOW)."
(interactive)
(unless zetteldeft-link-indicator
(user-error "Zetteldeft avy functions won't work when `zetteldeft-link-indicator' is nil"))
(save-excursion
(when (consp (avy-jump (concat
zetteldeft-link-indicator zetteldeft-id-regex)))
(zetteldeft--search-filename
(zetteldeft--lift-id (zetteldeft--get-thing-at-point)) otherWindow))))
from zetteldeft.
Further investigation:
- I modified
zetteldeft-link-indicator
to be a single character$
using(setq zetteldeft-link-indicator "$")
- Disable function overrides for
zetteldeft-find-file-id-insert
/zetteldeft-find-file-full-title-insert
Observed behaviour:
zetteldeft-follow-link
now works with a Zettel link in the form$2020-04-12-1600 foobar
or$2020-04-12-1600
Question:
- The function
zetteldeft--get-thing-at-point
states that it does recognize links between brackets (https://github.com/EFLS/zetteldeft/blob/master/zetteldeft.el#L78) and I can verify thatlink-builder-re
does recognize[[2020-04-12-1600 foobar]]
. However, the functionzetteldeft-follow-link
still does not follow the link. Can anyone offer any ideas?
from zetteldeft.
I'll have to look into it. This is a good opportunity to further work on Markdown-styled zettelkasten like The Archive. I haven't used it with [[
links myself.
Unfortunately, I'm busy with other work right now, but I'll see what I can do.
from zetteldeft.
A quick remark: zetteldeft-follow-link
and zetteldeft-avy-file-search
concatenate the zetteldeft-link-indicator
and the zetteldeft-id-regex
to generate a string, which serves as the regular expression that avy
then tries to look for.
Now it could be that using [[
as link indicator results in a problematic regular expression... Not sure yet what to do about this, but it might be the cause.
from zetteldeft.
A quick remark:
zetteldeft-follow-link
andzetteldeft-avy-file-search
concatenate thezetteldeft-link-indicator
and thezetteldeft-id-regex
to generate a string, which serves as the regular expression thatavy
then tries to look for.Now it could be that using
[[
as link indicator results in a problematic regular expression... Not sure yet what to do about this, but it might be the cause.
@EFLS Iām happy to try and debug this further to help narrow down the source of the issue, if you can point me to some good articles on Emacs debugging. Like I said at the start, Emacs newb here š
from zetteldeft.
@avggeek Unfortunately, I'm far from an elisp
expert myself, and one of the things I don't know much about is debugging something like this... I hope someone else can maybe make a suggestion on how to go about this.
What I usually do, is try and overwrite the existing defun
s with something else and see what works :) Maybe try and overwrite the zetteldeft-avy-file-search
function to use a different regular expression (one that matches your setup) and see how that works.
from zetteldeft.
@EFLS Yeah I noticed that @mclearc used a different function avy-goto-char-2
in his comment here (#4 (comment)) so let me see if create some other overrides as well.
from zetteldeft.
After turning on debug-on-entry
and stepping through the code, it seems like the issue is not with zetteldeft-follow-link
and zetteldeft-avy-file-search
, but rather with the call to deft-filter
.
from zetteldeft.
I don't get what's happening here, as it looks like deft is called with the correct search string, i.e. the note's ID.
In any case, I noticed there are some issues with
zetteldeft-avy-file-search
. It relies onavy-goto-char
while it might be better to useavy-jump
.I've tried
[[
as link indicator and it seems to work. Can you try to overridezetteldeft-avy-file-search
with the code below and see whether it helps?
@EFLS I'm happy to report that the function you have provided does indeed fix the issue! In fact, not only does zetteldeft-avy-file-search
work now but I'm now able to use zetteldeft-follow-link
correctly as well. Thank you so much for taking the time to help me fix this despite your busy schedule!
from zetteldeft.
Thank you so much for taking the time to help me fix this despite your busy schedule!
Selectively procrastinating is a productivity trick š
The updated version will be part of the default code soon.
from zetteldeft.
Selectively procrastinating is a productivity trick š
The updated version will be part of the default code soon.
Hi @EFLS I can confirm the newest version of the package does fix the issue without needing any overrides. So closing this issue - thank you again for the help!
from zetteldeft.
Related Issues (20)
- Error in zetteldeft-new-file-and-backlink and update the function HOT 2
- Deft doesn't strip #+STARTUP options at the beginning of note from title HOT 4
- FeatureRequest: Inform about dead link when `C-c d f` HOT 4
- Question: Batch rename tags on all related zettels HOT 1
- Which special characters can be used to distinguish special tags? HOT 3
- Question: What is a backlink HOT 1
- FeatureRequest: Handle special characters in zettels filenames HOT 7
- zetteldeft-find-file behave different HOT 1
- FeatureRequest: create new note in a sub-directory HOT 1
- zetteldeft-full-search-find-file: possibility to see results as we type keywords? HOT 3
- Org-capture via org-protocol to create notes directly from the browser HOT 2
- Right hand side back-links window HOT 3
- zetteldeft-find-file not using follow mode HOT 5
- Strange line break HOT 2
- Sorting of files in zetteldeft-find-file HOT 2
- Add a function analogous to zetteldeft-insert-link-{zd,org}-style but for markdown
- make the function to extract a title from a note customizable
- shouldn't zetteldeft--check return nonnil or nil rather than signalling an error? HOT 1
- Incompatibility with Org 9.5.5? HOT 3
- Is this expected behavior for dynamic blocks? HOT 5
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 zetteldeft.