emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org Clock Timer in Frame Title bug
@ 2012-04-21 23:45 Mike McLean
  2012-04-22  0:43 ` Matt Lundin
  0 siblings, 1 reply; 7+ messages in thread
From: Mike McLean @ 2012-04-21 23:45 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 88501 bytes --]

It appears that there is a small problem with commit 37fafb7b9e4e8e1eeb6b8faa76a1621c28970ef5 (Option for clock and timer to be displayed in frame-title). The default value offrame-title-format in my setup is t and this causes an error when clocking in/out.

Setup

M-x emacs-version
GNU Emacs 24.1.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-04-21 on bob.porkrind.org

M-x org-version
Org-mode version 7.8.09 (release_7.8.09-335-geabf89 @ /Users/mlm/.emacs.d/el-get/org-mode/lisp/org-install.el)

M-x describe-variable <RET> frame-title-format

frame-title-format is a variable defined in `C source code'.
Its value is t

Comments

In both of the backtrace-outputs below, the offending delq(org-frame-title-string t) refers to org-clock-out in org-clock.el, starting at line 1365. The second argument of delqis supposed to be a list and t is not a list.

The workaround is to setq-default frame-title-format in ~/.emacs and that avoids the error.

Note that I had not even realized that there were options on how to display the current clock (org-clock-clocked-in-display) and did not have a setting of this variable before today.

When Clocking In

Debugger entered--Lisp error: (wrong-type-argument listp t)
  memq(org-frame-title-string t)
  (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format (quote (org-frame-title-string)))))
  (progn (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format (quote (org-frame-title-string))))))
  (if (or (eq org-clock-clocked-in-display (quote frame-title)) (eq org-clock-clocked-in-display (quote both))) (progn (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format (quote (org-frame-title-string)))))))
  (when (or (eq org-clock-clocked-in-display (quote frame-title)) (eq org-clock-clocked-in-display (quote both))) (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format (quote (org-frame-title-string))))))
  (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let ((newstate (funcall org-clock-in-switch-to-state (match-string 2)))) (if newstate (org-todo newstate)))) ((and org-clock-in-switch-to-state (not (looking-at (concat org-outline-regexp "[  ]*" org-clock-in-switch-to-state "\\>")))) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim (buffer-substring (match-end 1) (match-end 4))))) (setq org-clock-heading (cond ((and org-clock-heading-function (functionp org-clock-heading-function)) (funcall org-clock-heading-function)) ((looking-at org-complex-heading-regexp) (replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" (match-string 4))) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume (looking-at (concat "^[   ]*" org-clock-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" " *\\sw+.? +[012][0-9]:[0-5][0-9]\\)\\][   ]*$"))) (message "Matched %s" (match-string 1)) (setq ts (concat "[" (match-string 1) "]")) (goto-char (match-end 1)) (setq org-clock-start-time (apply (quote encode-time) (org-parse-time-string (match-string 1)))) (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start)))) ((eq org-clock-in-resume (quote auto-restart)) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw (quote abort) nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when (and (save-excursion (end-of-line 0) (org-in-item-p))) (beginning-of-line 1) (org-indent-line-to (- (org-get-indentation) 2))) (insert org-clock-string " ") (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start))) (setq org-clock-start-time (or (and leftover (y-or-n-p (format "You stopped another clock %d mins ago; start this one from then? " ...)) leftover) start-time (current-time))) (setq ts (org-insert-time-stamp org-clock-start-time (quote with-hm) (quote inactive))))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display (quote mode-line)) (eq org-clock-clocked-in-display (quote both))) (or global-mode-string (setq global-mode-string (quote ("")))) (or (memq (quote org-mode-line-string) global-mode-string) (setq global-mode-string (append global-mode-string (quote (org-mode-line-string)))))) (when (or (eq org-clock-clocked-in-display (quote frame-title)) (eq org-clock-clocked-in-display (quote both))) (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format (quote (org-frame-title-string)))))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period (quote org-clock-update-mode-line)))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook)))
  (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let ((newstate (funcall org-clock-in-switch-to-state ...))) (if newstate (org-todo newstate)))) ((and org-clock-in-switch-to-state (not (looking-at (concat org-outline-regexp "[   ]*" org-clock-in-switch-to-state "\\>")))) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim (buffer-substring (match-end 1) (match-end 4))))) (setq org-clock-heading (cond ((and org-clock-heading-function (functionp org-clock-heading-function)) (funcall org-clock-heading-function)) ((looking-at org-complex-heading-regexp) (replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" (match-string 4))) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume (looking-at (concat "^[   ]*" org-clock-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" " *\\sw+.? +[012][0-9]:[0-5][0-9]\\)\\][   ]*$"))) (message "Matched %s" (match-string 1)) (setq ts (concat "[" (match-string 1) "]")) (goto-char (match-end 1)) (setq org-clock-start-time (apply (quote encode-time) (org-parse-time-string (match-string 1)))) (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start)))) ((eq org-clock-in-resume (quote auto-restart)) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw (quote abort) nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when (and (save-excursion (end-of-line 0) (org-in-item-p))) (beginning-of-line 1) (org-indent-line-to (- (org-get-indentation) 2))) (insert org-clock-string " ") (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start))) (setq org-clock-start-time (or (and leftover (y-or-n-p ...) leftover) start-time (current-time))) (setq ts (org-insert-time-stamp org-clock-start-time (quote with-hm) (quote inactive))))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display (quote mode-line)) (eq org-clock-clocked-in-display (quote both))) (or global-mode-string (setq global-mode-string (quote ("")))) (or (memq (quote org-mode-line-string) global-mode-string) (setq global-mode-string (append global-mode-string (quote (org-mode-line-string)))))) (when (or (eq org-clock-clocked-in-display (quote frame-title)) (eq org-clock-clocked-in-display (quote both))) (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format (quote (org-frame-title-string)))))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period (quote org-clock-update-mode-line)))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook))))
  (save-excursion (when (and selected-task (marker-buffer selected-task)) (set-buffer (org-base-buffer (marker-buffer selected-task))) (setq target-pos (marker-position selected-task)) (move-marker selected-task nil)) (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let ((newstate ...)) (if newstate (org-todo newstate)))) ((and org-clock-in-switch-to-state (not (looking-at ...))) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim (buffer-substring (match-end 1) (match-end 4))))) (setq org-clock-heading (cond ((and org-clock-heading-function (functionp org-clock-heading-function)) (funcall org-clock-heading-function)) ((looking-at org-complex-heading-regexp) (replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" (match-string 4))) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume (looking-at (concat "^[  ]*" org-clock-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" " *\\sw+.? +[012][0-9]:[0-5][0-9]\\)\\][   ]*$"))) (message "Matched %s" (match-string 1)) (setq ts (concat "[" (match-string 1) "]")) (goto-char (match-end 1)) (setq org-clock-start-time (apply (quote encode-time) (org-parse-time-string ...))) (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start)))) ((eq org-clock-in-resume (quote auto-restart)) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw (quote abort) nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when (and (save-excursion ... ...)) (beginning-of-line 1) (org-indent-line-to (- ... 2))) (insert org-clock-string " ") (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start))) (setq org-clock-start-time (or (and leftover ... leftover) start-time (current-time))) (setq ts (org-insert-time-stamp org-clock-start-time (quote with-hm) (quote inactive))))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display (quote mode-line)) (eq org-clock-clocked-in-display (quote both))) (or global-mode-string (setq global-mode-string (quote ("")))) (or (memq (quote org-mode-line-string) global-mode-string) (setq global-mode-string (append global-mode-string (quote ...))))) (when (or (eq org-clock-clocked-in-display (quote frame-title)) (eq org-clock-clocked-in-display (quote both))) (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format (quote ...))))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period (quote org-clock-update-mode-line)))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook)))))
  (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) (org-clocking-p))) ts selected-task target-pos (msg-extra "") (leftover (and (not org-clock-resolving-clocks) org-clock-leftover-time))) (when (and org-clock-auto-clock-resolution (or (not interrupting) (eq t org-clock-auto-clock-resolution)) (not org-clock-clocking-in) (not org-clock-resolving-clocks)) (setq org-clock-leftover-time nil) (let ((org-clock-clocking-in t)) (org-resolve-clocks))) (when (equal select (quote (4))) (setq selected-task (org-clock-select-task "Clock-in on task: ")) (if selected-task (setq selected-task (copy-marker selected-task)) (error "Abort"))) (when (equal select (quote (16))) (org-clock-mark-default-task)) (when interrupting (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t))) (setq target-pos (if (and (eobp) (not (org-at-heading-p))) (point-at-bol 0) (point))) (run-hooks (quote org-clock-in-prepare-hook)) (save-excursion (when (and selected-task (marker-buffer selected-task)) (set-buffer (org-base-buffer (marker-buffer selected-task))) (setq target-pos (marker-position selected-task)) (move-marker selected-task nil)) (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let (...) (if newstate ...))) ((and org-clock-in-switch-to-state (not ...)) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim (buffer-substring ... ...)))) (setq org-clock-heading (cond ((and org-clock-heading-function ...) (funcall org-clock-heading-function)) ((looking-at org-complex-heading-regexp) (replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" ...)) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume (looking-at ...)) (message "Matched %s" (match-string 1)) (setq ts (concat "[" ... "]")) (goto-char (match-end 1)) (setq org-clock-start-time (apply ... ...)) (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item ...))) ((eq org-clock-in-resume (quote auto-restart)) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw (quote abort) nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when (and ...) (beginning-of-line 1) (org-indent-line-to ...)) (insert org-clock-string " ") (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item ...)) (setq org-clock-start-time (or ... start-time ...)) (setq ts (org-insert-time-stamp org-clock-start-time ... ...)))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display (quote mode-line)) (eq org-clock-clocked-in-display (quote both))) (or global-mode-string (setq global-mode-string (quote ...))) (or (memq (quote org-mode-line-string) global-mode-string) (setq global-mode-string (append global-mode-string ...)))) (when (or (eq org-clock-clocked-in-display (quote frame-title)) (eq org-clock-clocked-in-display (quote both))) (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format ...)))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period (quote org-clock-update-mode-line)))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook))))))
  (catch (quote abort) (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) (org-clocking-p))) ts selected-task target-pos (msg-extra "") (leftover (and (not org-clock-resolving-clocks) org-clock-leftover-time))) (when (and org-clock-auto-clock-resolution (or (not interrupting) (eq t org-clock-auto-clock-resolution)) (not org-clock-clocking-in) (not org-clock-resolving-clocks)) (setq org-clock-leftover-time nil) (let ((org-clock-clocking-in t)) (org-resolve-clocks))) (when (equal select (quote (4))) (setq selected-task (org-clock-select-task "Clock-in on task: ")) (if selected-task (setq selected-task (copy-marker selected-task)) (error "Abort"))) (when (equal select (quote (16))) (org-clock-mark-default-task)) (when interrupting (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task ... ...)) (= (marker-position org-clock-hd-marker) (if selected-task ... ...)) (equal org-clock-current-task (nth 4 ...)))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t))) (setq target-pos (if (and (eobp) (not (org-at-heading-p))) (point-at-bol 0) (point))) (run-hooks (quote org-clock-in-prepare-hook)) (save-excursion (when (and selected-task (marker-buffer selected-task)) (set-buffer (org-base-buffer (marker-buffer selected-task))) (setq target-pos (marker-position selected-task)) (move-marker selected-task nil)) (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let ... ...)) ((and org-clock-in-switch-to-state ...) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim ...))) (setq org-clock-heading (cond (... ...) (... ...) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume ...) (message "Matched %s" ...) (setq ts ...) (goto-char ...) (setq org-clock-start-time ...) (setq org-clock-effort ...) (setq org-clock-total-time ...)) ((eq org-clock-in-resume ...) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw ... nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when ... ... ...) (insert org-clock-string " ") (setq org-clock-effort ...) (setq org-clock-total-time ...) (setq org-clock-start-time ...) (setq ts ...))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display ...) (eq org-clock-clocked-in-display ...)) (or global-mode-string (setq global-mode-string ...)) (or (memq ... global-mode-string) (setq global-mode-string ...))) (when (or (eq org-clock-clocked-in-display ...) (eq org-clock-clocked-in-display ...)) (or (memq ... frame-title-format) (setq frame-title-format ...))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period ...))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook)))))))
  org-clock-in(nil)
  call-interactively(org-clock-in)
  (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))
  (cond ((and org-use-speed-commands (setq org-speed-command (run-hook-with-args-until-success (quote org-speed-command-hook) (this-command-keys)))) (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))) ((and (org-table-p) (progn (and (featurep (quote org-table)) org-table-auto-blank-field (member last-command (quote (org-cycle org-return org-shifttab org-ctrl-c-ctrl-c yas/expand))) (if (or (equal ... 32) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (org-table-blank-field)) (org-table-blank-field))) t) (eq N 1) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (goto-char (1- (match-end 0))) (backward-delete-char 1) (goto-char (match-beginning 0)) (self-insert-command N))) (t (setq org-table-may-need-update t) (self-insert-command N) (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo (if (not (eq last-command (quote org-self-insert-command))) (setq org-self-insert-command-undo-counter 1) (if (>= org-self-insert-command-undo-counter 20) (setq org-self-insert-command-undo-counter 1) (and (> org-self-insert-command-undo-counter 0) buffer-undo-list (listp buffer-undo-list) (not (cadr buffer-undo-list)) (setcdr buffer-undo-list (cddr buffer-undo-list))) (setq org-self-insert-command-undo-counter (1+ org-self-insert-command-undo-counter)))))))
  org-self-insert-command(1)
  call-interactively(org-self-insert-command nil nil)
  recursive-edit()
  debug(error (wrong-type-argument listp t))
  delq(org-frame-title-string t)
  (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format))
  (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond ((functionp org-clock-out-switch-to-state) (looking-at org-complex-heading-regexp) (let (...) (if newstate ...))) ((and org-clock-out-switch-to-state (not ...)) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current)))
  (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond ((functionp org-clock-out-switch-to-state) (looking-at org-complex-heading-regexp) (let ... ...)) ((and org-clock-out-switch-to-state ...) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current))))
  (let (ts te s h m remove) (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond (... ... ...) (... ...))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current)))))
  (catch (quote exit) (when (not (org-clocking-p)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (force-mode-line-update) (if fail-quietly (throw (quote exit) t) (error "No active clock"))) (let (ts te s h m remove) (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply ... ...)) (org-float-time (apply ... ...))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= ... 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ ...)) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let (... ...) (cond ... ...)))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current))))))
  org-clock-out()
  call-interactively(org-clock-out)
  (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))
  (cond ((and org-use-speed-commands (setq org-speed-command (run-hook-with-args-until-success (quote org-speed-command-hook) (this-command-keys)))) (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))) ((and (org-table-p) (progn (and (featurep (quote org-table)) org-table-auto-blank-field (member last-command (quote (org-cycle org-return org-shifttab org-ctrl-c-ctrl-c yas/expand))) (if (or (equal ... 32) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (org-table-blank-field)) (org-table-blank-field))) t) (eq N 1) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (goto-char (1- (match-end 0))) (backward-delete-char 1) (goto-char (match-beginning 0)) (self-insert-command N))) (t (setq org-table-may-need-update t) (self-insert-command N) (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo (if (not (eq last-command (quote org-self-insert-command))) (setq org-self-insert-command-undo-counter 1) (if (>= org-self-insert-command-undo-counter 20) (setq org-self-insert-command-undo-counter 1) (and (> org-self-insert-command-undo-counter 0) buffer-undo-list (listp buffer-undo-list) (not (cadr buffer-undo-list)) (setcdr buffer-undo-list (cddr buffer-undo-list))) (setq org-self-insert-command-undo-counter (1+ org-self-insert-command-undo-counter)))))))
  org-self-insert-command(1)
  call-interactively(org-self-insert-command nil nil)
  recursive-edit()
  debug(error (wrong-type-argument listp t))
  delq(org-frame-title-string t)
  (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format))
  (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond ((functionp org-clock-out-switch-to-state) (looking-at org-complex-heading-regexp) (let (...) (if newstate ...))) ((and org-clock-out-switch-to-state (not ...)) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current)))
  (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond ((functionp org-clock-out-switch-to-state) (looking-at org-complex-heading-regexp) (let ... ...)) ((and org-clock-out-switch-to-state ...) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current))))
  (let (ts te s h m remove) (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond (... ... ...) (... ...))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current)))))
  (catch (quote exit) (when (not (org-clocking-p)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (force-mode-line-update) (if fail-quietly (throw (quote exit) t) (error "No active clock"))) (let (ts te s h m remove) (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply ... ...)) (org-float-time (apply ... ...))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= ... 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ ...)) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let (... ...) (cond ... ...)))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current))))))
  org-clock-out(t)
  (let ((org-clock-clocking-in t)) (org-clock-out t))
  (progn (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t)))
  (if interrupting (progn (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t))))
  (when interrupting (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t)))
  (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) (org-clocking-p))) ts selected-task target-pos (msg-extra "") (leftover (and (not org-clock-resolving-clocks) org-clock-leftover-time))) (when (and org-clock-auto-clock-resolution (or (not interrupting) (eq t org-clock-auto-clock-resolution)) (not org-clock-clocking-in) (not org-clock-resolving-clocks)) (setq org-clock-leftover-time nil) (let ((org-clock-clocking-in t)) (org-resolve-clocks))) (when (equal select (quote (4))) (setq selected-task (org-clock-select-task "Clock-in on task: ")) (if selected-task (setq selected-task (copy-marker selected-task)) (error "Abort"))) (when (equal select (quote (16))) (org-clock-mark-default-task)) (when interrupting (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t))) (setq target-pos (if (and (eobp) (not (org-at-heading-p))) (point-at-bol 0) (point))) (run-hooks (quote org-clock-in-prepare-hook)) (save-excursion (when (and selected-task (marker-buffer selected-task)) (set-buffer (org-base-buffer (marker-buffer selected-task))) (setq target-pos (marker-position selected-task)) (move-marker selected-task nil)) (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let (...) (if newstate ...))) ((and org-clock-in-switch-to-state (not ...)) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim (buffer-substring ... ...)))) (setq org-clock-heading (cond ((and org-clock-heading-function ...) (funcall org-clock-heading-function)) ((looking-at org-complex-heading-regexp) (replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" ...)) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume (looking-at ...)) (message "Matched %s" (match-string 1)) (setq ts (concat "[" ... "]")) (goto-char (match-end 1)) (setq org-clock-start-time (apply ... ...)) (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item ...))) ((eq org-clock-in-resume (quote auto-restart)) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw (quote abort) nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when (and ...) (beginning-of-line 1) (org-indent-line-to ...)) (insert org-clock-string " ") (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item ...)) (setq org-clock-start-time (or ... start-time ...)) (setq ts (org-insert-time-stamp org-clock-start-time ... ...)))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display (quote mode-line)) (eq org-clock-clocked-in-display (quote both))) (or global-mode-string (setq global-mode-string (quote ...))) (or (memq (quote org-mode-line-string) global-mode-string) (setq global-mode-string (append global-mode-string ...)))) (when (or (eq org-clock-clocked-in-display (quote frame-title)) (eq org-clock-clocked-in-display (quote both))) (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format ...)))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period (quote org-clock-update-mode-line)))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook))))))
  (catch (quote abort) (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) (org-clocking-p))) ts selected-task target-pos (msg-extra "") (leftover (and (not org-clock-resolving-clocks) org-clock-leftover-time))) (when (and org-clock-auto-clock-resolution (or (not interrupting) (eq t org-clock-auto-clock-resolution)) (not org-clock-clocking-in) (not org-clock-resolving-clocks)) (setq org-clock-leftover-time nil) (let ((org-clock-clocking-in t)) (org-resolve-clocks))) (when (equal select (quote (4))) (setq selected-task (org-clock-select-task "Clock-in on task: ")) (if selected-task (setq selected-task (copy-marker selected-task)) (error "Abort"))) (when (equal select (quote (16))) (org-clock-mark-default-task)) (when interrupting (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task ... ...)) (= (marker-position org-clock-hd-marker) (if selected-task ... ...)) (equal org-clock-current-task (nth 4 ...)))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t))) (setq target-pos (if (and (eobp) (not (org-at-heading-p))) (point-at-bol 0) (point))) (run-hooks (quote org-clock-in-prepare-hook)) (save-excursion (when (and selected-task (marker-buffer selected-task)) (set-buffer (org-base-buffer (marker-buffer selected-task))) (setq target-pos (marker-position selected-task)) (move-marker selected-task nil)) (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let ... ...)) ((and org-clock-in-switch-to-state ...) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim ...))) (setq org-clock-heading (cond (... ...) (... ...) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume ...) (message "Matched %s" ...) (setq ts ...) (goto-char ...) (setq org-clock-start-time ...) (setq org-clock-effort ...) (setq org-clock-total-time ...)) ((eq org-clock-in-resume ...) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw ... nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when ... ... ...) (insert org-clock-string " ") (setq org-clock-effort ...) (setq org-clock-total-time ...) (setq org-clock-start-time ...) (setq ts ...))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display ...) (eq org-clock-clocked-in-display ...)) (or global-mode-string (setq global-mode-string ...)) (or (memq ... global-mode-string) (setq global-mode-string ...))) (when (or (eq org-clock-clocked-in-display ...) (eq org-clock-clocked-in-display ...)) (or (memq ... frame-title-format) (setq frame-title-format ...))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period ...))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook)))))))
  org-clock-in(nil)
  call-interactively(org-clock-in)
  (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))
  (cond ((and org-use-speed-commands (setq org-speed-command (run-hook-with-args-until-success (quote org-speed-command-hook) (this-command-keys)))) (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))) ((and (org-table-p) (progn (and (featurep (quote org-table)) org-table-auto-blank-field (member last-command (quote (org-cycle org-return org-shifttab org-ctrl-c-ctrl-c yas/expand))) (if (or (equal ... 32) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (org-table-blank-field)) (org-table-blank-field))) t) (eq N 1) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (goto-char (1- (match-end 0))) (backward-delete-char 1) (goto-char (match-beginning 0)) (self-insert-command N))) (t (setq org-table-may-need-update t) (self-insert-command N) (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo (if (not (eq last-command (quote org-self-insert-command))) (setq org-self-insert-command-undo-counter 1) (if (>= org-self-insert-command-undo-counter 20) (setq org-self-insert-command-undo-counter 1) (and (> org-self-insert-command-undo-counter 0) buffer-undo-list (listp buffer-undo-list) (not (cadr buffer-undo-list)) (setcdr buffer-undo-list (cddr buffer-undo-list))) (setq org-self-insert-command-undo-counter (1+ org-self-insert-command-undo-counter)))))))
  org-self-insert-command(1)
  call-interactively(org-self-insert-command nil nil)

When Clocking Out

Debugger entered--Lisp error: (wrong-type-argument listp t)
  delq(org-frame-title-string t)
  (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format))
  (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond ((functionp org-clock-out-switch-to-state) (looking-at org-complex-heading-regexp) (let (...) (if newstate ...))) ((and org-clock-out-switch-to-state (not ...)) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current)))
  (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond ((functionp org-clock-out-switch-to-state) (looking-at org-complex-heading-regexp) (let ... ...)) ((and org-clock-out-switch-to-state ...) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current))))
  (let (ts te s h m remove) (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond (... ... ...) (... ...))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current)))))
  (catch (quote exit) (when (not (org-clocking-p)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (force-mode-line-update) (if fail-quietly (throw (quote exit) t) (error "No active clock"))) (let (ts te s h m remove) (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply ... ...)) (org-float-time (apply ... ...))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= ... 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ ...)) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let (... ...) (cond ... ...)))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current))))))
  org-clock-out()
  call-interactively(org-clock-out)
  (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))
  (cond ((and org-use-speed-commands (setq org-speed-command (run-hook-with-args-until-success (quote org-speed-command-hook) (this-command-keys)))) (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))) ((and (org-table-p) (progn (and (featurep (quote org-table)) org-table-auto-blank-field (member last-command (quote (org-cycle org-return org-shifttab org-ctrl-c-ctrl-c yas/expand))) (if (or (equal ... 32) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (org-table-blank-field)) (org-table-blank-field))) t) (eq N 1) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (goto-char (1- (match-end 0))) (backward-delete-char 1) (goto-char (match-beginning 0)) (self-insert-command N))) (t (setq org-table-may-need-update t) (self-insert-command N) (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo (if (not (eq last-command (quote org-self-insert-command))) (setq org-self-insert-command-undo-counter 1) (if (>= org-self-insert-command-undo-counter 20) (setq org-self-insert-command-undo-counter 1) (and (> org-self-insert-command-undo-counter 0) buffer-undo-list (listp buffer-undo-list) (not (cadr buffer-undo-list)) (setcdr buffer-undo-list (cddr buffer-undo-list))) (setq org-self-insert-command-undo-counter (1+ org-self-insert-command-undo-counter)))))))
  org-self-insert-command(1)
  call-interactively(org-self-insert-command nil nil)
  recursive-edit()
  debug(error (wrong-type-argument listp t))
  delq(org-frame-title-string t)
  (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format))
  (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond ((functionp org-clock-out-switch-to-state) (looking-at org-complex-heading-regexp) (let (...) (if newstate ...))) ((and org-clock-out-switch-to-state (not ...)) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current)))
  (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond ((functionp org-clock-out-switch-to-state) (looking-at org-complex-heading-regexp) (let ... ...)) ((and org-clock-out-switch-to-state ...) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current))))
  (let (ts te s h m remove) (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply (quote encode-time) (org-parse-time-string te))) (org-float-time (apply (quote encode-time) (org-parse-time-string ts)))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= (+ h m) 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ (point))) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let ((org-inhibit-logging t) (org-clock-out-when-done nil)) (cond (... ... ...) (... ...))))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current)))))
  (catch (quote exit) (when (not (org-clocking-p)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (force-mode-line-update) (if fail-quietly (throw (quote exit) t) (error "No active clock"))) (let (ts te s h m remove) (save-excursion (with-no-warnings (set-buffer (org-clocking-buffer))) (save-restriction (widen) (goto-char org-clock-marker) (beginning-of-line 1) (if (and (looking-at (concat "[  ]*" org-keyword-time-regexp)) (equal (match-string 1) org-clock-string)) (setq ts (match-string 2)) (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))) (goto-char (match-end 0)) (delete-region (point) (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp (or at-time (current-time)) (quote with-hm) (quote inactive))) (setq s (- (org-float-time (apply ... ...)) (org-float-time (apply ... ...))) h (floor (/ s 3600)) s (- s (* 3600 h)) m (floor (/ s 60)) s (- s (* 60 s))) (insert " => " (format "%2d:%02d" h m)) (when (setq remove (and org-clock-out-remove-zero-time-clocks (= ... 0))) (beginning-of-line 1) (delete-region (point) (point-at-eol)) (and (looking-at "\n") (> (point-max) (1+ ...)) (delete-char 1))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when org-log-note-clock-out (org-add-log-setup (quote clock-out) nil nil nil nil (concat "# Task: " (org-get-heading t) "\n\n"))) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq global-mode-string (delq (quote org-mode-line-string) global-mode-string)) (setq frame-title-format (delq (quote org-frame-title-string) frame-title-format)) (when org-clock-out-switch-to-state (save-excursion (org-back-to-heading t) (let (... ...) (cond ... ...)))) (force-mode-line-update) (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (if remove " => LINE REMOVED" "")) (run-hooks (quote org-clock-out-hook)) (unless (org-clocking-p) (org-clock-delete-current))))))
  org-clock-out(t)
  (let ((org-clock-clocking-in t)) (org-clock-out t))
  (progn (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t)))
  (if interrupting (progn (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t))))
  (when interrupting (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t)))
  (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) (org-clocking-p))) ts selected-task target-pos (msg-extra "") (leftover (and (not org-clock-resolving-clocks) org-clock-leftover-time))) (when (and org-clock-auto-clock-resolution (or (not interrupting) (eq t org-clock-auto-clock-resolution)) (not org-clock-clocking-in) (not org-clock-resolving-clocks)) (setq org-clock-leftover-time nil) (let ((org-clock-clocking-in t)) (org-resolve-clocks))) (when (equal select (quote (4))) (setq selected-task (org-clock-select-task "Clock-in on task: ")) (if selected-task (setq selected-task (copy-marker selected-task)) (error "Abort"))) (when (equal select (quote (16))) (org-clock-mark-default-task)) (when interrupting (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task (marker-buffer selected-task) (current-buffer))) (= (marker-position org-clock-hd-marker) (if selected-task (marker-position selected-task) (point))) (equal org-clock-current-task (nth 4 (org-heading-components))))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t))) (setq target-pos (if (and (eobp) (not (org-at-heading-p))) (point-at-bol 0) (point))) (run-hooks (quote org-clock-in-prepare-hook)) (save-excursion (when (and selected-task (marker-buffer selected-task)) (set-buffer (org-base-buffer (marker-buffer selected-task))) (setq target-pos (marker-position selected-task)) (move-marker selected-task nil)) (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let (...) (if newstate ...))) ((and org-clock-in-switch-to-state (not ...)) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim (buffer-substring ... ...)))) (setq org-clock-heading (cond ((and org-clock-heading-function ...) (funcall org-clock-heading-function)) ((looking-at org-complex-heading-regexp) (replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" ...)) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume (looking-at ...)) (message "Matched %s" (match-string 1)) (setq ts (concat "[" ... "]")) (goto-char (match-end 1)) (setq org-clock-start-time (apply ... ...)) (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item ...))) ((eq org-clock-in-resume (quote auto-restart)) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw (quote abort) nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when (and ...) (beginning-of-line 1) (org-indent-line-to ...)) (insert org-clock-string " ") (setq org-clock-effort (org-get-effort)) (setq org-clock-total-time (org-clock-sum-current-item ...)) (setq org-clock-start-time (or ... start-time ...)) (setq ts (org-insert-time-stamp org-clock-start-time ... ...)))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display (quote mode-line)) (eq org-clock-clocked-in-display (quote both))) (or global-mode-string (setq global-mode-string (quote ...))) (or (memq (quote org-mode-line-string) global-mode-string) (setq global-mode-string (append global-mode-string ...)))) (when (or (eq org-clock-clocked-in-display (quote frame-title)) (eq org-clock-clocked-in-display (quote both))) (or (memq (quote org-frame-title-string) frame-title-format) (setq frame-title-format (append frame-title-format ...)))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period (quote org-clock-update-mode-line)))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook))))))
  (catch (quote abort) (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) (org-clocking-p))) ts selected-task target-pos (msg-extra "") (leftover (and (not org-clock-resolving-clocks) org-clock-leftover-time))) (when (and org-clock-auto-clock-resolution (or (not interrupting) (eq t org-clock-auto-clock-resolution)) (not org-clock-clocking-in) (not org-clock-resolving-clocks)) (setq org-clock-leftover-time nil) (let ((org-clock-clocking-in t)) (org-resolve-clocks))) (when (equal select (quote (4))) (setq selected-task (org-clock-select-task "Clock-in on task: ")) (if selected-task (setq selected-task (copy-marker selected-task)) (error "Abort"))) (when (equal select (quote (16))) (org-clock-mark-default-task)) (when interrupting (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) (if selected-task ... ...)) (= (marker-position org-clock-hd-marker) (if selected-task ... ...)) (equal org-clock-current-task (nth 4 ...)))) (message "Clock continues in \"%s\"" org-clock-heading) (throw (quote abort) nil)) (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) (let ((org-clock-clocking-in t)) (org-clock-out t))) (setq target-pos (if (and (eobp) (not (org-at-heading-p))) (point-at-bol 0) (point))) (run-hooks (quote org-clock-in-prepare-hook)) (save-excursion (when (and selected-task (marker-buffer selected-task)) (set-buffer (org-base-buffer (marker-buffer selected-task))) (setq target-pos (marker-position selected-task)) (move-marker selected-task nil)) (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (org-clock-set-current) (cond ((functionp org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let ... ...)) ((and org-clock-in-switch-to-state ...) (org-todo org-clock-in-switch-to-state))) (setq org-clock-heading-for-remember (and (looking-at org-complex-heading-regexp) (match-end 4) (org-trim ...))) (setq org-clock-heading (cond (... ...) (... ...) (t "???"))) (setq org-clock-heading (org-propertize org-clock-heading (quote face) nil)) (org-clock-find-position org-clock-in-resume) (cond ((and org-clock-in-resume ...) (message "Matched %s" ...) (setq ts ...) (goto-char ...) (setq org-clock-start-time ...) (setq org-clock-effort ...) (setq org-clock-total-time ...)) ((eq org-clock-in-resume ...) (message "Cannot restart clock because task does not contain unfinished clock") (ding) (sit-for 2) (throw ... nil)) (t (insert-before-markers "\n") (backward-char 1) (org-indent-line-function) (when ... ... ...) (insert org-clock-string " ") (setq org-clock-effort ...) (setq org-clock-total-time ...) (setq org-clock-start-time ...) (setq ts ...))) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq org-clock-has-been-used t) (when (or (eq org-clock-clocked-in-display ...) (eq org-clock-clocked-in-display ...)) (or global-mode-string (setq global-mode-string ...)) (or (memq ... global-mode-string) (setq global-mode-string ...))) (when (or (eq org-clock-clocked-in-display ...) (eq org-clock-clocked-in-display ...)) (or (memq ... frame-title-format) (setq frame-title-format ...))) (org-clock-update-mode-line) (when org-clock-mode-line-timer (cancel-timer org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when org-clock-clocked-in-display (setq org-clock-mode-line-timer (run-with-timer org-clock-update-period org-clock-update-period ...))) (when org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq org-clock-idle-timer nil)) (setq org-clock-idle-timer (run-with-timer 60 60 (quote org-resolve-clocks-if-idle))) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook)))))))
  org-clock-in(nil)
  call-interactively(org-clock-in)
  (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))
  (cond ((and org-use-speed-commands (setq org-speed-command (run-hook-with-args-until-success (quote org-speed-command-hook) (this-command-keys)))) (cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command (listp org-speed-command)) (eval org-speed-command)) (t (let (org-use-speed-commands) (call-interactively (quote org-self-insert-command)))))) ((and (org-table-p) (progn (and (featurep (quote org-table)) org-table-auto-blank-field (member last-command (quote (org-cycle org-return org-shifttab org-ctrl-c-ctrl-c yas/expand))) (if (or (equal ... 32) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (org-table-blank-field)) (org-table-blank-field))) t) (eq N 1) (looking-at "[^|\n]*  |")) (let (org-table-may-need-update) (goto-char (1- (match-end 0))) (backward-delete-char 1) (goto-char (match-beginning 0)) (self-insert-command N))) (t (setq org-table-may-need-update t) (self-insert-command N) (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo (if (not (eq last-command (quote org-self-insert-command))) (setq org-self-insert-command-undo-counter 1) (if (>= org-self-insert-command-undo-counter 20) (setq org-self-insert-command-undo-counter 1) (and (> org-self-insert-command-undo-counter 0) buffer-undo-list (listp buffer-undo-list) (not (cadr buffer-undo-list)) (setcdr buffer-undo-list (cddr buffer-undo-list))) (setq org-self-insert-command-undo-counter (1+ org-self-insert-command-undo-counter)))))))
  org-self-insert-command(1)
  call-interactively(org-self-insert-command nil nil)

Date

[-- Attachment #2: Type: text/html, Size: 95504 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Org Clock Timer in Frame Title bug
  2012-04-21 23:45 Org Clock Timer in Frame Title bug Mike McLean
@ 2012-04-22  0:43 ` Matt Lundin
  2012-04-22  7:02   ` Bastien
  2012-04-28 12:51   ` George Kettleborough
  0 siblings, 2 replies; 7+ messages in thread
From: Matt Lundin @ 2012-04-22  0:43 UTC (permalink / raw)
  To: Mike McLean; +Cc: emacs-orgmode

Mike McLean <mike.mclean@pobox.com> writes:

> It appears that there is a small problem with commit
> 37fafb7b9e4e8e1eeb6b8faa76a1621c28970ef5 (Option for clock and timer to
> be displayed in frame-title). The default value offrame-title-format in
> my setup is t and this causes an error when clocking in/out.

I can confirm this bug. The problem is that org-clock-out calls a delq
on frame-title-format regardless of the value of
org-clock-clocked-in-display. This is a problem because
frame-title-format can be either a list or a string. Note: the same
problem will occur when calling org-clock-in if the value of
frame-title-format is a string and if org-clock-clocked-in-display is
set to 'frame-title.

Best,
Matt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Org Clock Timer in Frame Title bug
  2012-04-22  0:43 ` Matt Lundin
@ 2012-04-22  7:02   ` Bastien
  2012-04-28 12:51   ` George Kettleborough
  1 sibling, 0 replies; 7+ messages in thread
From: Bastien @ 2012-04-22  7:02 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode, Mike McLean

Fixed, thanks to Mike for reporting and to Matt for pointing 
at the detailed problem.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Org Clock Timer in Frame Title bug
  2012-04-22  0:43 ` Matt Lundin
  2012-04-22  7:02   ` Bastien
@ 2012-04-28 12:51   ` George Kettleborough
  2012-04-29  9:37     ` Bastien
  1 sibling, 1 reply; 7+ messages in thread
From: George Kettleborough @ 2012-04-28 12:51 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode@gnu.org, Mike McLean

On Sun, Apr 22 2012, Matt Lundin wrote:
> Mike McLean <mike.mclean@pobox.com> writes:
>
>> It appears that there is a small problem with commit
>> 37fafb7b9e4e8e1eeb6b8faa76a1621c28970ef5 (Option for clock and timer to
>> be displayed in frame-title). The default value offrame-title-format in
>> my setup is t and this causes an error when clocking in/out.
>
> I can confirm this bug. The problem is that org-clock-out calls a delq
> on frame-title-format regardless of the value of
> org-clock-clocked-in-display. This is a problem because
> frame-title-format can be either a list or a string. Note: the same
> problem will occur when calling org-clock-in if the value of
> frame-title-format is a string and if org-clock-clocked-in-display is
> set to 'frame-title.

Checking (listp frame-title-format) ensures there will be no error when
calling delq, but it doesn't fix the feature.  If the user's
frame-title-format is not a list then the feature will not work for no
apparent reason.  The same thing goes for global-mode-string too, which
the current release of org-mode modifies.

For the clock and timer display features to work as intended both of
these variables need to be lists with either a string or a list as the
first element.  Note that simply being a list is not enough, it must
contain a string or list as first element.  This format causes the
elements of the list to be treated as mode-line-formats recursively.

The following in both org-clock.el and org-timer.el will ensure both
variables have the correct format to begin with:

(unless (and (listp frame-title-format)
             (or (stringp (first frame-title-format))
                 (listp (first frame-title-format))))
  (setq frame-title-format (list "" frame-title-format)))

(unless (and (listp global-mode-string)
             (or (stringp (first global-mode-string))
                 (listp (first global-mode-string))))
  (setq global-mode-string (list "" global-mode-string)))

It might be better to do this just once in org.el or org-install.el,
since maybe other modules might want to put stuff in the mode-line or
frame-title.

Of course the user or another mode might edit either of the variables to
something bad (like a symbol or string) afterwards.  Maybe this should
be done every time before clock-in/timer-start or any time we wish to
append stuff to either of these lists?

Thanks,

George.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Org Clock Timer in Frame Title bug
  2012-04-28 12:51   ` George Kettleborough
@ 2012-04-29  9:37     ` Bastien
  2012-04-30 13:47       ` George Kettleborough
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2012-04-29  9:37 UTC (permalink / raw)
  To: George Kettleborough; +Cc: Matt Lundin, emacs-orgmode@gnu.org, Mike McLean

Hi George,

George Kettleborough <g.kettleborough@uea.ac.uk> writes:

> Checking (listp frame-title-format) ensures there will be no error when
> calling delq, but it doesn't fix the feature.  If the user's
> frame-title-format is not a list then the feature will not work for no
> apparent reason.  The same thing goes for global-mode-string too, which
> the current release of org-mode modifies.
>
> For the clock and timer display features to work as intended both of
> these variables need to be lists with either a string or a list as the
> first element.  Note that simply being a list is not enough, it must
> contain a string or list as first element.  This format causes the
> elements of the list to be treated as mode-line-formats recursively.

`global-mode-string' and ̀frame-title-format' are list by default
and they cannot be customized.  They can be manually set to a string,
but that's a mistake (okay, `global-mode-string' is a misleading name.)

> The following in both org-clock.el and org-timer.el will ensure both
> variables have the correct format to begin with:
>
> (unless (and (listp frame-title-format)
>              (or (stringp (first frame-title-format))
>                  (listp (first frame-title-format))))
>   (setq frame-title-format (list "" frame-title-format)))
>
> (unless (and (listp global-mode-string)
>              (or (stringp (first global-mode-string))
>                  (listp (first global-mode-string))))
>   (setq global-mode-string (list "" global-mode-string)))

This can go into .emacs.el for those who set those two variables to a
string... but they should not do it in the first place, right?

> It might be better to do this just once in org.el or org-install.el,
> since maybe other modules might want to put stuff in the mode-line or
> frame-title.
>
> Of course the user or another mode might edit either of the variables to
> something bad (like a symbol or string) afterwards.  Maybe this should
> be done every time before clock-in/timer-start or any time we wish to
> append stuff to either of these lists?

Org cannot fix all cases where the user is setting a variable to
something that is non-standard.  For this issue, it's already nice
to not produce an error when the user set `global-mode-string' and
`frame-title-format' to "" instead of ("").

Or am I overlooking something?

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Org Clock Timer in Frame Title bug
  2012-04-29  9:37     ` Bastien
@ 2012-04-30 13:47       ` George Kettleborough
  2012-05-05 13:49         ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: George Kettleborough @ 2012-04-30 13:47 UTC (permalink / raw)
  To: Bastien; +Cc: Matt Lundin, emacs-orgmode@gnu.org, Mike McLean

On Sun, Apr 29 2012, Bastien wrote:
> `global-mode-string' and ̀frame-title-format' are list by default
> and they cannot be customized.  They can be manually set to a string,
> but that's a mistake (okay, `global-mode-string' is a misleading name.)

On my Fedora box, frame-title-format is by default:

(multiple-frames "%b"
		 ("" invocation-name "@" system-name))

This is the value even if --no-init-file is used so I don't think this
is distro-specific.

Since the first element in the list is a symbol, the behaviour is to
treat it as a boolean which decides whether the second or third element
is used.  Anything appended to this list is just ignored.

Is this what you mean by frame-title-format being a list by default?  If
so, it's the wrong type of list and we do need to ensure that it's of
the correct form before we can append stuff to the end for display.

global-mode-string, on the other hand, does seem to be of the right type
by default:

("")

Thanks,

George.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Org Clock Timer in Frame Title bug
  2012-04-30 13:47       ` George Kettleborough
@ 2012-05-05 13:49         ` Bastien
  0 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2012-05-05 13:49 UTC (permalink / raw)
  To: George Kettleborough; +Cc: Matt Lundin, emacs-orgmode@gnu.org, Mike McLean

Hi George,

George Kettleborough <g.kettleborough@uea.ac.uk> writes:

> On Sun, Apr 29 2012, Bastien wrote:
>> `global-mode-string' and ̀frame-title-format' are list by default
>> and they cannot be customized.  They can be manually set to a string,
>> but that's a mistake (okay, `global-mode-string' is a misleading name.)
>
> On my Fedora box, frame-title-format is by default:
>
> (multiple-frames "%b"
> 		 ("" invocation-name "@" system-name))
>
> This is the value even if --no-init-file is used so I don't think this
> is distro-specific.

Okay, I added a new option `org-clock-frame-title-format' for the
`frame-title-format' string.

This format string will /replace/ `frame-title-format' instead of 
just amending it.  I don't find any way to safely set this var, as 
there is no equivalent of `global-mode-string' for the frame.  

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-05 15:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-21 23:45 Org Clock Timer in Frame Title bug Mike McLean
2012-04-22  0:43 ` Matt Lundin
2012-04-22  7:02   ` Bastien
2012-04-28 12:51   ` George Kettleborough
2012-04-29  9:37     ` Bastien
2012-04-30 13:47       ` George Kettleborough
2012-05-05 13:49         ` Bastien

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).