emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 0b153464ce 3/3: Document new denote-change-file-


From: ELPA Syncer
Subject: [elpa] externals/denote 0b153464ce 3/3: Document new denote-change-file-type command
Date: Mon, 20 Feb 2023 01:57:35 -0500 (EST)

branch: externals/denote
commit 0b153464ced5c5a20eb925fc9d242fe06ee08ec1
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Document new denote-change-file-type command
    
    Thanks to Jean-Philippe Gagné Guay for contributing it in pull request
    137 on the GitHub mirror: <https://github.com/protesilaos/denote/pull/137>.
---
 README.org | 28 ++++++++++++++++++++++++++++
 denote.el  |  9 +++++----
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index 5f535355c8..2b790f8881 100644
--- a/README.org
+++ b/README.org
@@ -1085,6 +1085,34 @@ modification, i.e. the one already written on disk.
 This command is useful for synchronizing multiple file names with their
 respective front matter.
 
+** Rename file by changing only its file type
+:PROPERTIES:
+:CUSTOM_ID: h:85b65995-89fd-4978-bba3-7bb6c8d6f945
+:END:
+
+[ Part of {{{development-version}}}. ]
+
+#+findex: denote-change-file-type
+The command ~denote-change-file-type~ provides the convenience of
+converting a note taken in one file type, say, =.txt= into another
+like =.org=.  It presents a choice among the ~denote-file-type~
+options.
+
+The conversion does NOT modify the existing front matter.  Instead, it
+prepends new front matter to the top of the file.  We do this as a
+safety precaution since the user can, in principle, add arbitrary
+extras to their front matter that we would not want to touch.
+
+If in Dired, ~denote-change-file-type~ operates on the file at point,
+else it prompts with minibuffer completion for one.
+
+The title of the file is retrieved from a line starting with a title
+field in the file's front matter, depending on the previous file type
+(e.g.  =#+title= for Org).  The same process applies for keywords.
+
+As a final step, the command asks for confirmation, showing the
+difference between old and new file names.
+
 * The file-naming scheme
 :PROPERTIES:
 :CUSTOM_ID: h:4e9c7512-84dc-4dfb-9fa9-e15d51178e5d
diff --git a/denote.el b/denote.el
index 95ff41bec6..6bf8dbf9e5 100644
--- a/denote.el
+++ b/denote.el
@@ -2128,15 +2128,16 @@ with minibuffer completion for one.
 Add a front matter in the format of the NEW-FILE-TYPE at the
 beginning of the file.
 
-The title is retrieved from a line starting with a title field in
-the file's contents, depending on the previous file type (e.g.
-#+title for Org). The same process applies for keywords and id.
+Retrieve the title of FILE from a line starting with a title
+field in its front matter, depending on the previous file
+type (e.g.  #+title for Org).  The same process applies for
+keywords.
 
 As a final step, ask for confirmation, showing the difference
 between old and new file names.
 
 Important note: No attempt is made to modify any other elements
-of the file. This needs to be done manually."
+of the file.  This needs to be done manually."
   (interactive
    (list
     (denote--rename-dired-file-or-prompt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]