Browse Source

Merge branch 'maint'

Kyle Meyer 8 years ago
parent
commit
63aaffdc11
4 changed files with 12 additions and 7 deletions
  1. 0 4
      lisp/ob-core.el
  2. 2 2
      lisp/org-agenda.el
  3. 2 1
      lisp/org-clock.el
  4. 8 0
      lisp/org-compat.el

+ 0 - 4
lisp/ob-core.el

@@ -2905,10 +2905,6 @@ can be specified as the REGEXP argument."
       (setq string (substring string 0 -1)))
       (setq string (substring string 0 -1)))
     string))
     string))
 
 
-(defun org-babel-local-file-name (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)
 (defun org-babel-process-file-name (name &optional no-quote-p)
   "Prepare NAME to be used in an external process.
   "Prepare NAME to be used in an external process.
 If NAME specifies a remote location, the remote portion of the
 If NAME specifies a remote location, the remote portion of the

+ 2 - 2
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
 settings  A list of option settings, similar to that in a let form, so like
           this: ((opt1 val1) (opt2 val2) ...).   The values will be
           this: ((opt1 val1) (opt2 val2) ...).   The values will be
           evaluated at the moment of execution, so quote them when needed.
           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
           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
           is written out.  If it ends in \".ps\", a postscript version is
           produced.  Otherwise, only the plain text is written to the file.
           produced.  Otherwise, only the plain text is written to the file.

+ 2 - 1
lisp/org-clock.el

@@ -2918,7 +2918,8 @@ The details of what will be saved are regulated by the variable
 		 org-clock-has-been-used
 		 org-clock-has-been-used
 		 (not (file-exists-p org-clock-persist-file))))
 		 (not (file-exists-p org-clock-persist-file))))
     (with-temp-file 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)
 		      (system-name)
 		      (format-time-string (org-time-stamp-format t))))
 		      (format-time-string (org-time-stamp-format t))))
       ;; Store clock to be resumed.
       ;; Store clock to be resumed.

+ 8 - 0
lisp/org-compat.el

@@ -482,6 +482,14 @@ Pass COLUMN and FORCE to `move-to-column'."
     (lambda (&optional _beg _end)
     (lambda (&optional _beg _end)
       (with-no-warnings (font-lock-fontify-buffer)))))
       (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)
 (defmacro org-no-popups (&rest body)
   "Suppress popup windows.
   "Suppress popup windows.
 Let-bind some variables to nil around BODY to achieve the desired
 Let-bind some variables to nil around BODY to achieve the desired