From 33e8a3b5d7baa5516f56d7f3d2fd098f214358f7 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 25 Jan 2017 20:48:41 -0500 Subject: [PATCH 1/4] org-agenda: Fix docstring typo * lisp/org-agenda.el (org-agenda-custom-commands): Fix docstring typo. --- lisp/org-agenda.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 220ba5f58..cdbcd4fd3 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -469,8 +469,8 @@ match What to search for: settings A list of option settings, similar to that in a let form, so like this: ((opt1 val1) (opt2 val2) ...). The values will be evaluated at the moment of execution, so quote them when needed. -files A list of files file to write the produced agenda buffer to - with the command `org-store-agenda-views'. +files A list of files to write the produced agenda buffer to with + the command `org-store-agenda-views'. If a file name ends in \".html\", an HTML version of the buffer is written out. If it ends in \".ps\", a postscript version is produced. Otherwise, only the plain text is written to the file. From ec834812f7db80fed63ee3d7393ac31a29eb01cf Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 25 Jan 2017 21:20:14 -0500 Subject: [PATCH 2/4] org-clock: Correct file name in header * lisp/org-clock.el (org-clock-save): Use the variable org-clock-persist-file as the file name in the header rather than hardcoding it to "org-persist.el". From the introduction of org-clock-save in 6ca205398 (Add clock persistence., 2008-10-23), the hardcoded file name did not match the value of org-clock-persist-file. --- lisp/org-clock.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 1d0728ec2..26d7a9247 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -2920,7 +2920,8 @@ The details of what will be saved are regulated by the variable org-clock-has-been-used (not (file-exists-p org-clock-persist-file)))) (with-temp-file org-clock-persist-file - (insert (format ";; org-persist.el - %s at %s\n" + (insert (format ";; %s - %s at %s\n" + (file-name-nondirectory org-clock-persist-file) (system-name) (format-time-string (org-time-stamp-format t)))) ;; Store clock to be resumed. From e97f04de8eb410c188686c33a0b03d96d936de78 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 20 Nov 2016 16:29:47 +0100 Subject: [PATCH 3/4] Backport commit 22946702b from Emacs * lisp/ob-core.el (org-babel-local-file-name): Use `file-local-name' when available. 22946702b4296c0e42e4baf6221e205b52d05cbf Michael Albinus Sun Nov 20 16:29:47 2016 +0100 --- lisp/ob-core.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 663fe18b0..1ba048ab1 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2905,9 +2905,12 @@ can be specified as the REGEXP argument." (setq string (substring string 0 -1))) string)) -(defun org-babel-local-file-name (file) - "Return the local name component of FILE." - (or (file-remote-p file 'localname) file)) +(defalias 'org-babel-local-file-name + (if (fboundp 'file-local-name) + 'file-local-name + (lambda (file) + "Return the local name component of FILE." + (or (file-remote-p file 'localname) file)))) (defun org-babel-process-file-name (name &optional no-quote-p) "Prepare NAME to be used in an external process. From ffa4502771ff98765b688a398e5872ddba3ac013 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 25 Jan 2017 21:34:58 -0500 Subject: [PATCH 4/4] ob-core: Move org-babel-local-file-name to org-compat.el * lisp/ob-core.el (org-babel-process-file-name): Move to org-compat.el. * lisp/org-compat.el (org-babel-local-file-name): Add compatibility alias. --- lisp/ob-core.el | 7 ------- lisp/org-compat.el | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 1ba048ab1..8d0878403 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2905,13 +2905,6 @@ can be specified as the REGEXP argument." (setq string (substring string 0 -1))) string)) -(defalias 'org-babel-local-file-name - (if (fboundp 'file-local-name) - 'file-local-name - (lambda (file) - "Return the local name component of FILE." - (or (file-remote-p file 'localname) file)))) - (defun org-babel-process-file-name (name &optional no-quote-p) "Prepare NAME to be used in an external process. If NAME specifies a remote location, the remote portion of the diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 70cedbe9a..f4d389e52 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -430,6 +430,14 @@ Pass COLUMN and FORCE to `move-to-column'." (lambda (&optional _beg _end) (with-no-warnings (font-lock-fontify-buffer))))) +;; `file-local-name' was added in Emacs 26.1. +(defalias 'org-babel-local-file-name + (if (fboundp 'file-local-name) + 'file-local-name + (lambda (file) + "Return the local name component of FILE." + (or (file-remote-p file 'localname) file)))) + (defmacro org-no-popups (&rest body) "Suppress popup windows. Let-bind some variables to nil around BODY to achieve the desired