--- org-5.15/org.el 2007-11-28 15:15:16.000000000 +0000 +++ org-5.15.mine/org.el 2007-11-29 02:27:15.000000000 +0000 @@ -12950,7 +12950,14 @@ (nth 1 entry) org-default-notes-file)) (headline (nth 2 entry)) - (v-c (current-kill 0)) ;; FIXME: protection needed? + (v-c (if (or (and (eq window-system 'x) + (x-cut-buffer-or-selection-value)) + (bound-and-true-p x-last-selected-text) + (bound-and-true-p x-last-selected-text-primary)) + x-last-selected-text-primary + (if (> (length kill-ring) 0) + (current-kill 0) + nil))) (v-t (format-time-string (car org-time-stamp-formats) (org-current-time))) (v-T (format-time-string (cdr org-time-stamp-formats) (org-current-time))) (v-u (concat "[" (substring v-t 1 -1) "]")) @@ -17673,8 +17680,8 @@ (if (and org-clock-heading-function (functionp org-clock-heading-function)) (setq org-clock-heading (funcall org-clock-heading-function)) - (if (looking-at org-todo-line-regexp) - (setq org-clock-heading (match-string 3)) + (if (looking-at org-complex-heading-regexp) + (setq org-clock-heading (match-string 4)) (setq org-clock-heading "???"))) (setq org-clock-heading (propertize org-clock-heading 'face nil)) (org-clock-find-position) @@ -17793,6 +17800,9 @@ (set-buffer (marker-buffer org-clock-marker)) (goto-char org-clock-marker) (delete-region (1- (point-at-bol)) (point-at-eol))) + (setq global-mode-string + (delq 'org-mode-line-string global-mode-string)) + (force-mode-line-update) (message "Clock canceled")) (defun org-clock-goto (&optional delete-windows)