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

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

[elpa] externals/denote 0d7b81955d: Stop using vc-rename-file to rename


From: ELPA Syncer
Subject: [elpa] externals/denote 0d7b81955d: Stop using vc-rename-file to rename files
Date: Fri, 3 Nov 2023 06:57:51 -0400 (EDT)

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

    Stop using vc-rename-file to rename files
    
    The reason is that it requires the buffer to be saved, but we do not
    want that after modifying the front matter because we want to give the
    user a chance to confirm what happened.
    
    Thanks to Frédéric Willem for reporting the problem in issue 185 on
    the GitHub mirror: <https://github.com/protesilaos/denote/issues/185>.
---
 README.org | 16 ++++++++--------
 denote.el  |  9 +++++++--
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index 4e933c86c8..49b5b6b766 100644
--- a/README.org
+++ b/README.org
@@ -4764,14 +4764,14 @@ Denote is meant to be a collective effort.  Every bit 
of help matters.
 + Ideas and/or user feedback :: Abin Simon, Aditya Yadav, Alan
   Schmitt, Alfredo Borrás, Ashton Wiersdorf, Benjamin Kästner, Colin
   McLear, Damien Cassou, Elias Storms, Federico Stilman, Florian,
-  Frank Ehmsen, Guo Yong, Hanspeter Gisler, Jack Baty, Jay Rajput,
-  Jean-Charles Bagneris, Jens Östlund, Jeremy Friesen, Jonathan Sahar,
-  Johan Bolmsjö, Juanjo Presa, Kai von Fintel, Kaushal Modi, M. Hadi
-  Timachi, Mark Olson, Mirko Hernandez, Niall Dooley, Paul van Gelder,
-  Peter Prevos, Suhail Singh, Shreyas Ragavan, Stefan Thesing, Summer
-  Emacs, Sven Seebeck, Taoufik, TJ Stankus, Viktor Haag, Wade Mealing,
-  Yi Liu, Ypot, atanasj, doolio, drcxd, hpgisler, pRot0ta1p, rbenit68,
-  relict007, sienic, sundar bp.
+  Frédéric Willem Frank Ehmsen, Guo Yong, Hanspeter Gisler, Jack Baty,
+  Jay Rajput, Jean-Charles Bagneris, Jens Östlund, Jeremy Friesen,
+  Jonathan Sahar, Johan Bolmsjö, Juanjo Presa, Kai von Fintel, Kaushal
+  Modi, M. Hadi Timachi, Mark Olson, Mirko Hernandez, Niall Dooley,
+  Paul van Gelder, Peter Prevos, Suhail Singh, Shreyas Ragavan, Stefan
+  Thesing, Summer Emacs, Sven Seebeck, Taoufik, TJ Stankus, Viktor
+  Haag, Wade Mealing, Yi Liu, Ypot, atanasj, doolio, drcxd, hpgisler,
+  pRot0ta1p, rbenit68, relict007, sienic, sundar bp.
 
 Special thanks to Peter Povinec who helped refine the file-naming
 scheme, which is the cornerstone of this project.
diff --git a/denote.el b/denote.el
index 9ac3d372d3..3a2dba93c8 100644
--- a/denote.el
+++ b/denote.el
@@ -2188,8 +2188,13 @@ the file type is assumed to be the first of 
`denote-file-types'."
     (cond
      ((derived-mode-p 'dired-mode)
       (dired-rename-file old-name new-name nil))
-     ((vc-backend old-name)
-      (vc-rename-file old-name new-name))
+     ;; FIXME 2023-11-03: The `vc-rename-file' requires the file to be
+     ;; saved, but our convention is to not save the buffer after
+     ;; changing front matter unless we absolutely have to (allows
+     ;; users to do `diff-buffer-with-file', for example).
+
+     ;; ((vc-backend old-name)
+     ;;  (vc-rename-file old-name new-name))
      (t
       (rename-file old-name new-name nil)))
     (denote--rename-buffer old-name new-name)))



reply via email to

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