Browse Source

Merge branch 'maint'

Bastien Guerry 5 years ago
parent
commit
8866f86624
7 changed files with 25 additions and 24 deletions
  1. 1 0
      contrib/lisp/org-contacts.el
  2. 1 1
      lisp/ob-haskell.el
  3. 2 1
      lisp/org-agenda.el
  4. 2 1
      lisp/org-capture.el
  5. 1 1
      lisp/org-clock.el
  6. 14 18
      lisp/org-latex.el
  7. 4 2
      lisp/org.el

+ 1 - 0
contrib/lisp/org-contacts.el

@@ -42,6 +42,7 @@
 (eval-and-compile
   (require 'org))
 (require 'gnus-util)
+(require 'org-agenda)
 
 (defgroup org-contacts nil
   "Options concerning contacts management."

+ 1 - 1
lisp/ob-haskell.el

@@ -148,7 +148,7 @@ specifying a variable of the same value."
 
 (defvar org-src-preserve-indentation)
 (declare-function org-export-as-latex "org-latex"
-		  (arg &optional hidden ext-plist to-buffer body-only pub-dir))
+		  (arg &optional ext-plist to-buffer body-only pub-dir))
 (defun org-babel-haskell-export-to-lhs (&optional arg)
   "Export to a .lhs file with all haskell code blocks escaped.
 When called with a prefix argument the resulting

+ 2 - 1
lisp/org-agenda.el

@@ -5482,7 +5482,8 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
 		tags (save-excursion (org-backward-heading-same-level 0)
 				     (org-get-tags-at))
 		todo-state (org-get-todo-state)
-		warntime (org-entry-get (point) "APPT_WARNTIME"))
+		warntime (org-entry-get (point) "APPT_WARNTIME")
+		extra nil)
 
 	  (dolist (r (if (stringp result)
 			 (list result)

+ 2 - 1
lisp/org-capture.el

@@ -1250,7 +1250,8 @@ Of course, if exact position has been required, just put it there."
 	(save-restriction
 	  (widen)
 	  (goto-char pos)
-	  (bookmark-set "org-capture-last-stored")
+	  (with-demoted-errors
+	    (bookmark-set "org-capture-last-stored"))
 	  (move-marker org-capture-last-stored-marker (point)))))))
 
 (defun org-capture-narrow (beg end)

+ 1 - 1
lisp/org-clock.el

@@ -1149,7 +1149,6 @@ make this the default behavior.)"
 	    (if (and (eobp) (not (org-at-heading-p)))
 		(point-at-bol 0)
 	      (point)))
-      (run-hooks 'org-clock-in-prepare-hook)
       (save-excursion
 	(when (and selected-task (marker-buffer selected-task))
 	  ;; There is a selected task, move to the correct buffer
@@ -1168,6 +1167,7 @@ make this the default behavior.)"
 	      ;; beginning of the heading, since the
 	      ;; user is liking to insert stuff here
 	      ;; manually
+	      (run-hooks 'org-clock-in-prepare-hook)
 	      (org-clock-history-push))
 	    (org-clock-set-current)
 	    (cond ((functionp org-clock-in-switch-to-state)

+ 14 - 18
lisp/org-latex.el

@@ -787,14 +787,14 @@ emacs   --batch
         --load=$HOME/lib/emacs/org.el
         --eval \"(setq org-export-headline-levels 2)\"
         --visit=MyFile --funcall org-export-as-latex-batch"
-  (org-export-as-latex org-export-headline-levels 'hidden))
+  (org-export-as-latex org-export-headline-levels))
 
 ;;;###autoload
 (defun org-export-as-latex-to-buffer (arg)
   "Call `org-export-as-latex` with output to a temporary buffer.
 No file is created.  The prefix ARG is passed through to `org-export-as-latex'."
   (interactive "P")
-  (org-export-as-latex arg nil nil "*Org LaTeX Export*")
+  (org-export-as-latex arg nil "*Org LaTeX Export*")
   (when org-export-show-temporary-export-buffer
     (switch-to-buffer-other-window "*Org LaTeX Export*")))
 
@@ -848,7 +848,7 @@ in a window.  A non-interactive call will only return the buffer."
     (set-mark (point)) ;; to activate the region
     (goto-char beg)
     (setq rtn (org-export-as-latex
-	       nil nil ext-plist
+	       nil ext-plist
 	       buffer body-only))
     (if (fboundp 'deactivate-mark) (deactivate-mark))
     (if (and (org-called-interactively-p 'any) (bufferp rtn))
@@ -856,21 +856,19 @@ in a window.  A non-interactive call will only return the buffer."
       rtn)))
 
 ;;;###autoload
-(defun org-export-as-latex (arg &optional hidden ext-plist
-				to-buffer body-only pub-dir)
+(defun org-export-as-latex (arg &optional ext-plist to-buffer body-only pub-dir)
   "Export current buffer to a LaTeX file.
 If there is an active region, export only the region.  The prefix
 ARG specifies how many levels of the outline should become
 headlines.  The default is 3.  Lower levels will be exported
 depending on `org-export-latex-low-levels'.  The default is to
 convert them as description lists.
-HIDDEN is obsolete and does nothing.
-EXT-PLIST is a property list with
-external parameters overriding org-mode's default settings, but
-still inferior to file-local settings.  When TO-BUFFER is
-non-nil, create a buffer with that name and export to that
-buffer.  If TO-BUFFER is the symbol `string', don't leave any
-buffer behind but just return the resulting LaTeX as a string.
+EXT-PLIST is a property list with external parameters overriding
+org-mode's default settings, but still inferior to file-local settings.
+When TO-BUFFER is non-nil, create a buffer with that name and export
+to that buffer.  If TO-BUFFER is the symbol `string', don't leave any
+buffer behind and just return the resulting LaTeX as a string, with
+no LaTeX header.
 When BODY-ONLY is set, don't produce the file header and footer,
 simply return the content of \\begin{document}...\\end{document},
 without even the \\begin{document} and \\end{document} commands.
@@ -957,10 +955,9 @@ when PUB-DIR is set, use this as the publishing directory."
 	 (auto-insert nil); Avoid any auto-insert stuff for the new file
 	 (TeX-master (boundp 'TeX-master))
 	 (buffer (if to-buffer
-		     (cond
-		      ((eq to-buffer 'string) (get-buffer-create
-					       "*Org LaTeX Export*"))
-		      (t (get-buffer-create to-buffer)))
+		     (if (eq to-buffer 'string)
+			 (get-buffer-create "*Org LaTeX Export*")
+		       (get-buffer-create to-buffer))
 		   (find-file-noselect filename)))
 	 (odd org-odd-levels-only)
 	 (header (org-export-latex-make-header title opt-plist))
@@ -1120,8 +1117,7 @@ when PUB-DIR is set, use this as the publishing directory."
   (interactive "P")
   (message "Exporting to PDF...")
   (let* ((wconfig (current-window-configuration))
-	 (lbuf (org-export-as-latex arg hidden ext-plist
-				    to-buffer body-only pub-dir))
+	 (lbuf (org-export-as-latex arg ext-plist to-buffer body-only pub-dir))
 	 (file (buffer-file-name lbuf))
 	 (base (file-name-sans-extension (buffer-file-name lbuf)))
 	 (pdffile (concat base ".pdf"))

+ 4 - 2
lisp/org.el

@@ -10967,11 +10967,13 @@ prefix argument (`C-u C-u C-u C-c C-w')."
 		  (and org-auto-align-tags
 		       (let ((org-loop-over-headlines-in-active-region nil))
 			 (org-set-tags nil t)))
-		  (bookmark-set "org-refile-last-stored")
+		  (with-demoted-errors
+		    (bookmark-set "org-refile-last-stored"))
 		  ;; If we are refiling for capture, make sure that the
 		  ;; last-capture pointers point here
 		  (when (org-bound-and-true-p org-refile-for-capture)
-		    (bookmark-set "org-capture-last-stored-marker")
+		    (with-demoted-errors
+		      (bookmark-set "org-capture-last-stored-marker"))
 		    (move-marker org-capture-last-stored-marker (point)))
 		  (if (fboundp 'deactivate-mark) (deactivate-mark))
 		  (run-hooks 'org-after-refile-insert-hook))))