Commit graph

3316 commits

Author SHA1 Message Date
Protesilaos Stavrou e5260315ec
Merge branch 'denote-dired-focus' of github.com:protesilaos/denote into denote-dired-focus 2026-04-07 11:39:37 +03:00
Protesilaos Stavrou 21b8c6d024
Implement prototype of denote-dired-focus
I am doing this in response to a question posted by 82Kang in issue
693: <https://github.com/protesilaos/denote/issues/693>.

We already have similar functionality for the denote-grep (and
related) buffers. This is an opportunity for me to also review all
that.
2026-04-07 11:39:28 +03:00
Protesilaos Stavrou fd4d20b472
Make small stylistic tweaks to denote-grep and a helper function 2026-04-07 11:32:30 +03:00
Protesilaos Stavrou 9dc7420031
Tweak the denote-grep-display-buffer-action documentation 2026-04-07 11:32:13 +03:00
Protesilaos Stavrou beb698f632
Deprecate the denote-grep-history 2026-04-07 11:22:26 +03:00
Protesilaos Stavrou 1058caea0c
Tweak the make-obsolete warnings for the grep prompt and its history 2026-04-07 11:19:46 +03:00
Protesilaos Stavrou dcb3daf81a
Add TODO for denote-grep and friends 2026-04-06 22:59:03 +03:00
Protesilaos Stavrou 3e8c2c835d
Make stylistic changes and minor refinements to the query include/exclude commands 2026-04-06 22:57:54 +03:00
Protesilaos Stavrou 37beb39c3b
Consolidate the query/grep prompts for a REGEXP 2026-04-06 22:57:20 +03:00
Protesilaos Stavrou 5e4b95a1b7
Make stylistic refinements to denote-query-focus-last-search 2026-04-06 22:30:03 +03:00
Protesilaos Stavrou d0252aff0c
Make stylistic refinements to denote-query-prompt 2026-04-06 22:29:51 +03:00
Protesilaos Stavrou 15415e7956
Refine how the prompt for query buffer narrowing is implemented 2026-04-06 22:23:39 +03:00
Protesilaos Stavrou 2dae5773f2
Rewrite the tests in the interest of clarity and expand them where necessary 2026-04-06 21:58:02 +03:00
Protesilaos Stavrou 7b9be290e5
Inhibit denote--regexp-in-file-p error in denote-file-type
In the case where the check returns nil, we want to move to the next
condition, so no need for an error here.
2026-04-06 21:57:15 +03:00
Protesilaos Stavrou acadd80426
Move denote--regexp-in-file-p further up 2026-04-06 21:56:59 +03:00
Protesilaos Stavrou 53bb758384
Rewrite denote-file-has-denoted-filename-p docstring for clarity 2026-04-06 21:56:43 +03:00
Protesilaos Stavrou ded4c50b8c
Make denote-directories--get-paths take an argument and do error checking 2026-04-06 21:56:24 +03:00
Protesilaos Stavrou 9d5711ea50
Update copyright years in denote-test.el 2026-04-06 20:01:49 +03:00
Protesilaos Stavrou 90d84d6501
Implement prototype of denote-dired-focus
I am doing this in response to a question posted by 82Kang in issue
693: <https://github.com/protesilaos/denote/issues/693>.

We already have similar functionality for the denote-grep (and
related) buffers. This is an opportunity for me to also review all
that.
2026-04-06 12:20:58 +03:00
Protesilaos Stavrou 627ed49989
Move denote--user-error-if-not-major-mode further up 2026-04-06 11:48:25 +03:00
Protesilaos Stavrou 75ef0f827a
Make small refinement to denote-sort-dired 2026-04-06 11:17:17 +03:00
Protesilaos Stavrou 8dfadbc085
Split up denote-sort-dired for legibility and fix a bug with revert-buffer 2026-04-06 10:43:04 +03:00
Protesilaos Stavrou 7852585578
Set denote-file-type explicitly to Org
Otherwise, the user will not necessarily get what they want if they
add to the denote-file-types.
2026-04-02 09:56:45 +03:00
Protesilaos Stavrou e6f6111d3d
Ensure denote--act-on-query-link get the buffer of denote-sort-dired 2026-03-24 14:51:55 +02:00
Protesilaos Stavrou 7f92fd4af3
Acknowledge bplubell for commit d8c2488
This was done in pull request 685: <https://github.com/protesilaos/denote/pull/685>
The change is small, meaning that the author does not need to assign
copyright to the Free Software Foundation.
2026-03-19 07:13:07 +02:00
Protesilaos Stavrou d93056137f
In denote-link--prepare-links pass the file-type to denote-get-link-description 2026-03-19 07:12:31 +02:00
Protesilaos Stavrou 6c0fb263c8
Merge pull request #685 from bplubell/fix-follow-markdown-link
Fix error when following non-Denote Markdown links
2026-03-19 07:09:52 +02:00
bplubell d8c2488622 Fix error when following non-Denote Markdown links
When following links in markdown-mode that are to non-Denote resources
like URLs, you would see the error:

    Cannot open ‘nil’ of unknown link type

That is because Denote adds denote-link-markdown-follow to
markdown-follow-link-functions, which eventually calls
denote--act-on-query-link with a nil value.

To solve this, we return nil from denote-link-markdown-follow when we do
not know how to handle the link. That lets markdown-mode try its link
handling. Per the markdown-follow-link-functions documentation, we
should "return non-nil if [we] followed the link, or nil if not."
2026-03-18 15:46:12 -07:00
Protesilaos Stavrou 76c2e27e80
Document how users can have a custom identifier without "T" in it 2026-03-06 19:23:10 +02:00
Protesilaos Stavrou e1d16ba77b
Make stylistic refinements to denote-link-preview-file
We use a similar approach in related functions for the Org link
mechanism.

This builds on top of the contribution of Samuel W. Flint in pull
request 683: <https://github.com/protesilaos/denote/pull/683>.
2026-02-28 22:22:37 +02:00
Protesilaos Stavrou 2ca985d57b
Acknowledge Samuel W. Flint for commit 3d24ea5
The change is small, meaning that Samuel does not need to assign
copyright to the Free Software Foundation.

This change was done in pull request 683: <https://github.com/protesilaos/denote/pull/683>.
2026-02-28 21:31:01 +02:00
Protesilaos Stavrou 6f3649eff4
Merge pull request #683 from swflint/enable-preview
Enable preview of denote links
2026-02-28 21:29:01 +02:00
Protesilaos Stavrou e7478b1627
Simplify how denote-get-link-description checks for function arity
I found func-arity by chance and immediately thought of this. What I
had before was ugly by comparison, even though its idea made sense.
2026-02-28 21:16:40 +02:00
Samuel W. Flint 3d24ea54eb Enable preview of denote links
Preview will only happen if there is one file with the denote ID/path,
and will work with any format supported by `org-link-preview-file`.
2026-02-24 10:13:06 -06:00
Protesilaos Stavrou 9f5a16f625
Tweak how denote--get-common-root-directory checks absolute paths to also work on Windows
I do not have a Windows machine to test this, though it seems
reasonable. I am doing this in response to issue 682 by Pratik-Mishra-497:
<https://github.com/protesilaos/denote/issues/682>.
2026-02-23 17:50:39 +02:00
Protesilaos Stavrou da0685d48d
Expand the manual with how to auto-encrypt new notes with a custom file type
I did this in response to issue 681 by Michael Jones:
<https://github.com/protesilaos/denote/issues/681>.
2026-02-13 13:52:34 +02:00
Protesilaos Stavrou e5d5a4f2d9
Clarify that denote-sequence is its own package
It used to be part of denote.git, but I moved it to its own repository.
2026-02-07 16:09:15 +02:00
Protesilaos Stavrou 2a542e20ff
Link to a more specific section in the manual about "-with-command" commands 2026-01-23 09:30:43 +02:00
Protesilaos Stavrou 3af6cbeb39
Mention denote-link-or-create-with-command in the manual
Thanks to Matthew Batson for the contribution in pull request 674:
<https://github.com/protesilaos/denote/pull/674>.

Matthew has assigned copyright to the Free Software Foundation.
2026-01-23 09:29:27 +02:00
Protesilaos Stavrou 0db5c56a8d
Adjust the spaces in denote-link-or-create-with-command
Thanks to Matthew Batson for the contribution in pull request 674:
<https://github.com/protesilaos/denote/pull/674>.

Matthew has assigned copyright to the Free Software Foundation.
2026-01-23 09:25:06 +02:00
Protesilaos Stavrou 8a573f8247
Merge pull request #674 from mbatson/add-denote-link-or-create-with-command
[Feature Proposal] Add denote-link-or-create-with-command
2026-01-23 09:20:43 +02:00
Protesilaos Stavrou 7b5fb18fab
Acknowledge gvalson for commit 9a9f71d
This was done in pull request 676: <https://github.com/protesilaos/denote/pull/676>.

The change is small, meaning that gvalson does not need to assign
copyright to the Free Software Foundation.
2026-01-23 08:52:03 +02:00
Protesilaos Stavrou 9f70a619db
Merge pull request #676 from gvalson/main
Add reference to the mir package in the manual
2026-01-23 08:50:19 +02:00
gvalson 9a9f71d109 Add reference to the mir package in the manual 2026-01-22 20:22:51 -05:00
Matthew Batson 51cbb47311 Add denote-link-or-create-with-command to the menu bar
The code in this commit was originally written by Protesilaos Stavrou
in commit 69391aa.
2026-01-21 18:38:59 +11:00
Matthew Batson 6ffa6881ce Add denote-link-or-create-with-command 2026-01-21 17:13:11 +11:00
Protesilaos Stavrou e9c44eec58
Use insert-buffer-substring instead of insert-buffer in denote--file-with-temp-buffer
The function insert-buffer is meant to be for interactive use only.

This follows the change made by duli in commit 0f71f12 via pull
request 672: <https://github.com/protesilaos/denote/pull/672>. The
author of the original change has assigned copyright to the Free
Software Foundation.

Also thanks to Jean-Philippe Gagné Guay for reviewing the change and
for reporting a problem with an earlier version of the code in issue
670: <https://github.com/protesilaos/denote/issues/670>.
2026-01-18 09:08:27 +02:00
Protesilaos Stavrou 927c862685
Reword the doc string of denote--file-with-temp-buffer
This follows the change made by duli in commit 0f71f12 via pull
request 672: <https://github.com/protesilaos/denote/pull/672>. The
author of the original change has assigned copyright to the Free
Software Foundation.

Also thanks to Jean-Philippe Gagné Guay for reviewing the change and
for reporting a problem with an earlier version of the code in issue
670: <https://github.com/protesilaos/denote/issues/670>.
2026-01-18 09:03:39 +02:00
Protesilaos Stavrou 159134fee1
Merge pull request #672 from kilesduli/fix-file-not-saved-but-need-rename
Fix front-matter retrieving when buffer is unsaved or file missing
2026-01-18 09:01:53 +02:00
duli 0f71f126cc
Fix front-matter retrieving when buffer is unsaved or file missing
This addresses a regression where
'denote-rename-file-using-front-matter' would fail to recognize changes
in an unsaved buffer, or fail entirely if the file had not yet been
created on disk (as described in
https://github.com/protesilaos/denote/pull/670).

The logic now consistently prioritizes the content of an open buffer
over the file on disk. Previously, the code would revert to reading the
file if the buffer was marked as modified; however, since we cannot
reliably detect if a modification affects the front-matter, it is safe
to always use the live buffer state.

* (denote--file-with-temp-buffer-subr): Remove.
(denote--file-with-temp-buffer): Refactor to prioritize buffer content
and remove the dependency on the internal subr.

Fixes: https://github.com/protesilaos/denote/pull/670
2026-01-17 23:17:14 +08:00