[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 1b4dc74e3c 224/355: Update denote-dired.el Comme
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 1b4dc74e3c 224/355: Update denote-dired.el Commentary section |
Date: |
Sun, 26 Jun 2022 23:58:26 -0400 (EDT) |
branch: externals/denote
commit 1b4dc74e3cdb9ca27f6ede1613947f742dd7205b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Update denote-dired.el Commentary section
---
denote-dired.el | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/denote-dired.el b/denote-dired.el
index fa4426dbad..0f2e924295 100644
--- a/denote-dired.el
+++ b/denote-dired.el
@@ -24,6 +24,62 @@
;;; Commentary:
;;
+;; Denote's file-naming scheme is not specific to notes or text files:
+;; it is useful for all sorts of files, such as multimedia and PDFs that
+;; form part of the user's longer-term storage (read manual's "The
+;; file-naming scheme"). While Denote does not manage such files, it
+;; already has all the mechanisms to facilitate the task of renaming
+;; them.
+;;
+;; To this end, we provide the `denote-dired-rename-file' command. It
+;; has a two-fold purpose: (i) to change the name of an existing file
+;; while retaining its identifier and (ii) to write a Denote-compliant
+;; file name for an item that was not created by `denote' or related
+;; commands (such as an image or PDF).
+;;
+;; The `denote-dired-rename-file' command will target the file at point
+;; if it finds one in the current Dired buffer. Otherwise it prompts
+;; with minibuffer completion for a file name. It then uses the
+;; familiar prompts for a `TITLE' and `KEYWORDS' the same way the
+;; `denote' command does (read manual's "Points of entry). As a final
+;; step, it asks for confirmation before renaming the file at point,
+;; showing a message like:
+;;
+;; Rename sample.pdf to 20220612T052900--my-sample-title__testing.pdf? (y
or n)
+;;
+;; However, if the user option `denote-dired-rename-expert' is non-nil,
+;; conduct the renaming operation outright---no questions asked.
+;;
+;; When operating on a file that has no identifier, such as
+;; `sample.pdf', Denote reads the file properties to retrieve its last
+;; modification time. If the file was from a past date like 2000-11-31
+;; it will get an identifier starting with `20001131' followed by the
+;; time component (per our file-naming scheme).
+;;
+;; The file type extension (e.g. `.pdf') is read from the underlying
+;; file and is preserved through the renaming process. Files that have
+;; no extension are simply left without one.
+;;
+;; Renaming only occurs relative to the current directory. Files are not
+;; moved between directories.
+;;
+;; The final step of the `denote-dired-rename-file' command is to call
+;; the special hook `denote-dired-post-rename-functions'. Functions
+;; added to that hook must accept three arguments, as explained in its
+;; doc string. For the time being, the only function we define is the
+;; one which updates the underlying note's front matter to match the new
+;; file name: `denote-dired-rewrite-front-matter'. The function takes
+;; care to only operate on an actual note, instead of arbitrary files.
+;;
+;; DEVELOPMENT NOTE: the `denote-dired-rewrite-front-matter' needs to be
+;; tested thoroughly. It rewrites file contents so we have to be sure
+;; it does the right thing. To avoid any trouble, it always asks for
+;; confirmation before performing the replacement. This confirmation
+;; ignores `denote-dired-rename-expert' for the time being, though we
+;; might want to lift that restriction once everything works as
+;; intended.
+;;
+;;
;; One of the upsides of Denote's file-naming scheme is the predictable
;; pattern it establishes, which appears as a near-tabular presentation in
;; a listing of notes (i.e. in Dired). The `denote-dired-mode' can help
- [elpa] externals/denote bfb2cdefd7 195/355: Rewrite manual on links (getting closer to v0.1.0), (continued)
- [elpa] externals/denote bfb2cdefd7 195/355: Rewrite manual on links (getting closer to v0.1.0), ELPA Syncer, 2022/06/27
- [elpa] externals/denote e37e429844 198/355: Add possible to-do for using xref, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 2327b5beb6 212/355: Add helper FNs to return title and date values, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 98113698a7 202/355: Expand sample configuration, ELPA Syncer, 2022/06/27
- [elpa] externals/denote cbaab43170 240/355: Update Acknowledgement: svnsbck => Sven Seebeck, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 9be3cfab99 215/355: Relocate defcustom where it belongs, ELPA Syncer, 2022/06/27
- [elpa] externals/denote b25704e041 211/355: Make denote-retrieve--value pass optional group, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 24997c6bc5 226/355: Remove "work-in-progress" from backlinks' section, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 25fe9870dc 225/355: Finalise 'denote:' custom Org hyperlink type, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 13bae5f9c4 235/355: Remove instability warnings (v0.1.0 is close), ELPA Syncer, 2022/06/27
- [elpa] externals/denote 1b4dc74e3c 224/355: Update denote-dired.el Commentary section,
ELPA Syncer <=
- [elpa] externals/denote 3a63c763c5 218/355: Improve post-rename front matter rewrite, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 5213c9e7af 241/355: Add section with alternatives to Denote, ELPA Syncer, 2022/06/27
- [elpa] externals/denote e0ff114a93 238/355: Update Denote sources in manual's introduction, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 7ce2f7d3e3 251/355: Use the 'denote-directory' function, not variable, ELPA Syncer, 2022/06/27
- [elpa] externals/denote c8f3e707c2 223/355: Revise one-line descriptions, where needed, ELPA Syncer, 2022/06/27
- [elpa] externals/denote a436cdf07e 221/355: Tweak doc strings, ELPA Syncer, 2022/06/27
- [elpa] externals/denote a5940b315a 265/355: Replace needless 'let*' with 'let', ELPA Syncer, 2022/06/27
- [elpa] externals/denote 5686e86cfc 262/355: Only show valid notes in file prompt, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 3d606cbe95 272/355: Simplify completion via 'org-insert-link', ELPA Syncer, 2022/06/27
- [elpa] externals/denote f21a99775d 256/355: Improve rename prompt; only rename regular files, ELPA Syncer, 2022/06/27