Commit graph

3305 commits

Author SHA1 Message Date
Protesilaos Stavrou 451e5009fb
Merge branch 'main' of github.com:protesilaos/denote 2025-10-07 18:32:41 +03:00
Protesilaos Stavrou b89d30de21
Try a simpler implementation of denote--file-has-backlinks-p
I discussed this with Yann Dutrieux in the follow-up to pull request
637: <https://github.com/protesilaos/denote/pull/637>.
2025-10-07 07:58:43 +03:00
Protesilaos Stavrou 679c13c5d9
Make stylistic change to denote-link--map-over-notes for readability 2025-10-06 20:20:00 +03:00
Protesilaos Stavrou 0d5ce4f22b
Make stylistic change to denote-subdirectory-prompt 2025-10-06 20:14:20 +03:00
Protesilaos Stavrou 7482fbc487
Acknowledge Yann Dutrieux for commit d509565
This was done in pull request 637: <https://github.com/protesilaos/denote/pull/637>.

The change is small, meaning that Yann does not need to assign
copyright to the Free Software Foundation.
2025-10-06 18:36:09 +03:00
Protesilaos Stavrou d509565e6b
Merge pull request #637 from dizzyyogi/gh_issue_636_dizzyyogi
Check in denote--file-has-backlinks-p whether link matches file id
2025-10-06 18:34:39 +03:00
Yann Dutrieux f42b6d663b Check in denote--file-has-backlinks-p whether link matches file id 2025-10-05 19:34:10 +02:00
Protesilaos Stavrou 444db90dab
Add link to "Getting started" section of the manual in the README.md 2025-09-26 08:27:54 +03:00
Protesilaos Stavrou e1fe1278eb
Include a "Getting started with Denote" section in the manual 2025-09-26 08:23:46 +03:00
Protesilaos Stavrou d1dcab874e
Make denote-query-sorting docs more consistent between manual and docstring 2025-09-24 13:20:33 +03:00
Protesilaos Stavrou e19538b5c5
Add the missing function :type from the user option denote-query-sorting 2025-09-24 13:20:12 +03:00
Protesilaos Stavrou 73c2ada5d2
Make small rewording in the manual 2025-09-24 13:09:30 +03:00
Protesilaos Stavrou fafe2b610f
Add custom identifier example: like the default plus capital letter for day of week 2025-09-24 07:41:14 +03:00
Protesilaos Stavrou 83dd0fefb1
Mention the custom identifier with a prompt in the denote-prompts section of the manual 2025-09-19 11:27:32 +03:00
Protesilaos Stavrou 747bbb914f
Document the user of 'denote-prompts' for custom identifiers 2025-09-19 11:26:34 +03:00
Protesilaos Stavrou 02193f9477
Remove the "identifier as number" from denote.el and put it in the manual
We are not using it internally and we do not need to provide it as
part of denote.el. Users who want custom identifiers will eventually
ask for all sorts of variations on this theme. We can keep everything
documented in the manual where we also have the freedom to add more
things to accommodate each use-case.
2025-09-19 11:12:17 +03:00
Protesilaos Stavrou 89b5275a52
Add another custom identifier example in the manual 2025-09-19 11:03:03 +03:00
Protesilaos Stavrou 9960ca320f
Flesh out the custom identifier code sample 2025-09-18 19:33:21 +03:00
Protesilaos Stavrou a39a0e0d1d
Add WORK-IN-PROGRESS example of a custom identifier scheme 2025-09-18 15:32:36 +03:00
Protesilaos Stavrou c9a13ee59e
Make small refinement to denote--link-at-point-get-data 2025-09-15 07:30:48 +03:00
Protesilaos Stavrou fec1a41e2e
Make denote-fontify-links compute its data only once
Otherwise we get font-lock to always call 'denote-filetype-heuristics'
on the buffer.
2025-09-15 07:23:31 +03:00
Protesilaos Stavrou e8eb15625d
Make denote--file-has-backlinks-p exit as soon as it finds a single backlink
This should be faster than before most of the times (well, unless the
file containing the links is the last on the list).
2025-09-10 12:02:53 +03:00
Protesilaos Stavrou 667dc1eb9b
Remove some needless pcase-let 2025-08-19 21:37:53 +03:00
Protesilaos Stavrou 5d5c29dd77
Remove needless comment in denote-fontify-links 2025-08-19 18:51:48 +03:00
Protesilaos Stavrou a4d6f321b4
Make denote-link-ol-help-echo more robust 2025-08-19 18:44:04 +03:00
Protesilaos Stavrou f4b9028178
Make denote-get-link-identifier-or-query-term-at-point more robust 2025-08-19 18:41:14 +03:00
Protesilaos Stavrou d58a684f0f
Make denote--get-link-file-path-at-point more robust 2025-08-19 18:37:22 +03:00
Protesilaos Stavrou 51fb9c7a4c
Clarify the use of denote--link-at-point-get-data in its docstring 2025-08-19 18:32:57 +03:00
Protesilaos Stavrou 0d696e7c35
Change how the helpers of "link at point" get the position
It is better for helper functions to expect an argument, because then
we can adapt them to our needs. Here we use '(point)', but we may have
another approach elsewhere.
2025-08-19 18:24:34 +03:00
Protesilaos Stavrou 4905da57ae
Make denote--link-open-at-point-subr more robust (see commit 76c1345)
Thanks to Bhargav Kulkarni for reporting the bug in issue 631 and for
Jean-Philippe Gagné Guay for commenting on how best to approach the
problem: <https://github.com/protesilaos/denote/issues/631>.
2025-08-17 18:09:03 +03:00
Protesilaos Stavrou 76c13454ae
Define helper functions to test if point is inside link regexp
The 'denote--inside-link-regexp-p' is based on the function
'org-in-regexp' that I found in the org-macs.el file of Org version
9.7.11.

Thanks to Jean-Philippe Gagné Guay for the feedback in issue 631 that
helped refine 'denote--inside-link-regexp-p':
<https://github.com/protesilaos/denote/issues/631#issuecomment-3194420425>.
2025-08-17 18:02:07 +03:00
Protesilaos Stavrou 7f5d9974f2
Fix package version in make-obsolete message about '(denote-directory)'
Thanks to Jean-Philippe Gagné Guay for pointing this out:
<https://github.com/protesilaos/denote/pull/632#issuecomment-3193637023>.
2025-08-16 15:35:47 +03:00
Protesilaos Stavrou 9b6f3ecee7
Add a missing space from the default denote-file-prompt text 2025-08-16 08:01:41 +03:00
Protesilaos Stavrou 12090237bc
Make the denote-directory function obsolete
I have gone back and forth on this issue. Jean-Philippe Gagné Guay
convinced me that it is better to deprecate it because this way the
users will be more informed about what is happening.

This is done in a comment and was then reminded it of it again in pull
request 632:

- <947f0be070>.
- <https://github.com/protesilaos/denote/pull/632>
2025-08-16 07:20:09 +03:00
Protesilaos Stavrou 70a473d41b
Merge pull request #632 from jeanphilippegg/readme
Various precisions in the manual
2025-08-16 07:19:39 +03:00
Jean-Philippe Gagné Guay ef31105cd8 Various precisions in the manual 2025-08-15 23:22:50 -04:00
Protesilaos Stavrou 80be3d309b
Make stylistic change in one comment 2025-08-09 12:04:15 +03:00
Protesilaos Stavrou 0b3fdcecb6
Do not try to prompt for 'denote-directories' and use 'denote-directory' instead
What I was trying to do earlier with the "maybe prompt" was not a good
idea, as pointed out by Jean-Philippe Gagné Guay:
<947f0be070 (commitcomment-163492171)>.

We do not want to compromise the Lisp calls to the relevant functions:
those should remain non-interactive.

The 'denote-prompts' can be configured to prompt for a directory,
which I forgot worked for parent level directories as well.

About the function 'denote-directory', I have gone back and forth
regarding whether to deprecate it or not. I think it is better to keep
it than have '(car (denote-directories))' everywhere: if we ever need
to change anything, then we can rely on it propagating elsewhere,
including to code that users will likely have.
2025-08-09 11:57:58 +03:00
Protesilaos Stavrou 947f0be070
Prompt for directory among 'denote-directories' if needed
The idea is to stop relying on the '(car (denote-directories))' pattern.
2025-08-05 14:46:33 +03:00
Protesilaos Stavrou 54d9946333
Use the new function to get the common root in the manual's sample code 2025-08-05 07:42:43 +03:00
Protesilaos Stavrou 85ccf5998d
Document the denote-directories function and make related changes to the manual 2025-08-05 07:41:33 +03:00
Protesilaos Stavrou 1fa853acc0
Introduce the function denote-directories-get-common-root 2025-08-05 07:40:53 +03:00
Protesilaos Stavrou 658659c83e
Stop declaring the denote-directory function as obsolete
There are plenty of custom functions that still use it. We will
improve things internally, but I see this function continuing to be
useful long-term.
2025-08-05 07:37:48 +03:00
Protesilaos Stavrou a234f7a592
Add FIXME for the function denote-directory 2025-08-05 07:23:54 +03:00
Protesilaos Stavrou 307db01003
Make denote--prepare-note only error if an existing file is not empty
This way we avoid cases where some other function saves the buffer
before we get to operate on it. One such example is 'lsp-auto-touch-files',
as noted by wuzhihao in issue 627: <https://github.com/protesilaos/denote/issues/627>.
2025-08-02 19:12:00 +03:00
Protesilaos Stavrou 955618e75c
Make small tweaks to two doc strings 2025-08-02 19:07:32 +03:00
Protesilaos Stavrou 49246e443f
Acknowledge Ashish Panigrahi for commit 2103ee1
This was done in pull request 625: <https://github.com/protesilaos/denote/pull/626>.

The change affects a single word, meaning that Ashish does not need to
assign copyright to the Free Software Foundation.
2025-08-01 14:21:57 +03:00
Protesilaos Stavrou a416c5b114
Merge pull request #626 from paniash/patch-1
Fixed typo
2025-08-01 14:21:12 +03:00
Protesilaos Stavrou e2c77a5476
Update the comment about denote--file-has-backlinks-p
This is an important thing to work on. What we have now is too
expensive for a feature that is small.
2025-08-01 12:43:21 +03:00
Protesilaos Stavrou 94546c048f
Make denote-get-backlinks produce error earlier if needed
If the file has no identifier, we do not want to check if it is in our
directories, anyway.
2025-08-01 12:28:52 +03:00