diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2010-09-03 07:43:16 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2010-09-03 07:43:16 -0600 |
commit | 006ebbcd8094b58da4f01a9531f429e35258086b (patch) | |
tree | 55cf55f9052a67c3704343dab6f32df85d510b3a | |
parent | b0dce5a074c13945f4cb747e76986f4df4f9eb1f (diff) | |
parent | 4f95c5469c214169b0b0f37dceacdf0a1b785add (diff) | |
download | org-mode-006ebbcd8094b58da4f01a9531f429e35258086b.tar.gz |
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
-rw-r--r-- | doc/org.texi | 9 | ||||
-rw-r--r-- | lisp/org-agenda.el | 3 | ||||
-rw-r--r-- | lisp/org-capture.el | 7 | ||||
-rw-r--r-- | lisp/org-clock.el | 7 | ||||
-rw-r--r-- | lisp/org-src.el | 13 | ||||
-rw-r--r-- | lisp/org-timer.el | 29 | ||||
-rw-r--r-- | lisp/org.el | 6 |
7 files changed, 55 insertions, 19 deletions
diff --git a/doc/org.texi b/doc/org.texi index 4ce32ce..71d1823 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -13781,10 +13781,11 @@ written in a way such that it does nothing in buffers that are not in @section Special agenda views @cindex agenda views, user-defined -Org provides a special hook that can be used to narrow down the -selection made by any of the agenda views. You may specify a function -that is used at each match to verify if the match should indeed be part -of the agenda view, and if not, how much should be skipped. +Org provides a special hook that can be used to narrow down the selection +made by these agenda views: @code{todo}, @code{alltodo}, @code{tags}, @code{tags-todo}, +@code{tags-tree}. You may specify a function that is used at each match to verify +if the match should indeed be part of the agenda view, and if not, how +much should be skipped. Let's say you want to produce a list of projects that contain a WAITING tag anywhere in the project tree. Let's further assume that you have diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index e036b18..3a64344 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4002,8 +4002,7 @@ The remainder is either a list of TODO keywords, or a state symbol "Create agenda view for projects that are stuck. Stuck projects are project that have no next actions. For the definitions of what a project is and how to check if it stuck, customize the variable -`org-stuck-projects'. -MATCH is being ignored." +`org-stuck-projects'." (interactive) (let* ((org-agenda-skip-function 'org-agenda-skip-entry-when-regexp-matches-in-subtree) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 4cf887e..eafc9c6 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -383,10 +383,11 @@ bypassed." (initial (and (org-region-active-p) (buffer-substring (point) (mark)))) (entry (org-capture-select-template keys))) - (when initial + (when (stringp initial) (remove-text-properties 0 (length initial) '(read-only t) initial)) - (when annotation - (remove-text-properties 0 (length initial) '(read-only t) annotation)) + (when (stringp annotation) + (remove-text-properties 0 (length annotation) + '(read-only t) annotation)) (cond ((equal entry "C") (customize-variable 'org-capture-templates)) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index a0757c7..3328609 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -557,6 +557,13 @@ use libnotify if available, or fall back on a message." ((stringp org-show-notification-handler) (start-process "emacs-timer-notification" nil org-show-notification-handler notification)) + ((featurep 'notifications) + (notifications-notify + :title "Org-mode message" + :body notification + ;; FIXME how to link to the Org icon? + ;; :app-icon "~/.emacs.d/icons/mail.png" + :urgency 'low)) ((org-program-exists "notify-send") (start-process "emacs-timer-notification" nil "notify-send" notification)) diff --git a/lisp/org-src.el b/lisp/org-src.el index 6c09cbd..d1948cc 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -715,6 +715,19 @@ Org-babel commands." (call-interactively (lookup-key org-babel-map key))))) +(defvar org-src-tab-acts-natively nil + "If non-nil, the effect of TAB in a code block is as if it were +issued in the language major mode buffer.") + +(defun org-src-native-tab-command-maybe () + "Perform language-specific TAB action. +Alter code block according to effect of TAB in the language major +mode." + (and org-src-tab-acts-natively + (org-babel-do-key-sequence-in-edit-buffer (kbd "TAB")))) + +(add-hook 'org-tab-first-hook 'org-src-native-tab-command-maybe) + (defun org-src-font-lock-fontify-block (lang start end) "Fontify code block. This function is called by emacs automatic fontification, as long diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 33c4c0b..313d4f0 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -149,8 +149,7 @@ With prefix arg STOP, stop it entirely." "Insert a H:MM:SS string from the timer into the buffer. The first time this command is used, the timer is started. When used with a \\[universal-argument] prefix, force restarting the timer. -When used with a double prefix argument \ -\\[universal-argument] \\universal-argument], change all the timer string +When used with a double prefix argument \\[universal-argument], change all the timer string in the region by a fixed amount. This can be used to recalibrate a timer that was not started at the correct moment. @@ -166,9 +165,13 @@ it in the buffer." (defun org-timer-value-string () (format org-timer-format (org-timer-secs-to-hms (floor (org-timer-seconds))))) +(defvar org-timer-timer-is-countdown nil) (defun org-timer-seconds () - (- (org-float-time (or org-timer-pause-time (current-time))) - (org-float-time org-timer-start-time))) + (if org-timer-timer-is-countdown + (- (org-float-time org-timer-start-time) + (org-float-time (current-time))) + (- (org-float-time (or org-timer-pause-time (current-time))) + (org-float-time org-timer-start-time)))) ;;;###autoload (defun org-timer-change-times-in-region (beg end delta) @@ -300,7 +303,9 @@ VALUE can be `on', `off', or `pause'." (when (eval org-timer-current-timer) (run-hooks 'org-timer-cancel-hook) (cancel-timer org-timer-current-timer) - (setq org-timer-current-timer nil)) + (setq org-timer-current-timer nil) + (setq org-timer-timer-is-countdown nil) + (org-timer-set-mode-line 'off)) (message "Last timer canceled")) (defun org-timer-show-remaining-time () @@ -361,9 +366,11 @@ replace any running timer." (widen) (goto-char pos) (org-show-entry) - (org-get-heading)))) + (or (ignore-errors (org-get-heading)) + (concat "File:" (file-name-nondirectory (buffer-file-name))))))) ((eq major-mode 'org-mode) - (org-get-heading)) + (or (ignore-errors (org-get-heading)) + (concat "File:" (file-name-nondirectory (buffer-file-name))))) (t (error "Not in an Org buffer")))) timer-set) (if (or (and org-timer-current-timer @@ -378,8 +385,14 @@ replace any running timer." secs nil `(lambda () (setq org-timer-current-timer nil) (org-notify ,(format "%s: time out" hl) t) + (setq org-timer-timer-is-countdown nil) + (org-timer-set-mode-line 'off) (run-hooks 'org-timer-done-hook)))) - (run-hooks 'org-timer-set-hook)) + (run-hooks 'org-timer-set-hook) + (setq org-timer-timer-is-countdown t + org-timer-start-time + (time-add (current-time) (seconds-to-time (* mins 60)))) + (org-timer-set-mode-line 'on)) (message "No timer set")))))) (provide 'org-timer) diff --git a/lisp/org.el b/lisp/org.el index fc44fc7..26acc69 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6843,7 +6843,7 @@ Works for outline headings and for plain lists alike." (org-insert-heading arg) (cond ((org-on-heading-p) (org-do-demote)) - ((org-at-item-p) (org-indent-item 1)))) + ((org-at-item-p) (org-indent-item)))) (defun org-insert-todo-subheading (arg) "Insert a new subheading with TODO keyword or checkbox and demote it. @@ -6852,7 +6852,7 @@ Works for outline headings and for plain lists alike." (org-insert-todo-heading arg) (cond ((org-on-heading-p) (org-do-demote)) - ((org-at-item-p) (org-indent-item 1)))) + ((org-at-item-p) (org-indent-item)))) ;;; Promotion and Demotion @@ -9899,6 +9899,7 @@ on the system \"/user@host:\"." (setq level (org-reduced-level (- (match-end 1) (match-beginning 1))) txt (org-link-display-format (match-string 4)) + txt (replace-regexp-in-string "\\( *\[[0-9]+/?[0-9]*%?\]\\)+$" "" txt) re (format org-complex-heading-regexp-format (regexp-quote (match-string 4)))) (when org-refile-use-outline-path @@ -16379,6 +16380,7 @@ BEG and END default to the buffer boundaries." (org-defkey org-mode-map "\C-c\C-xo" 'org-toggle-ordered-property) (org-defkey org-mode-map "\C-c\C-xi" 'org-insert-columns-dblock) (org-defkey org-mode-map [(control ?c) (control ?x) ?\;] 'org-timer-set-timer) +(org-defkey org-mode-map [(control ?c) (control ?x) ?\:] 'org-timer-cancel-timer) (org-defkey org-mode-map "\C-c\C-x." 'org-timer) (org-defkey org-mode-map "\C-c\C-x-" 'org-timer-item) |