Merge branch 'maint'

This commit is contained in:
Kyle Meyer 2015-09-22 01:01:47 -04:00
commit 5e9bdbfac6
6 changed files with 38 additions and 39 deletions

View File

@ -205,7 +205,7 @@ This function is called by `org-babel-execute-src-block'."
"Generate a file from a pdf file using imagemagick." "Generate a file from a pdf file using imagemagick."
(let ((cmd (concat "convert " im-in-options " " pdffile " " (let ((cmd (concat "convert " im-in-options " " pdffile " "
im-out-options " " out-file))) im-out-options " " out-file)))
(message (concat "Converting pdffile file " cmd "...")) (message "Converting pdffile file %s..." cmd)
(shell-command cmd))) (shell-command cmd)))
(defun org-babel-latex-tex-to-pdf (file) (defun org-babel-latex-tex-to-pdf (file)

View File

@ -133,9 +133,10 @@ See `org-crypt-disable-auto-save'."
(and (and
(eq org-crypt-disable-auto-save 'ask) (eq org-crypt-disable-auto-save 'ask)
(y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? "))) (y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? ")))
(message (concat "org-decrypt: Disabling auto-save-mode for " (or (buffer-file-name) (current-buffer)))) (message "org-decrypt: Disabling auto-save-mode for %s"
; The argument to auto-save-mode has to be "-1", since (or (buffer-file-name) (current-buffer)))
; giving a "nil" argument toggles instead of disabling. ;; The argument to auto-save-mode has to be "-1", since
;; giving a "nil" argument toggles instead of disabling.
(auto-save-mode -1)) (auto-save-mode -1))
((eq org-crypt-disable-auto-save nil) ((eq org-crypt-disable-auto-save nil)
(message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage.")) (message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage."))

View File

@ -49,7 +49,7 @@
(defvar org-timer-countdown-timer nil (defvar org-timer-countdown-timer nil
"Current countdown timer. "Current countdown timer.
This is a timer object if there is an active countdown timer, This is a timer object if there is an active countdown timer,
'paused' if there is a paused countdown timer, and nil `paused' if there is a paused countdown timer, and nil
otherwise.") otherwise.")
(defvar org-timer-countdown-timer-title nil (defvar org-timer-countdown-timer-title nil
@ -163,13 +163,12 @@ With prefix arg STOP, stop it entirely."
(let ((start-secs (org-float-time org-timer-start-time)) (let ((start-secs (org-float-time org-timer-start-time))
(pause-secs (org-float-time org-timer-pause-time))) (pause-secs (org-float-time org-timer-pause-time)))
(if org-timer-countdown-timer (if org-timer-countdown-timer
(progn (let ((new-secs (- start-secs pause-secs)))
(let ((new-secs (- start-secs pause-secs))) (setq org-timer-countdown-timer
(setq org-timer-countdown-timer (org-timer--run-countdown-timer
(org-timer--run-countdown-timer new-secs org-timer-countdown-timer-title))
new-secs org-timer-countdown-timer-title)) (setq org-timer-start-time
(setq org-timer-start-time (time-add (current-time) (seconds-to-time new-secs))))
(time-add (current-time) (seconds-to-time new-secs)))))
(setq org-timer-start-time (setq org-timer-start-time
;; Pass `current-time' result to `org-float-time' ;; Pass `current-time' result to `org-float-time'
;; (instead of calling without arguments) so that only ;; (instead of calling without arguments) so that only
@ -184,10 +183,10 @@ With prefix arg STOP, stop it entirely."
;; pause timer ;; pause timer
(when org-timer-countdown-timer (when org-timer-countdown-timer
(cancel-timer org-timer-countdown-timer) (cancel-timer org-timer-countdown-timer)
(setq org-timer-countdown-timer 'pause)) (setq org-timer-countdown-timer 'paused))
(run-hooks 'org-timer-pause-hook) (run-hooks 'org-timer-pause-hook)
(setq org-timer-pause-time (current-time)) (setq org-timer-pause-time (current-time))
(org-timer-set-mode-line 'pause) (org-timer-set-mode-line 'paused)
(message "Timer paused at %s" (org-timer-value-string))))) (message "Timer paused at %s" (org-timer-value-string)))))
(defun org-timer-stop () (defun org-timer-stop ()
@ -332,7 +331,7 @@ If the integer is negative, the string will start with \"-\"."
(defun org-timer-set-mode-line (value) (defun org-timer-set-mode-line (value)
"Set the mode-line display for relative or countdown timer. "Set the mode-line display for relative or countdown timer.
VALUE can be `on', `off', or `pause'." VALUE can be `on', `off', or `paused'."
(when (or (eq org-timer-display 'mode-line) (when (or (eq org-timer-display 'mode-line)
(eq org-timer-display 'both)) (eq org-timer-display 'both))
(or global-mode-string (setq global-mode-string '(""))) (or global-mode-string (setq global-mode-string '("")))
@ -358,7 +357,7 @@ VALUE can be `on', `off', or `pause'."
(setq frame-title-format (setq frame-title-format
(delq 'org-timer-mode-line-string frame-title-format))) (delq 'org-timer-mode-line-string frame-title-format)))
(force-mode-line-update)) (force-mode-line-update))
((equal value 'pause) ((equal value 'paused)
(when org-timer-mode-line-timer (when org-timer-mode-line-timer
(cancel-timer org-timer-mode-line-timer) (cancel-timer org-timer-mode-line-timer)
(setq org-timer-mode-line-timer nil))) (setq org-timer-mode-line-timer nil)))
@ -450,23 +449,22 @@ using three `C-u' prefix arguments."
(org-timer-show-remaining-time) (org-timer-show-remaining-time)
(let ((secs (org-timer-hms-to-secs (org-timer-fix-incomplete minutes))) (let ((secs (org-timer-hms-to-secs (org-timer-fix-incomplete minutes)))
(hl (org-timer--get-timer-title))) (hl (org-timer--get-timer-title)))
(if (or (not org-timer-countdown-timer) (if (and org-timer-countdown-timer
(equal opt '(16)) (not (or (equal opt '(16))
(y-or-n-p "Replace current timer? ")) (y-or-n-p "Replace current timer? "))))
(progn (message "No timer set")
(when (timerp org-timer-countdown-timer) (when (timerp org-timer-countdown-timer)
(cancel-timer org-timer-countdown-timer)) (cancel-timer org-timer-countdown-timer))
(setq org-timer-countdown-timer-title (setq org-timer-countdown-timer-title
(org-timer--get-timer-title)) (org-timer--get-timer-title))
(setq org-timer-countdown-timer (setq org-timer-countdown-timer
(org-timer--run-countdown-timer (org-timer--run-countdown-timer
secs org-timer-countdown-timer-title)) secs org-timer-countdown-timer-title))
(run-hooks 'org-timer-set-hook) (run-hooks 'org-timer-set-hook)
(setq org-timer-start-time (setq org-timer-start-time
(time-add (current-time) (seconds-to-time secs))) (time-add (current-time) (seconds-to-time secs)))
(setq org-timer-pause-time nil) (setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)) (org-timer-set-mode-line 'on))))))
(message "No timer set"))))))
(defun org-timer--run-countdown-timer (secs title) (defun org-timer--run-countdown-timer (secs title)
"Start countdown timer that will last SECS. "Start countdown timer that will last SECS.

View File

@ -1225,8 +1225,8 @@ Return PDF file name or an error if it couldn't be produced."
;; Check for process failure. Provide collected errors if ;; Check for process failure. Provide collected errors if
;; possible. ;; possible.
(if (not (file-exists-p pdffile)) (if (not (file-exists-p pdffile))
(error (concat (format "PDF file %s wasn't produced" pdffile) (error "PDF file %s wasn't produced%s" pdffile
(when errors (concat ": " errors)))) (if errors (concat ": " errors) ""))
;; Else remove log files, when specified, and signal end of ;; Else remove log files, when specified, and signal end of
;; process to user, along with any error encountered. ;; process to user, along with any error encountered.
(when org-man-remove-logfiles (when org-man-remove-logfiles

View File

@ -4115,8 +4115,8 @@ contextual information."
nil standard-output nil (cdr cmd))))) nil standard-output nil (cdr cmd)))))
(or (zerop exitcode) (or (zerop exitcode)
(error (concat "Unable to create OpenDocument file." (error (concat "Unable to create OpenDocument file."
(format " Zip failed with error (%s)" " Zip failed with error (%s)")
err-string))))) err-string)))
cmds))) cmds)))
;; Move the zip file from temporary work directory to ;; Move the zip file from temporary work directory to
;; user-mandated location. ;; user-mandated location.

View File

@ -1611,8 +1611,8 @@ Return INFO file name or an error if it couldn't be produced."
;; Check for process failure. Provide collected errors if ;; Check for process failure. Provide collected errors if
;; possible. ;; possible.
(if (not (file-exists-p infofile)) (if (not (file-exists-p infofile))
(error (concat (format "INFO file %s wasn't produced" infofile) (error "INFO file %s wasn't produced%s" infofile
(when errors (concat ": " errors)))) (if errors (concat ": " errors) ""))
;; Else remove log files, when specified, and signal end of ;; Else remove log files, when specified, and signal end of
;; process to user, along with any error encountered. ;; process to user, along with any error encountered.
(when org-texinfo-remove-logfiles (when org-texinfo-remove-logfiles