2009-11-15 Carsten Dominik <carsten.dominik@gmail.com>
authorCarsten Dominik <dominik@science.uva.nl>
Sun, 15 Nov 2009 07:11:04 +0000 (07:11 +0000)
committerCarsten Dominik <dominik@science.uva.nl>
Sun, 15 Nov 2009 07:11:04 +0000 (07:11 +0000)
* org-latex.el (org-export-as-latex): Add the :drawers property.

2009-11-15  Carsten Dominik  <carsten.dominik@gmail.com>

* org.el (org-speed-commands-user): Allow documentation headlines.
(org-speed-commands-default): Organize the value of this constant
with descriptive headlines.
(org-print-speed-command): Output the headlines.

2009-11-15  Carsten Dominik  <carsten.dominik@gmail.com>

* org-agenda.el (org-agenda-show-outline-path): New option.
(org-agenda-do-context-action): New function.
(org-agenda-next-line, org-agenda-previous-line): Use
`org-agenda-do-context-action'.

* org.el (org-use-speed-commands): Allow function value.
(org-speed-commands-default): Make headline motion safe, so that
these commands always end on a headline.
(org-speed-commands-default): New key `v' for `org-agenda'.
(org-speed-move-safe): New function.
(org-self-insert-command): Use the function value of
`org-use-speed-commands'.
(org-get-outline-path): Improve docstring.
(org-format-outline-path): New function.
(org-display-outline-path): New function.

2009-11-15  John Wiegley  <jwiegley@gmail.com>

* org-clock.el (org-clock-resolve): If `org-clock-into-string' is
a string, use that to find the LOGBOOK drawer.

49 files changed:
lisp/org/ChangeLog
lisp/org/org-agenda.el
lisp/org/org-archive.el
lisp/org/org-ascii.el
lisp/org/org-attach.el
lisp/org/org-bbdb.el
lisp/org/org-bibtex.el
lisp/org/org-clock.el
lisp/org/org-colview.el
lisp/org/org-compat.el
lisp/org/org-crypt.el
lisp/org/org-datetree.el
lisp/org/org-docbook.el
lisp/org/org-exp.el
lisp/org/org-faces.el
lisp/org/org-feed.el
lisp/org/org-footnote.el
lisp/org/org-freemind.el
lisp/org/org-gnus.el
lisp/org/org-habit.el
lisp/org/org-html.el
lisp/org/org-icalendar.el
lisp/org/org-id.el
lisp/org/org-indent.el
lisp/org/org-info.el
lisp/org/org-inlinetask.el
lisp/org/org-irc.el
lisp/org/org-jsinfo.el
lisp/org/org-latex.el
lisp/org/org-list.el
lisp/org/org-mac-message.el
lisp/org/org-macs.el
lisp/org/org-mew.el
lisp/org/org-mhe.el
lisp/org/org-mobile.el
lisp/org/org-mouse.el
lisp/org/org-plot.el
lisp/org/org-protocol.el
lisp/org/org-publish.el
lisp/org/org-remember.el
lisp/org/org-rmail.el
lisp/org/org-src.el
lisp/org/org-table.el
lisp/org/org-timer.el
lisp/org/org-vm.el
lisp/org/org-w3m.el
lisp/org/org-wl.el
lisp/org/org-xoxo.el
lisp/org/org.el

index 03b2a9d..5ae2dc7 100644 (file)
@@ -1,3 +1,37 @@
+2009-11-15  Carsten Dominik  <carsten.dominik@gmail.com>
+
+       * org-latex.el (org-export-as-latex): Add the :drawers property.
+
+2009-11-15  Carsten Dominik  <carsten.dominik@gmail.com>
+
+       * org.el (org-speed-commands-user): Allow documentation headlines.
+       (org-speed-commands-default): Organize the value of this constant
+       with descriptive headlines.
+       (org-print-speed-command): Output the headlines.
+
+2009-11-15  Carsten Dominik  <carsten.dominik@gmail.com>
+
+       * org-agenda.el (org-agenda-show-outline-path): New option.
+       (org-agenda-do-context-action): New function.
+       (org-agenda-next-line, org-agenda-previous-line): Use
+       `org-agenda-do-context-action'.
+
+       * org.el (org-use-speed-commands): Allow function value.
+       (org-speed-commands-default): Make headline motion safe, so that
+       these commands always end on a headline.
+       (org-speed-commands-default): New key `v' for `org-agenda'.
+       (org-speed-move-safe): New function.
+       (org-self-insert-command): Use the function value of
+       `org-use-speed-commands'.
+       (org-get-outline-path): Improve docstring.
+       (org-format-outline-path): New function.
+       (org-display-outline-path): New function.
+
+2009-11-15  John Wiegley  <jwiegley@gmail.com>
+
+       * org-clock.el (org-clock-resolve): If `org-clock-into-string' is
+       a string, use that to find the LOGBOOK drawer.
+
 2009-11-15  Glenn Morris  <rgm@gnu.org>
 
        * org-agenda.el (org-datetree-find-date-create)
index 7a31108..6bbdbe8 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -672,6 +672,11 @@ Needs to be set before org.el is loaded."
   :group 'org-agenda-startup
   :type 'boolean)
 
+(defcustom org-agenda-show-outline-path t
+  "Non-il means, show outline path in echo area after line motion."
+  :group 'org-agenda-startup
+  :type 'boolean)
+
 (defcustom org-agenda-start-with-entry-text-mode nil
   "The initial value of entry-text-mode in a newly created agenda window."
   :group 'org-agenda-startup
@@ -5673,15 +5678,23 @@ When called with a prefix argument, include all archive files as well."
   "Move cursor to the next line, and show if follow-mode is active."
   (interactive)
   (call-interactively 'next-line)
-  (if (and org-agenda-follow-mode (org-get-at-bol 'org-marker))
-      (org-agenda-show)))
+  (org-agenda-do-context-action))
+
 (defun org-agenda-previous-line ()
   "Move cursor to the previous line, and show if follow-mode is active."
 
   (interactive)
   (call-interactively 'previous-line)
-  (if (and org-agenda-follow-mode (org-get-at-bol 'org-marker))
-      (org-agenda-show)))
+  (org-agenda-do-context-action))
+
+(defun org-agenda-do-context-action ()
+  "Show outline path and, maybe, follow-mode window."
+  (let ((m (org-get-at-bol 'org-marker)))
+    (if (and org-agenda-follow-mode m)
+       (org-agenda-show))
+    (if (and m org-agenda-show-outline-path)
+       (message (org-with-point-at m
+                  (org-display-outline-path t))))))
 
 (defun org-agenda-show-priority ()
   "Show the priority of the current item.
index 3cc438c..370554e 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index c4a2ced..bf8d02a 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 12c9133..34226b8 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: John Wiegley <johnw@newartisans.com>
 ;; Keywords: org data task
-;; Version: 6.33
+;; Version: 6.33c
 
 ;; This file is part of GNU Emacs.
 ;;
index 6d9a778..851ac42 100644 (file)
@@ -7,7 +7,7 @@
 ;;         Thomas Baumann <thomas dot baumann at ch dot tum dot de>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 44299e5..66442d1 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Bastien Guerry <bzg at altern dot org>
 ;;         Carsten Dominik <carsten dot dominik at gmail dot com>
 ;; Keywords: org, wp, remember
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index ddb0424..d25f68d 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -678,22 +678,26 @@ was started."
          (save-window-excursion
            (save-excursion
              (unless org-clock-resolving-clocks-due-to-idleness
-               (org-with-clock clock
-                 (org-clock-goto))
+               (org-with-clock clock (org-clock-goto))
                (with-current-buffer (marker-buffer (car clock))
                  (goto-char (car clock))
                  (if org-clock-into-drawer
-                     (ignore-errors
-                       (outline-flag-region (save-excursion
-                                              (outline-back-to-heading t)
-                                              (search-forward ":LOGBOOK:")
-                                              (goto-char (match-beginning 0)))
-                                            (save-excursion
-                                              (outline-back-to-heading t)
-                                              (search-forward ":LOGBOOK:")
-                                              (search-forward ":END:")
-                                              (goto-char (match-end 0)))
-                                            nil)))))
+                     (let ((logbook
+                            (if (stringp org-clock-into-drawer)
+                                (concat ":" org-clock-into-drawer ":")
+                              ":LOGBOOK:")))
+                       (ignore-errors
+                         (outline-flag-region
+                          (save-excursion
+                            (outline-back-to-heading t)
+                            (search-forward logbook)
+                            (goto-char (match-beginning 0)))
+                          (save-excursion
+                            (outline-back-to-heading t)
+                            (search-forward logbook)
+                            (search-forward ":END:")
+                            (goto-char (match-end 0)))
+                          nil))))))
              (let (char-pressed)
                (while (null char-pressed)
                  (setq char-pressed
index dfe006b..8f0ea90 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -34,7 +34,7 @@
 (require 'org)
 
 (declare-function org-agenda-redo "org-agenda" ())
-(declare-function org-agenda-show "org-agenda" (&optional full-entry))
+(declare-function org-agenda-do-context-action "org-agenda" ())
 
 ;;; Column View
 
@@ -93,10 +93,8 @@ This is the compiled version of the format.")
                (while (and (org-invisible-p2) (not (eobp)))
                  (beginning-of-line 2))
                (move-to-column col)
-               (if (and (eq major-mode 'org-agenda-mode)
-                        (org-bound-and-true-p org-agenda-follow-mode)
-                        (org-get-at-bol 'org-marker))
-                   (org-agenda-show)))))               
+               (if (eq major-mode 'org-agenda-mode)
+                   (org-agenda-do-context-action)))))
 (org-defkey org-columns-map [up]
            (lambda () (interactive)
              (let ((col (current-column)))
@@ -104,10 +102,8 @@ This is the compiled version of the format.")
                (while (and (org-invisible-p2) (not (bobp)))
                  (beginning-of-line 0))
                (move-to-column col)
-               (if (and (eq major-mode 'org-agenda-mode)
-                        (org-bound-and-true-p org-agenda-follow-mode)
-                        (org-get-at-bol 'org-marker))
-                   (org-agenda-show)))))
+               (if (eq major-mode 'org-agenda-mode)
+                   (org-agenda-do-context-action)))))
 (org-defkey org-columns-map [(shift right)] 'org-columns-next-allowed-value)
 (org-defkey org-columns-map "n" 'org-columns-next-allowed-value)
 (org-defkey org-columns-map [(shift left)] 'org-columns-previous-allowed-value)
index 4e2c7d1..b86b726 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index e445571..0e56ef7 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Emacs Lisp Archive Entry
 ;; Filename: org-crypt.el
-;; Version: 6.33
+;; Version: 6.33c
 ;; Keywords: org-mode
 ;; Author: John Wiegley <johnw@gnu.org>
 ;; Maintainer: Peter Jones <pjones@pmade.com>
index ce6c562..59cbcdf 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 33d66dc..f1cd894 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; Emacs Lisp Archive Entry
 ;; Filename: org-docbook.el
-;; Version: 6.33
+;; Version: 6.33c
 ;; Author: Baoqiu Cui <cbaoqiu AT yahoo DOT com>
 ;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com>
 ;; Keywords: org, wp, docbook
index 5282824..ca0f28a 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index ac70649..e5e779e 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index a63da89..0af8f64 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index bfd5472..e3c2b10 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 76d17b0..79d6f02 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Lennart Borgman (lennart O borgman A gmail O com)
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index c6b9b44..f41425e 100644 (file)
@@ -7,7 +7,7 @@
 ;;         Tassilo Horn <tassilo at member dot fsf dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index c2f1489..f77ccc0 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: John Wiegley <johnw at gnu dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 11a692e..2b83a8c 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 4141196..e5a6a6b 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index c6c007f..b27259c 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index db0b49f..63b168a 100644 (file)
@@ -4,7 +4,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index af37256..cbe55af 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index d4be908..9aa38e1 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 
 ;; This file is part of GNU Emacs.
 
index cf7bdf0..7c863f7 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Philip Jackson <emacs@shellarchive.co.uk>
 ;; Keywords: erc, irc, link, org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 02d867a..2196b73 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index bea5955..b48fdb3 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; Emacs Lisp Archive Entry
 ;; Filename: org-latex.el
-;; Version: 6.33
+;; Version: 6.33c
 ;; Author: Bastien Guerry <bzg AT altern DOT org>
 ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com>
 ;; Keywords: org, wp, tex
@@ -620,6 +620,7 @@ when PUB-DIR is set, use this as the publishing directory."
           :tags (plist-get opt-plist :tags)
           :priority (plist-get opt-plist :priority)
           :footnotes (plist-get opt-plist :footnotes)
+          :drawers (plist-get opt-plist :drawers)
           :timestamps (plist-get opt-plist :timestamps)
           :todo-keywords (plist-get opt-plist :todo-keywords)
           :add-text (if (eq to-buffer 'string) nil text)
index 99cc4fe..d864ab0 100644 (file)
@@ -7,7 +7,7 @@
 ;;        Bastien Guerry <bzg AT altern DOT org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 94fe232..5497891 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: John Wiegley <johnw@gnu.org>
 ;;         Christopher Suckling <suckling at gmail dot com>
 
-;; Version: 6.33
+;; Version: 6.33c
 ;; Keywords: outlines, hypermedia, calendar, wp
 
 ;; This file is part of GNU Emacs.
index cdcbe04..1f4ec10 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 6ccc995..bd590e6 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 
 ;; This file is part of GNU Emacs.
 
index d70bcea..a9d6669 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index b9e2671..f482f7c 100644 (file)
@@ -4,7 +4,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 7860fca..6fbd615 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com>
 ;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index f91df11..55c0877 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Eric Schulte <schulte dot eric at gmail dot com>
 ;; Keywords: tables, plotting
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 30d2dd3..0832bd1 100644 (file)
@@ -9,7 +9,7 @@
 ;; Author: Ross Patterson <me AT rpatterson DOT net>
 ;; Maintainer: Sebastian Rose <sebastian_rose AT gmx DOT de>
 ;; Keywords: org, emacsclient, wp
-;; Version: 6.33
+;; Version: 6.33c
 
 ;; This file is part of GNU Emacs.
 ;;
index d42abd4..6abaae9 100644 (file)
@@ -4,7 +4,7 @@
 ;; Author: David O'Toole <dto@gnu.org>
 ;; Maintainer: Carsten Dominik <carsten DOT dominik AT gmail DOT com>
 ;; Keywords: hypermedia, outlines, wp
-;; Version: 6.33
+;; Version: 6.33c
 
 ;; This file is part of GNU Emacs.
 ;;
index 5eef7a2..d0ba613 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index f1fe9f8..0ff5f14 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index a2321d2..19494c1 100644 (file)
@@ -8,7 +8,7 @@
 ;;         Dan Davison <davison at stats dot ox dot ac dot uk>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index a484571..087b30a 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index ab2a8c1..77c8164 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 8b0a2ee..a96cbbc 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 359182a..53a52d4 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Andy Stewart <lazycat dot manatee at gmail dot com>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 96eb061..3a284c6 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 95c13df..45c2558 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 06b6e33..d5cb8ba 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33
+;; Version: 6.33c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -95,7 +95,7 @@
 
 ;;; Version
 
-(defconst org-version "6.33"
+(defconst org-version "6.33c"
   "The version number of the file org.el.")
 
 (defun org-version (&optional here)
@@ -594,9 +594,14 @@ new-frame        Make a new frame each time.  Note that in this case
          (const :tag "One dedicated frame" dedicated-frame)))
 
 (defcustom org-use-speed-commands nil
-  "Non-nil means, activate single letter commands at beginning of a headline."
+  "Non-nil means, activate single letter commands at beginning of a headline.
+This may also be a function to test for appropriate locations where speed
+commands should be active."
   :group 'org-structure
-  :type 'boolean)
+  :type '(choice
+         (const :tag "Never" nil)
+         (const :tag "At beginning of headline stars" t)
+         (function)))
 
 (defcustom org-speed-commands-user nil
     "Alist of additional speed commands.
@@ -606,14 +611,19 @@ and when the cursor is at the beginning of a headline.
 The car if each entry is a string with a single letter, which must
 be assigned to `self-insert-command' in the global map.
 The cdr is either a command to be called interactively, a function
-to be called, or a form to be evaluated."
+to be called, or a form to be evaluated.
+An entry that is just a list with a single string will be interpreted
+as a descriptive headline that will be added when listing the speed
+copmmands in the Help buffer using the `?' speed command."
     :group 'org-structure
-    :type '(repeat
-           (cons
-            (string "Command letter")
-            (choice
-             (function)
-             (sexp)))))
+    :type '(repeat :value ("k" . ignore)
+           (choice :value ("k" . ignore)
+            (list :tag "Descriptive Headline" (string :tag "Headline"))
+            (cons :tag "Letter and Command"
+             (string :tag "Command letter")
+             (choice
+              (function)
+              (sexp))))))
 
 (defgroup org-cycle nil
   "Options concerning visibility cycling in Org-mode."
@@ -3090,8 +3100,9 @@ Normal means, no org-mode-specific context."
 (declare-function org-gnus-follow-link "org-gnus" (&optional group article))
 (defvar org-agenda-tags-todo-honor-ignore-options)
 (declare-function org-agenda-skip "org-agenda" ())
-(declare-function org-format-agenda-item "org-agenda"
-                  (extra txt &optional category tags dotime noprefix remove-re habitp))
+(declare-function
+ org-format-agenda-item "org-agenda"
+ (extra txt &optional category tags dotime noprefix remove-re habitp))
 (declare-function org-agenda-new-marker "org-agenda" (&optional pos))
 (declare-function org-agenda-change-all-lines "org-agenda"
                  (newhead hdmarker &optional fixface just-this))
@@ -8980,7 +8991,10 @@ on the system \"/user@host:\"."
 (defvar org-olpa (make-vector 20 nil))
 
 (defun org-get-outline-path (&optional fastp level heading)
-  "Return the outline path to the current entry, as a list."
+  "Return the outline path to the current entry, as a list.
+The parameters FASTP, LEVEL, and HEADING are for use be a scanner
+routine which makes outline path derivations for an entire file,
+avoiding backtracing."
   (if fastp
       (progn
        (if (> level 19)
@@ -8997,6 +9011,59 @@ on the system \"/user@host:\"."
            (push (org-match-string-no-properties 4) rtn)))
        rtn))))
 
+(defun org-format-outline-path (path &optional width prefix)
+  "Format the outlie path PATH for display.
+Width is the maximum number of characters that is available.
+Prefix is a prefix to be included in the returned string,
+such as the file name."
+  (setq width (or width 79))
+  (if prefix (setq width (- width (length prefix))))
+  (if (not path)
+      (or prefix "")
+    (let* ((nsteps (length path))
+          (total-width (+ nsteps (apply '+ (mapcar 'length path))))
+          (maxwidth (if (<= total-width width)
+                        10000  ;; everything fits
+                      ;; we need to shorten the level headings
+                      (/ (- width nsteps) nsteps)))
+          (org-odd-levels-only nil)
+          (n 0)
+          (total (1+ (length prefix))))
+      (setq maxwidth (max maxwidth 10))
+      (concat prefix
+             (mapconcat
+              (lambda (h)
+                (setq n (1+ n))
+                (if (and (= n nsteps) (< maxwidth 10000))
+                    (setq maxwidth (- total-width total)))
+                (if (< (length h) maxwidth)
+                    (progn (setq total (+ total (length h) 1)) h)
+                  (setq h (substring h 0 (- maxwidth 2))
+                        total (+ total maxwidth 1))
+                  (if (string-match "[ \t]+\\'" h)
+                      (setq h (substring h 0 (match-beginning 0))))
+                  (setq h (concat  h "..")))
+                (org-add-props h nil 'face
+                               (nth (% (1- n) org-n-level-faces)
+                                    org-level-faces))
+                h)
+              path "/")))))
+
+(defun org-display-outline-path (&optional file current)
+  "Display the current outline path in the echo area."
+  (interactive "P")
+  (let ((bfn (buffer-file-name (buffer-base-buffer)))
+       (path (and (org-mode-p) (org-get-outline-path))))
+    (if current (setq path (append path
+                                  (save-excursion
+                                    (org-back-to-heading t)
+                                    (if (looking-at org-complex-heading-regexp)
+                                        (list (match-string 4)))))))
+    (message (org-format-outline-path
+             path
+             (1- (frame-width))
+             (and file bfn (concat (file-name-nondirectory bfn) "/"))))))
+
 (defvar org-refile-history nil
   "History for refiling operations.")
 
@@ -9037,6 +9104,7 @@ See also `org-refile-use-outline-path' and `org-completion-use-ido'"
         (region-length (and regionp (- region-end region-start)))
         (filename (buffer-file-name (buffer-base-buffer cbuf)))
         pos it nbuf file re level reversed)
+    (setq last-command nil)
     (when regionp
       (goto-char region-start)
       (or (bolp) (goto-char (point-at-bol)))
@@ -14829,14 +14897,19 @@ Some of the options can be changed using the variable
 
 (defconst org-speed-commands-default
   '(
-    ("n" . outline-next-visible-heading)
-    ("p" . outline-previous-visible-heading)
-    ("f" . org-forward-same-level)
-    ("b" . org-backward-same-level)
-    ("u" . outline-up-heading)
-
+    ("Outline Navigation")
+    ("n" . (org-speed-move-safe 'outline-next-visible-heading))
+    ("p" . (org-speed-move-safe 'outline-previous-visible-heading))
+    ("f" . (org-speed-move-safe 'org-forward-same-level))
+    ("b" . (org-speed-move-safe 'org-backward-same-level))
+    ("u" . (org-speed-move-safe 'outline-up-heading))
+    ("j" . org-goto)
+    ("g" . (org-refile t))
+    ("Outline Visibility")
     ("c" . org-cycle)
     ("C" . org-shifttab)
+    (" " . org-display-outline-path)
+    ("Outline Structure Editing")
     ("U" . org-shiftmetaup)
     ("D" . org-shiftmetadown)
     ("r" . org-metaright)
@@ -14845,37 +14918,45 @@ Some of the options can be changed using the variable
     ("L" . org-shiftmetaleft)
     ("i" . (progn (forward-char 1) (call-interactively
                                    'org-insert-heading-respect-content)))
-
-    ("a" . org-agenda)
-    ("/" . org-sparse-tree)
-    (";" . org-set-tags-command)
+    ("^" . org-sort)
+    ("w" . org-refile)
+    ("a" . org-archive-subtree-default-with-confirmation)
+    ("." . outline-mark-subtree)
+    ("Clock Commands")
     ("I" . org-clock-in)
     ("O" . org-clock-out)
-    ("o" . org-open-at-point)
+    ("Meta Data Editing")
     ("t" . org-todo)
-    ("j" . org-goto)
-    ("g" . (org-refile t))
-    ("e" . org-set-effort)
     ("0" . (org-priority ?\ ))
     ("1" . (org-priority ?A))
     ("2" . (org-priority ?B))
     ("3" . (org-priority ?C))
-    ("." . outline-mark-subtree)
-    ("^" . org-sort)
-    ("w" . org-refile)
-    ("a" . org-archive-subtree-default-with-confirmation)
+    (";" . org-set-tags-command)
+    ("e" . org-set-effort)
+    ("Agenda Views etc")
+    ("v" . org-agenda)
+    ("/" . org-sparse-tree)
     ("/" . org-sparse-tree)
+    ("Misc")
+    ("o" . org-open-at-point)
     ("?" . org-speed-command-help)
     )
   "The default speed commands.")
 
 (defun org-print-speed-command (e)
-  (princ (car e))
-  (princ "   ")
-  (if (symbolp (cdr e))
-      (princ (symbol-name (cdr e)))
-    (prin1 (cdr e)))
-  (princ "\n"))
+  (if (> (length (car e)) 1)
+      (progn
+       (princ "\n")
+       (princ (car e))
+       (princ "\n")
+       (princ (make-string (length (car e)) ?-))
+       (princ "\n"))
+    (princ (car e))
+    (princ "   ")
+    (if (symbolp (cdr e))
+       (princ (symbol-name (cdr e)))
+      (prin1 (cdr e)))
+    (princ "\n")))
 
 (defun org-speed-command-help ()
   "Show the available speed commands."
@@ -14883,10 +14964,23 @@ Some of the options can be changed using the variable
   (if (not org-use-speed-commands)
       (error "Speed commands are not activated, customize `org-use-speed-commands'.")
     (with-output-to-temp-buffer "*Help*"
-      (princ "Speed commands\n==============\n")
+      (princ "User-defined Speed commands\n===========================\n")
       (mapc 'org-print-speed-command org-speed-commands-user)
       (princ "\n")
-      (mapc 'org-print-speed-command org-speed-commands-default))))
+      (princ "Built-in Speed commands\n=======================\n")
+      (mapc 'org-print-speed-command org-speed-commands-default))
+    (with-current-buffer "*Help*"
+      (setq truncate-lines t))))
+
+(defun org-speed-move-safe (cmd)
+  "Execute CMD, but make sure that the cursor always ends up in a headline.
+If not, return to the original position and throw an error."
+  (interactive)
+  (let ((pos (point)))
+    (call-interactively cmd)
+    (unless (and (bolp) (org-on-heading-p))
+      (goto-char pos)
+      (error "Boundary reached while executing %s" cmd))))
 
 (defvar org-self-insert-command-undo-counter 0)
 
@@ -14899,8 +14993,9 @@ overwritten, and the table is not marked as requiring realignment."
   (interactive "p")
   (cond
    ((and org-use-speed-commands
-        (bolp)
-        (looking-at outline-regexp)
+        (or (and (bolp) (looking-at outline-regexp))
+            (and (functionp org-use-speed-commands)
+                 (funcall org-use-speed-commands)))
         (setq
          org-speed-command
          (or (cdr (assoc (this-command-keys) org-speed-commands-user))
@@ -16066,7 +16161,11 @@ what in fact did happen.  You don't know how to make a good report?  See
      http://orgmode.org/manual/Feedback.html#Feedback
 
 Your bug report will be posted to the Org-mode mailing list.
-------------------------------------------------------------------------")))
+------------------------------------------------------------------------")
+    (save-excursion
+      (if (re-search-backward "^\\(Subject: \\)Org-mode version \\(.*?\\);[ \t]*\\(.*\\)" nil t)
+         (replace-match "\\1Bug: \\3 [\\2]")))))
+    
 
 (defun org-install-agenda-files-menu ()
   (let ((bl (buffer-list)))