emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: emacs-orgmode@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PROPOSED-PATCH] ox-publish: fix typo in function name
Date: Sat, 23 Jul 2022 16:01:58 -0700	[thread overview]
Message-ID: <20220723230158.16833-1-eggert@cs.ucla.edu> (raw)

* lisp/ox-publish.el (org-publish-cache-mtime-of-src):
Rename from org-publish-cache-ctime-of-src, since it
has always cached mtime not ctime.  All uses changed.
---
 lisp/ox-publish.el | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 5c6ad94c9..e3d67b695 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -379,7 +379,7 @@ still decide about that independently."
   "Update publishing timestamp for file FILENAME.
 If there is no timestamp, create one."
   (let ((key (org-publish-timestamp-filename filename pub-dir pub-func))
-	(stamp (org-publish-cache-ctime-of-src filename)))
+	(stamp (org-publish-cache-mtime-of-src filename)))
     (org-publish-cache-set key stamp)))
 
 (defun org-publish-remove-all-timestamps ()
@@ -1287,7 +1287,7 @@ the file including them will be republished as well."
   (let* ((key (org-publish-timestamp-filename filename pub-dir pub-func))
 	 (pstamp (org-publish-cache-get key))
 	 (org-inhibit-startup t)
-	 included-files-ctime)
+	 included-files-mtime)
     (when (equal (file-name-extension filename) "org")
       (let ((visiting (find-buffer-visiting filename))
 	    (buf (find-file-noselect filename))
@@ -1308,15 +1308,15 @@ the file including them will be republished as well."
 				       (substring m 0 (match-beginning 0))
 				     m)))))
 		      (when filename
-			(push (org-publish-cache-ctime-of-src
+			(push (org-publish-cache-mtime-of-src
 			       (expand-file-name filename))
-			      included-files-ctime)))))))
+			      included-files-mtime)))))))
 	  (unless visiting (kill-buffer buf)))))
     (or (null pstamp)
-	(let ((ctime (org-publish-cache-ctime-of-src filename)))
-	  (or (time-less-p pstamp ctime)
-	      (cl-some (lambda (ct) (time-less-p ctime ct))
-		       included-files-ctime))))))
+	(let ((mtime (org-publish-cache-mtime-of-src filename)))
+	  (or (time-less-p pstamp mtime)
+	      (cl-some (lambda (ct) (time-less-p mtime ct))
+		       included-files-mtime))))))
 
 (defun org-publish-cache-set-file-property
   (filename property value &optional project-name)
@@ -1361,8 +1361,8 @@ does not exist."
     (error "`org-publish-cache-set' called, but no cache present"))
   (puthash key value org-publish-cache))
 
-(defun org-publish-cache-ctime-of-src (file)
-  "Get the ctime of FILE as an integer."
+(defun org-publish-cache-mtime-of-src (file)
+  "Get the mtime of FILE as an integer."
   (let ((attr (file-attributes
 	       (expand-file-name (or (file-symlink-p file) file)
 				 (file-name-directory file)))))
-- 
2.37.1



             reply	other threads:[~2022-07-23 23:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 23:01 Paul Eggert [this message]
2022-07-24  7:45 ` [PROPOSED-PATCH] ox-publish: fix typo in function name Ihor Radchenko
2022-07-24 16:40   ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220723230158.16833-1-eggert@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).