]> git.eshelyaron.com Git - emacs.git/commitdiff
2009-11-20 Carsten Dominik <carsten.dominik@gmail.com>
authorCarsten Dominik <dominik@science.uva.nl>
Fri, 20 Nov 2009 20:54:05 +0000 (20:54 +0000)
committerCarsten Dominik <dominik@science.uva.nl>
Fri, 20 Nov 2009 20:54:05 +0000 (20:54 +0000)
* org-agenda.el (org-agenda-diary-entry-in-org-file): Rebuild
agenda after adding new entry.

* org-datetree.el (org-datetree-find-day-create): Fix regular
expression.

* org.el (org-display-outline-path): Use a format specifier for
message, to avoid problems with heading containing `%'.

* org-agenda.el (org-agenda-hide-tags-regexp): New option.
(org-format-agenda-item): Call `org-agenda-fix-displayed-tags'.
(org-agenda-fix-displayed-tags): New function.
(org-agenda-do-context-action): Just call
`org-display-outline-path', without piping the result through
`message'.

* org-latex.el (org-export-latex-preprocess): Protect secondary
footnote references.

* org-indent.el (org-indent-initialize): Avoid empty strings as
line prefixes.

* org-agenda.el (org-agenda-diary-entry-in-org-file): Make sure
hat checking for the mark does not throw an error.
(org-agenda-diary-entry-in-org-file): Catch the case that there is
not `day' text property in the cursor line.

* org.el (org-sort-entries-or-items): Make sure that the final
entry has a newline before doing the sorting.

* org-agenda.el (org-agenda-diary-entry-in-org-file): Get the text
property at the beginning of the line.

* org.el (org-make-link-string): Don't allow a description with
only white space.

* org-agenda.el (org-agenda-insert-diary-strategy): New variable.
(org-agenda-insert-diary-as-top-level): New function.
(org-agenda-add-entry-to-org-agenda-diary-file): Call
`org-agenda-insert-diary-as-top-level'.

* org.el (org-occur-in-agenda-files): Make sure none of the
buffers is narrowed.
(org-activate-plain-links): Add the face property here.
(org-set-font-lock-defaults): Do not add the face to plain links,
the activator function does this.

* org-habit.el (org-is-habit-p): Add doc string.

* org-archive.el (org-archive-subtree-default-with-confirmation):
Autoload.

* org-latex.el (org-export-latex-fontify): Fix regexp to make char
after match optional (happens at the end of a line...).

* org.el (org-fontify-meta-lines-and-blocks): Apply special faces
for special blocks.

* org-faces.el (org-copy-face): Set lisp indentation.
(org-quote, org-verse): New faces.

* org-agenda.el (org-agenda-remove-date): Remove variable.

* org-freemind.el (org-freemind-escape-str-from-org): Fix encoding.

* org-html.el (org-export-as-html): Move the home/up link into
the content div.

* org.el (org-export-latex-packages-alist): Option definition
moved here from org-latex.el.

* org-html.el (org-export-html-home/up-format): Add an ID to the
up/home div.

* org-wl.el (org-wl-store-link): Handle the case that
`wl-use-petname' is set.

* org.el (org-set-effort): Improve prompt.
(org-get-outline-path): Widen to get full path.
(org-compact-display-after-subtree-move): Function removed.

2009-11-20  Eric Schulte  <schulte.eric@gmail.com>

* org-exp-blocks.el (org-export-blocks-format-ditaa): Use sha1
hash keys to cache and re-use images generated by the
org-exp-blocks interface to ditaa and dot.

* org.el (org-format-latex): Latex images are now saved to files
named by the sha1 hash of the latex source text avoiding
regeneration of identical images.

51 files changed:
doc/misc/ChangeLog
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-blocks.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 3c0cfc16a73c44696081ec015c218f640c956bc4..7d7cb25a6f795305698ea0eff3b789d177ba2940 100644 (file)
@@ -1,3 +1,7 @@
+2009-11-20  Carsten Dominik  <dominik@u016822.science.uva.nl>
+
+       * org.texi: (Column attributes): Fix documentaion of new operators.
+
 2009-11-20  Chong Yidong  <cyd@stupidchicken.com>
 
        * sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
index 5ae2dc76ec1ffb19b9cd48992eeb2d5ed7256cc6..7582e8364cf4ab31984c950fa2428e59ba2dd97f 100644 (file)
@@ -1,3 +1,96 @@
+2009-11-20  Carsten Dominik  <carsten.dominik@gmail.com>
+
+       * org-agenda.el (org-agenda-diary-entry-in-org-file): Rebuild
+       agenda after adding new entry.
+
+       * org-datetree.el (org-datetree-find-day-create): Fix regular
+       expression.
+
+       * org.el (org-display-outline-path): Use a format specifier for
+       message, to avoid problems with heading containing `%'.
+
+       * org-agenda.el (org-agenda-hide-tags-regexp): New option.
+       (org-format-agenda-item): Call `org-agenda-fix-displayed-tags'.
+       (org-agenda-fix-displayed-tags): New function.
+       (org-agenda-do-context-action): Just call
+       `org-display-outline-path', without piping the result through
+       `message'.
+
+       * org-latex.el (org-export-latex-preprocess): Protect secondary
+       footnote references.
+
+       * org-indent.el (org-indent-initialize): Avoid empty strings as
+       line prefixes.
+
+       * org-agenda.el (org-agenda-diary-entry-in-org-file): Make sure
+       hat checking for the mark does not throw an error.
+       (org-agenda-diary-entry-in-org-file): Catch the case that there is
+       not `day' text property in the cursor line.
+
+       * org.el (org-sort-entries-or-items): Make sure that the final
+       entry has a newline before doing the sorting.
+
+       * org-agenda.el (org-agenda-diary-entry-in-org-file): Get the text
+       property at the beginning of the line.
+
+       * org.el (org-make-link-string): Don't allow a description with
+       only white space.
+
+       * org-agenda.el (org-agenda-insert-diary-strategy): New variable.
+       (org-agenda-insert-diary-as-top-level): New function.
+       (org-agenda-add-entry-to-org-agenda-diary-file): Call
+       `org-agenda-insert-diary-as-top-level'.
+
+       * org.el (org-occur-in-agenda-files): Make sure none of the
+       buffers is narrowed.
+       (org-activate-plain-links): Add the face property here.
+       (org-set-font-lock-defaults): Do not add the face to plain links,
+       the activator function does this.
+
+       * org-habit.el (org-is-habit-p): Add doc string.
+
+       * org-archive.el (org-archive-subtree-default-with-confirmation):
+       Autoload.
+
+       * org-latex.el (org-export-latex-fontify): Fix regexp to make char
+       after match optional (happens at the end of a line...).
+
+       * org.el (org-fontify-meta-lines-and-blocks): Apply special faces
+       for special blocks.
+
+       * org-faces.el (org-copy-face): Set lisp indentation.
+       (org-quote, org-verse): New faces.
+
+       * org-agenda.el (org-agenda-remove-date): Remove variable.
+
+       * org-freemind.el (org-freemind-escape-str-from-org): Fix encoding.
+
+       * org-html.el (org-export-as-html): Move the home/up link into
+       the content div.
+
+       * org.el (org-export-latex-packages-alist): Option definition
+       moved here from org-latex.el.
+
+       * org-html.el (org-export-html-home/up-format): Add an ID to the
+       up/home div.
+
+       * org-wl.el (org-wl-store-link): Handle the case that
+       `wl-use-petname' is set.
+
+       * org.el (org-set-effort): Improve prompt.
+       (org-get-outline-path): Widen to get full path.
+       (org-compact-display-after-subtree-move): Function removed.
+
+2009-11-20  Eric Schulte  <schulte.eric@gmail.com>
+
+       * org-exp-blocks.el (org-export-blocks-format-ditaa): Use sha1
+       hash keys to cache and re-use images generated by the
+       org-exp-blocks interface to ditaa and dot.
+
+       * org.el (org-format-latex): Latex images are now saved to files
+       named by the sha1 hash of the latex source text avoiding
+       regeneration of identical images.
+
 2009-11-15  Carsten Dominik  <carsten.dominik@gmail.com>
 
        * org-latex.el (org-export-as-latex): Add the :drawers property.
index 6bbdbe8630684b22b815a8aab876916ee8e45374..e0698fb819e0801328d75a1c76330d7ef2f79a49 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -1208,6 +1208,16 @@ When non-nil, this must be the number of minutes, e.g. 60 for one hour."
   :group 'org-agenda-line-format
   :type 'boolean)
 
+(defcustom org-agenda-hide-tags-regexp nil
+  "Regular expression used to filter away specific tags in agenda views.
+This means that these tags will be present, but not be shown in the agenda
+line.  Secondayt filltering will still work on the hidden tags.
+Nil means don't hide any tags."
+  :group 'org-agenda-line-format
+  :type '(choice
+         (const  :tag "Hide none" nil)
+         (string :tag "Regexp   ")))
+
 (defcustom org-agenda-remove-tags nil
   "Non-nil means, remove the tags from the headline copy in the agenda.
 When this is the symbol `prefix', only remove tags when
@@ -2970,7 +2980,6 @@ When EMPTY is non-nil, also include days without any entries."
 (defvar org-starting-day nil) ; local variable in the agenda buffer
 (defvar org-agenda-span nil) ; local variable in the agenda buffer
 (defvar org-include-all-loc nil) ; local variable
-(defvar org-agenda-remove-date nil) ; dynamically scoped FIXME: not used???
 
 ;;;###autoload
 (defun org-agenda-list (&optional include-all start-day ndays)
@@ -4513,9 +4522,12 @@ Any match of REMOVE-RE will be removed from TXT."
   (save-match-data
     ;; Diary entries sometimes have extra whitespace at the beginning
     (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt)))
-    (when org-agenda-show-inherited-tags
-      ;; Fix the tags part in txt
-      (setq txt (org-agenda-add-inherited-tags txt tags)))
+
+    ;; Fix the tags part in txt
+    (setq txt (org-agenda-fix-displayed-tags
+              txt tags
+              org-agenda-show-inherited-tags
+              org-agenda-hide-tags-regexp))
     (let* ((category (or category
                         org-category
                         (if buffer-file-name
@@ -4646,27 +4658,37 @@ Any match of REMOVE-RE will be removed from TXT."
        'extra extra
        'dotime dotime))))
 
-(defun org-agenda-add-inherited-tags (txt tags)
-  "Remove tags string from TXT, and add complete list of tags.
-The new list includes inherited tags.  If any inherited tags are present,
-a double colon separates inherited tags from local tags."
-  (if (string-match (org-re "\\([ \t]+\\)\\(:[[:alnum:]_@:]+:\\)[ \t]*$") txt)
-      (setq txt (substring txt 0 (match-beginning 0))))
-  (when tags
-    (let ((have-i (get-text-property 0 'inherited (car tags)))
-         i)
-      (setq txt (concat txt " :"
-                       (mapconcat
-                        (lambda (x)
-                          (setq i (get-text-property 0 'inherited x))
-                          (if (and have-i (not i))
-                              (progn
-                                (setq have-i nil)
-                                (concat ":" x))
-                            x))
-                        tags ":")
-                       (if have-i "::" ":")))))
-  txt)
+(defun org-agenda-fix-displayed-tags (txt tags add-inherited hide-re)
+  "Remove tags string from TXT, and add a modified list of tags.
+The modified list may contain inherited tags, and tags matched by
+`org-agenda-hide-tags-regexp' will be removed."
+  (when (or add-inherited hide-re)
+    (if (string-match (org-re "\\([ \t]+\\)\\(:[[:alnum:]_@:]+:\\)[ \t]*$") txt)
+       (setq txt (substring txt 0 (match-beginning 0))))
+    (when tags
+      (setq tags
+           (delq nil
+                 (mapcar (lambda (tg)
+                           (if (or (and hide-re (string-match hide-re tg))
+                                   (and (not add-inherited)
+                                        (get-text-property 0 'inherited tg)))
+                               nil
+                             tg))
+                         tags)))
+      (let ((have-i (get-text-property 0 'inherited (car tags)))
+           i)
+       (setq txt (concat txt " :"
+                         (mapconcat
+                          (lambda (x)
+                            (setq i (get-text-property 0 'inherited x))
+                            (if (and have-i (not i))
+                                (progn
+                                  (setq have-i nil)
+                                  (concat ":" x))
+                              x))
+                          tags ":")
+                         (if have-i "::" ":"))))))
+    txt)
 
 (defun org-downcase-keep-props (s)
   (let ((props (text-properties-at 0 s)))
@@ -5693,8 +5715,8 @@ When called with a prefix argument, include all archive files as well."
     (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))))))
+       (org-with-point-at m
+         (org-display-outline-path t)))))
 
 (defun org-agenda-show-priority ()
   "Show the priority of the current item.
@@ -6662,32 +6684,38 @@ The cursor may be at a date in the calendar, or in the Org agenda."
 
 (defun org-agenda-diary-entry-in-org-file ()
   "Make a diary entry in the file `org-agenda-diary-file'."
-  (let (d1 d2 char (text ""))
+  (let (d1 d2 char (text "") dp1 dp2)
     (if (equal (buffer-name) "*Calendar*")
        (setq d1 (calendar-cursor-to-date t)
              d2 (car calendar-mark-ring))
-      (setq d1 (calendar-gregorian-from-absolute
-               (get-text-property (point) 'day))
-           d2 (and (mark) (get-text-property (mark) 'day)
-                   (calendar-gregorian-from-absolute
-                    (get-text-property (mark) 'day)))))
+      (setq dp1 (get-text-property (point-at-bol) 'day))
+      (unless dp1 (error "No date defined in current line"))
+      (setq d1 (calendar-gregorian-from-absolute dp1)
+           d2 (and (ignore-errors (mark))
+                   (save-excursion
+                     (goto-char (mark))
+                     (setq dp2 (get-text-property (point-at-bol) 'day)))
+                   (calendar-gregorian-from-absolute dp2))))
     (message "Diary entry: [d]ay [a]nniversary [b]lock [j]ump to date tree")
     (setq char (read-char-exclusive))
     (cond
      ((equal char ?d)
       (setq text (read-string "Day entry: "))
-      (org-agenda-add-entry-to-org-agenda-diary-file 'day text d1))
+      (org-agenda-add-entry-to-org-agenda-diary-file 'day text d1)
+      (and (equal (buffer-name) org-agenda-buffer-name) (org-agenda-redo)))
      ((equal char ?a)
       (setq d1 (list (car d1) (nth 1 d1)
                     (read-number (format "Reference year [%d]: " (nth 2 d1))
                                  (nth 2 d1))))
       (setq text (read-string "Anniversary (use %d to show years): "))
-      (org-agenda-add-entry-to-org-agenda-diary-file 'anniversary text d1))
+      (org-agenda-add-entry-to-org-agenda-diary-file 'anniversary text d1)
+      (and (equal (buffer-name) org-agenda-buffer-name) (org-agenda-redo)))
      ((equal char ?b)
       (setq text (read-string "Block entry: "))
       (unless (and d1 d2 (not (equal d1 d2)))
        (error "No block of days selected"))
-      (org-agenda-add-entry-to-org-agenda-diary-file 'block text d1 d2))
+      (org-agenda-add-entry-to-org-agenda-diary-file 'block text d1 d2)
+      (and (equal (buffer-name) org-agenda-buffer-name) (org-agenda-redo)))
      ((equal char ?j)
       (org-switch-to-buffer-other-window
        (find-file-noselect org-agenda-diary-file))
@@ -6695,6 +6723,17 @@ The cursor may be at a date in the calendar, or in the Org agenda."
       (org-reveal t))
      (t (error "Invalid selection character `%c'" char)))))
 
+(defcustom org-agenda-insert-diary-strategy 'date-tree
+  "Where in `org-agenda-diary-file' should new entries be added?
+Valid values:
+
+date-tree    in the date tree, as child of the date
+top-level    as top-level entries at the end of the file."
+  :group 'org-agenda
+  :type '(choice
+         (const :tag "in a date tree" date-tree)
+         (const :tag "as top level at end of file" top-level)))
+
 (defun org-agenda-add-entry-to-org-agenda-diary-file (type text &optional d1 d2)
   "Add a diary entry with TYPE to `org-agenda-diary-file'.
 If TEXT is not empty, it will become the headline of the new entry, and
@@ -6729,9 +6768,11 @@ the resulting entry will not be shown.  When TEXT is empty, switch to
        (insert (format "%%%%(diary-anniversary %s) %s"
                        (calendar-date-string d1 nil t) text))))
      ((eq type 'day)
-      (require 'org-datetree)
-      (org-datetree-find-date-create d1)
-      (org-agenda-insert-diary-make-new-entry text)
+      (if (eq org-agenda-insert-diary-strategy 'top-level)
+         (org-agenda-insert-diary-as-top-level text)
+       (require 'org-datetree)
+       (org-datetree-find-date-create d1)
+       (org-agenda-insert-diary-make-new-entry text))
       (org-insert-time-stamp (org-time-from-absolute
                              (calendar-absolute-from-gregorian d1)))
       (end-of-line 0))
@@ -6739,9 +6780,11 @@ the resulting entry will not be shown.  When TEXT is empty, switch to
       (if (> (calendar-absolute-from-gregorian d1)
             (calendar-absolute-from-gregorian d2))
          (setq d1 (prog1 d2 (setq d2 d1))))
-      (require 'org-datetree)
-      (org-datetree-find-date-create d1)
-      (org-agenda-insert-diary-make-new-entry text)
+      (if (eq org-agenda-insert-diary-strategy 'top-level)
+         (org-agenda-insert-diary-as-top-level text)
+       (require 'org-datetree)
+       (org-datetree-find-date-create d1)
+       (org-agenda-insert-diary-make-new-entry text))
       (org-insert-time-stamp (org-time-from-absolute
                              (calendar-absolute-from-gregorian d1)))
       (insert "--")
@@ -6757,6 +6800,16 @@ the resulting entry will not be shown.  When TEXT is empty, switch to
       (org-reveal t)
       (message "Please finish entry here"))))
 
+(defun org-agenda-insert-diary-as-top-level (text)
+  "Make new entry as a top-level entry at the end of the file.
+Add TEXT as headline, and position the cursor in the second line so that
+a timestamp can be added there."
+  (widen)
+  (goto-char (point-max))
+  (or (bolp) (insert "\n"))
+  (insert "* " text "\n")
+  (if org-adapt-indentation (org-indent-to-column 2)))
+
 (defun org-agenda-insert-diary-make-new-entry (text)
   "Make new entry as last child of current entry.
 Add TEXT as headline, and position the cursor in the second line so that
index 370554e6353f49b90553072f85155e5e5d97f915..62ad4f8641859f8d8861c2c342ccfe4c44d23fe3 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -443,6 +443,7 @@ This command is set with the variable `org-archive-default-command'."
   (interactive)
   (call-interactively org-archive-default-command))
 
+;;;###autoload
 (defun org-archive-subtree-default-with-confirmation ()
   "Archive the current subtree with the default command.
 This command is set with the variable `org-archive-default-command'."
index bf8d02ab4ba399dee2dd7c038b3da89ecc39889c..dc8136a92f6ae248e26962b3daa22d7139cea2b2 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 34226b88a7e98642060f202fcc2d1600fbe6ad19..95661b99d8d239cd6cc22240d9beb57c9361d25f 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: John Wiegley <johnw@newartisans.com>
 ;; Keywords: org data task
-;; Version: 6.33c
+;; Version: 6.33x
 
 ;; This file is part of GNU Emacs.
 ;;
index 851ac42ab990ad3416d804654eedcae8694ca1ca..3e19f749d7cd0a451b1f510177576c0ec3aff4ce 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 66442d162e0078317851fe2e9b309dbdb2353d4c..38c1a732d79421b90a14f842e5befea7ae58efbc 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index d25f68debebd66796e526fcec0eb15d56b2b9235..cb9da8ef402d62dff1db6925cf3111d91d48e6d7 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 8f0ea9054aaac9d983bbed19e76aa6449752b4ca..868c30d1d6b5b1d17e9c838024e2342ce2001847 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index b86b726481cd3e5e5616ef5384fdd06e34babce1..d8b7328267ac0540c28bfd1294a8824eab08fe9f 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 0e56ef71cf6263d28d55aa6cdd57d422c6503453..953bfea2b11fd4624fc65040ed448c7d8f411c09 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Emacs Lisp Archive Entry
 ;; Filename: org-crypt.el
-;; Version: 6.33c
+;; Version: 6.33x
 ;; Keywords: org-mode
 ;; Author: John Wiegley <johnw@gnu.org>
 ;; Maintainer: Peter Jones <pjones@pmade.com>
index 59cbcdfd23ba8c56cbf3c2c290e46a42ae342785..d76fd515c60573f19c1946315e1b10e6f115c79b 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -101,7 +101,7 @@ tree can be found."
 
 (defun org-datetree-find-day-create (year month day)
   (org-narrow-to-subtree)
-  (let ((re (format "^\\*+[ \t]+%d-%02d-\\([01][0-9]\\)[ \t\n]" year month))
+  (let ((re (format "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\)[ \t\n]" year month))
        match)
     (goto-char (point-min))
     (while (and (setq match (re-search-forward re nil t))
index f1cd894daaea16aa1ef9c776a023e668c3cf86e3..a0a2310143d6f99920101bf5d9d8d66fbd64b4bd 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; Emacs Lisp Archive Entry
 ;; Filename: org-docbook.el
-;; Version: 6.33c
+;; Version: 6.33x
 ;; Author: Baoqiu Cui <cbaoqiu AT yahoo DOT com>
 ;; Maintainer: Baoqiu Cui <cbaoqiu AT yahoo DOT com>
 ;; Keywords: org, wp, docbook
index 71e1608f9bcf6ff9eea7050822b1d528b79efeaf..72fe6c492ad6cba3442802a887363d2d47b77508 100644 (file)
@@ -217,9 +217,15 @@ Specify the path at which the image should be saved as the first
 element of headers, any additional elements of headers will be
 passed to the ditaa utility as command line arguments."
   (message "ditaa-formatting...")
-  (let ((out-file (if headers (car headers)))
-       (args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
-       (data-file (make-temp-file "org-ditaa")))
+  (let* ((args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
+         (data-file (make-temp-file "org-ditaa"))
+         (hash (sha1 (prin1-to-string (list body args))))
+         (raw-out-file (if headers (car headers)))
+         (out-file-parts (if (string-match "\\(.+\\)\\.\\([^\\.]+\\)$" raw-out-file)
+                             (cons (match-string 1 raw-out-file)
+                                   (match-string 2 raw-out-file))
+                           (cons raw-out-file "png")))
+         (out-file (concat (car out-file-parts) "_" hash "." (cdr out-file-parts))))
     (unless (file-exists-p org-ditaa-jar-path)
       (error (format "Could not find ditaa.jar at %s" org-ditaa-jar-path)))
     (setq body (if (string-match "^\\([^:\\|:[^ ]\\)" body)
@@ -229,9 +235,21 @@ passed to the ditaa utility as command line arguments."
                            "\n")))
     (cond
      ((or htmlp latexp docbookp)
-      (with-temp-file data-file (insert body))
-      (message (concat "java -jar " org-ditaa-jar-path " " args " " data-file " " out-file))
-      (shell-command (concat "java -jar " org-ditaa-jar-path " " args " " data-file " " out-file))
+      (unless (file-exists-p out-file)
+        (mapc ;; remove old hashed versions of this file
+         (lambda (file)
+           (when (and (string-match (concat (regexp-quote (car out-file-parts))
+                                            "_\\([[:alnum:]]+\\)\\."
+                                            (regexp-quote (cdr out-file-parts)))
+                                    file)
+                      (= (length (match-string 1 out-file)) 40))
+             (delete-file (expand-file-name file
+                                            (file-name-directory out-file)))))
+         (directory-files (or (file-name-directory out-file)
+                              default-directory)))
+        (with-temp-file data-file (insert body))
+        (message (concat "java -jar " org-ditaa-jar-path " " args " " data-file " " out-file))
+        (shell-command (concat "java -jar " org-ditaa-jar-path " " args " " data-file " " out-file)))
       (format "\n[[file:%s]]\n" out-file))
      (t (concat
         "\n#+BEGIN_EXAMPLE\n"
@@ -259,14 +277,32 @@ digraph data_relationships {
 }
 #+end_dot"
   (message "dot-formatting...")
-  (let ((out-file (if headers (car headers)))
-       (args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
-       (data-file (make-temp-file "org-ditaa")))
+  (let* ((args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
+         (data-file (make-temp-file "org-ditaa"))
+         (hash (sha1 (prin1-to-string (list body args))))
+         (raw-out-file (if headers (car headers)))
+         (out-file-parts (if (string-match "\\(.+\\)\\.\\([^\\.]+\\)$" raw-out-file)
+                             (cons (match-string 1 raw-out-file)
+                                   (match-string 2 raw-out-file))
+                           (cons raw-out-file "png")))
+         (out-file (concat (car out-file-parts) "_" hash "." (cdr out-file-parts))))
     (cond
      ((or htmlp latexp docbookp)
-      (with-temp-file data-file (insert body))
-      (message (concat "dot " data-file " " args " -o " out-file))
-      (shell-command (concat "dot " data-file " " args " -o " out-file))
+      (unless (file-exists-p out-file)
+        (mapc ;; remove old hashed versions of this file
+         (lambda (file)
+           (when (and (string-match (concat (regexp-quote (car out-file-parts))
+                                            "_\\([[:alnum:]]+\\)\\."
+                                            (regexp-quote (cdr out-file-parts)))
+                                    file)
+                      (= (length (match-string 1 out-file)) 40))
+             (delete-file (expand-file-name file
+                                            (file-name-directory out-file)))))
+         (directory-files (or (file-name-directory out-file)
+                              default-directory)))
+        (with-temp-file data-file (insert body))
+        (message (concat "dot " data-file " " args " -o " out-file))
+        (shell-command (concat "dot " data-file " " args " -o " out-file)))
       (format "\n[[file:%s]]\n" out-file))
      (t (concat
         "\n#+BEGIN_EXAMPLE\n"
index ca0f28a06f9ac9f0a4c548085b26a4e533f6f223..9dcc8bbed789cec31ef6b0e8b0eceabce7448956 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index e5e779e11ebc794e1b064b0c09a949cc5a681f36..d8524713340522c3b43cfee797c6ad0a3ffa8566 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -44,6 +44,7 @@
       (copy-face old-face new-face)
       (if (fboundp 'set-face-doc-string)
          (set-face-doc-string new-face docstring)))))
+(put 'org-copy-face 'lisp-indent-function 2)
 
 (defgroup org-faces nil
   "Faces in Org-mode."
@@ -468,6 +469,11 @@ changes."
   :group 'org-faces
   :version "22.1")
 
+(org-copy-face 'org-block 'org-quote
+   "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.")
+(org-copy-face 'org-block 'org-verse
+   "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.")
+
 (defface org-clock-overlay ;; copied from secondary-selection
   (org-compatible-face nil
     '((((class color) (min-colors 88) (background light))
index 0af8f64b3f68987b500ecc42769155031ee84305..ee2f6746b6b807adbae61b3f33a91e0f5be4ff0f 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index e3c2b1091b64b75a0071b0b8d0fb762483097307..7d4f23ec99cf58c92d081609a9fb21518932f1a6 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 79d6f02f4f770db7bdc1c7d04033ec6fbea6c6db..24dda857c0e321c4f4d425b328239f2c4bfef650 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -240,7 +240,7 @@ The characters \"&<> will be escaped."
                       ;; file is utf-8:
                       ;;
                       ;; (format "&#x%x;" (- cc ;; ?\x800))
-                      (char-to-string cc)
+                     (format "&#x%x" (encode-char cc 'ucs))
                       ))))
     fm-str))
 
index f41425e8fd6cc5bab040b82a2d2cb0c48e589830..3d366eb44dfc72d1912bc2afaeb5e4083a65afdf 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index f77ccc09f29a47be5c999b8dfebea920b14a4aa1..eda2b89462d5926f76bd5a3a86e6b6fe7b1f9769 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -128,6 +128,7 @@ relative to the current effective date."
     (error "Invalid duration string: %s" ts)))
 
 (defun org-is-habit-p (&optional pom)
+  "Is the task at POM or point a habit?"
   (string= "habit" (org-entry-get (or pom (point)) "STYLE")))
 
 (defun org-habit-parse-todo (&optional pom)
index 2b83a8c1eeb36c60ea61506f2fe500f6bd18f971..d59f16a0c7f55fcb1057142b0230d35f68939902 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -229,7 +229,7 @@ CSS classes, then this prefic can be very useful."
   :type 'string)
 
 (defcustom org-export-html-home/up-format
-  "<div style=\"text-align:right;font-size:70%%;white-space:nowrap;\">
+  "<div id=\"org-div-home-and-up\" style=\"text-align:right;font-size:70%%;white-space:nowrap;\">
  <a accesskey=\"h\" href=\"%s\"> UP </a>
  |
  <a accesskey=\"H\" href=\"%s\"> HOME </a>
@@ -753,7 +753,6 @@ PUB-DIR is set, use this as the publishing directory."
 <html xmlns=\"http://www.w3.org/1999/xhtml\"
 lang=\"%s\" xml:lang=\"%s\">
 <head>
-%s
 <title>%s</title>
 <meta http-equiv=\"Content-Type\" content=\"text/html;charset=%s\"/>
 <meta name=\"generator\" content=\"Org-mode\"/>
@@ -765,6 +764,7 @@ lang=\"%s\" xml:lang=\"%s\">
 </head>
 <body>
 <div id=\"content\">
+%s
 "
                 (format
                  (or (and (stringp org-export-html-xml-declaration)
@@ -775,17 +775,17 @@ lang=\"%s\" xml:lang=\"%s\">
                      "")
                  (or charset "iso-8859-1"))
                 language language
+                (org-html-expand title)
+                (or charset "iso-8859-1")
+                date author description keywords
+                style
                 (if (or link-up link-home)
                     (concat
                      (format org-export-html-home/up-format
                              (or link-up link-home)
                              (or link-home link-up))
                      "\n")
-                  "")
-                (org-html-expand title)
-                (or charset "iso-8859-1")
-                date author description keywords
-                style))
+                  "")))
 
         (org-export-html-insert-plist-item opt-plist :preamble opt-plist)
 
index e5a6a6b26341239d48fe8ac244544d647e6cb745..ebfd288c8bbc7e7edf75e1d752e433ce9f6285e9 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index b27259c7adf69a7a70ae3efc3d84c693d78d53a8..86d40cf241ec3768ae308fbae8d7e109f270554a 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 63b168afc961659d13c4e5ccbf498b0a6e6c9d86..eb3d388e1d3c23522c50650b3e5c70adfc802a7f 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -106,8 +106,8 @@ this variable can be set to nil to get rid of the timer."
   ;; Initialize the indentation and star vectors
   (setq org-indent-strings (make-vector (1+ org-indent-max) nil))
   (setq org-indent-stars (make-vector (1+ org-indent-max) nil))
-  (aset org-indent-strings 0 "")
-  (aset org-indent-stars 0 "")
+  (aset org-indent-strings 0 nil)
+  (aset org-indent-stars 0 nil)
   (loop for i from 1 to org-indent-max do
        (aset org-indent-strings i
              (org-add-props
index cbe55af6676d6a87451a5786b4a47d0df9689a0c..b77c23bcf49602d98adbe8ba0d56bbfe749b247d 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 9aa38e193c52cb15ad21ddae7fa891d8227deaba..43c68cad0e2021e2e1a41efdce9d74af8c6cd379 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.33c
+;; Version: 6.33x
 
 ;; This file is part of GNU Emacs.
 
index 7c863f7ed390c00d3b1d042ce1fca76371d6ac6e..4697d364ce394a35a80a16d475b724e1be82ce46 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Philip Jackson <emacs@shellarchive.co.uk>
 ;; Keywords: erc, irc, link, org
-;; Version: 6.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 2196b737354a728c195bc81c679e1f2e5029e023..b7ab1b7aff75a3d3669fe7fbdcafcbc1f089f07a 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index b48fdb35ffa1c34b277efec22c445342f89300c1..5d4ac96877f0373ad6467efab692fde9183fc5d4 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; Emacs Lisp Archive Entry
 ;; Filename: org-latex.el
-;; Version: 6.33c
+;; Version: 6.33x
 ;; Author: Bastien Guerry <bzg AT altern DOT org>
 ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com>
 ;; Keywords: org, wp, tex
@@ -256,15 +256,6 @@ When nil, grouping causes only separation lines between groups."
   :group 'org-export-latex
   :type 'boolean)
 
-(defcustom org-export-latex-packages-alist nil
-  "Alist of packages to be inserted in the header.
-Each cell is of the format \( \"option\" . \"package\" \)."
-  :group 'org-export-latex
-  :type '(repeat
-         (list
-          (string :tag "option")
-          (string :tag "package"))))
-
 (defcustom org-export-latex-low-levels 'itemize
   "How to convert sections below the current level of sectioning.
 This is specified by the `org-export-headline-levels' option or the
@@ -1465,7 +1456,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
   "Convert fontification to LaTeX."
   (goto-char (point-min))
   (while (re-search-forward org-emph-re nil t)
-    ;; The match goes one char after the *string*
+    ;; The match goes one char after the *string*, except at the end of a line
     (let ((emph (assoc (match-string 3)
                       org-export-latex-emphasis-alist))
          (beg (match-beginning 0))
@@ -1491,7 +1482,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
        (if (caddr emph)
            (setq rpl (org-export-latex-protect-string rpl))
          (save-match-data
-           (if (string-match "\\`.\\(\\\\[a-z]+{\\)\\(.*\\)\\(}\\).\\'" rpl)
+           (if (string-match "\\`.\\(\\\\[a-z]+{\\)\\(.*\\)\\(}\\).?\\'" rpl)
                (progn
                  (add-text-properties (match-beginning 1) (match-end 1)
                                       '(org-protected t) rpl)
@@ -1824,7 +1815,8 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
           (save-excursion
             (if (not (re-search-forward (concat "^" (regexp-quote foot-prefix))
                                         nil t))
-                (replace-match "$^{\\1}$")
+                (replace-match (org-export-latex-protect-string
+                                (concat "$^{" (match-string 1) "}$")))
               (replace-match "")
               (let ((end (save-excursion
                            (if (re-search-forward "^$\\|^#.*$\\|\\[[0-9]+\\]" nil t)
index d864ab008f6b4caddd67cd6544f6ef26161c045a..2e152a01219bd742985cab794ebce0ad5b94d999 100644 (file)
@@ -7,7 +7,7 @@
 ;;        Bastien Guerry <bzg AT altern DOT org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 6.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 54978916d36ae7332b0fc1d92caa3acbb3307c0f..a9a00294783c4e5823c1efe9ac7e7788fea29d94 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: John Wiegley <johnw@gnu.org>
 ;;         Christopher Suckling <suckling at gmail dot com>
 
-;; Version: 6.33c
+;; Version: 6.33x
 ;; Keywords: outlines, hypermedia, calendar, wp
 
 ;; This file is part of GNU Emacs.
index 1f4ec10bf59156ae7ca12fd49ffc4b97bb406458..876e0a10c92149f27ee371d4a1365fe8843f04b7 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index bd590e672d8f4e8e8c3c35760a52f9d609a4e079..ef3fd5e1afda90af3e939f978b63f5035e2dc011 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.33c
+;; Version: 6.33x
 
 ;; This file is part of GNU Emacs.
 
index a9d66696bbe7dcd4b308dcd4721bddc4c9ca2ba3..933d1c350032dfe60c2b1afb775365480c0a2381 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index f482f7cd8d2fe8fb5aebd0dc10ffbc61321c5bd1..58e6a3c0cf0dd7a16490d44c9b032ba768fb292c 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 6fbd61539e39214713508274aa67b3f2a44f0f6d..61f07b0c42063d9325f6f286c0984fea51ab2c8c 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 55c0877ce21b933980704367e466017a0b818332..b69b6d38d2b32d73471937a0baa5f6cd752ba481 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 0832bd1f59f09c53222bacbc59611fa55fcc7580..bb60d4ffec3a61dc3b66a630d60903e35bd9b734 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.33c
+;; Version: 6.33x
 
 ;; This file is part of GNU Emacs.
 ;;
@@ -185,6 +185,8 @@ Possible properties are:
                        Last slash required.
   :working-directory - the local working directory. This is, what base-url will
                        be replaced with.
+  :redirects         - A list of cons cells, each of which maps a regular
+                       expression to match to a path relative to :working-directory.
 
 Example:
 
@@ -198,7 +200,12 @@ Example:
           :online-suffix \".html\"
           :working-suffix \".org\"
           :base-url \"http://localhost/org/\"
-          :working-directory \"/home/user/org/\")))
+          :working-directory \"/home/user/org/\"
+          :rewrites ((\"org/?$\" . \"index.php\")))))
+
+   The last line tells `org-protocol-open-source' to open
+   /home/user/org/index.php, if the URL cannot be mapped to an existing
+   file, and ends with either \"org\" or \"org/\".
 
 Consider using the interactive functions `org-protocol-create' and
 `org-protocol-create-for-org' to help you filling this variable with valid contents."
@@ -504,10 +511,35 @@ The location for a browser's bookmark should look like this:
             (let* ((wdir (plist-get (cdr prolist) :working-directory))
                    (strip-suffix (plist-get (cdr prolist) :online-suffix))
                    (add-suffix (plist-get (cdr prolist) :working-suffix))
-                   (start-pos (+ (string-match wsearch f) (length base-url)))
+                  ;; Strip "[?#].*$" if `f' is a redirect with another
+                  ;; ending than strip-suffix here:
+                  (f1 (substring f 0 (string-match "\\([\\?#].*\\)?$" f)))
+                   (start-pos (+ (string-match wsearch f1) (length base-url)))
                    (end-pos (string-match
-                             (concat (regexp-quote strip-suffix) "\\([?#].*\\)?$") f))
-                   (the-file (concat wdir (substring f start-pos end-pos) add-suffix)))
+                            (regexp-quote strip-suffix) f1))
+                  ;; We have to compare redirects without suffix below:
+                  (f2 (concat wdir (substring f1 start-pos end-pos)))
+                   (the-file (concat f2 add-suffix)))
+
+             ;; Note: the-file may still contain `%C3' et al here because browsers
+             ;; tend to encode `&auml;' in URLs to `%25C3' - `%25' being `%'.
+             ;; So the results may vary.
+
+             ;; -- start redirects --
+             (unless (file-exists-p the-file)
+               (message "File %s does not exist.\nTesting for rewritten URLs." the-file)
+               (let ((rewrites (plist-get (cdr prolist) :rewrites)))
+                 (when rewrites
+                   (message "Rewrites found: %S" rewrites)
+                   (mapc
+                    (lambda (rewrite)
+                      "Try to match a rewritten URL and map it to a real file."
+                      ;; Compare redirects without suffix:
+                      (if (string-match (car rewrite) f2)
+                          (throw 'result (concat wdir (cdr rewrite)))))
+                    rewrites))))
+             ;; -- end of redirects --
+
               (if (file-readable-p the-file)
                   (throw 'result the-file))
               (if (file-exists-p the-file)
@@ -596,7 +628,7 @@ most of the work."
   "Create a new org-protocol project interactively.
 An org-protocol project is an entry in `org-protocol-project-alist'
 which is used by `org-protocol-open-source'.
-Optionally use project-plist to initialize the defaults for this worglet. If
+Optionally use project-plist to initialize the defaults for this project. If
 project-plist is the CDR of an element in `org-publish-project-alist', reuse
 :base-directory, :html-extension and :base-extension."
   (interactive)
@@ -632,7 +664,7 @@ project-plist is the CDR of an element in `org-publish-project-alist', reuse
            (concat "Extension of editable files ("working-suffix"): ")
                    working-suffix nil working-suffix t))
 
-    (when (yes-or-no-p "Save the new worglet to your init file? ")
+    (when (yes-or-no-p "Save the new org-protocol-project to your init file? ")
       (setq org-protocol-project-alist
             (cons `(,base-url . (:base-url ,base-url
                                  :working-directory ,working-dir
index 6abaae9cdd0f97eb082149e7fc6357bf3b350906..913ef6f59d9ffe288722f083f0589d5bc6e25968 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.33c
+;; Version: 6.33x
 
 ;; This file is part of GNU Emacs.
 ;;
index d0ba6131c8fe9313479c0e711bb7d07668c6cd65..b258668ebdcece7fa0e2098f6be787c238eed4ea 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 0ff5f1438446a909bce4d95b9756a0928cdea4ed..5b0a38cd1ae565f0b19401e602ad02a69ae77a2f 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 19494c100432bae412a2d44bb15733d2ead10a09..e56d77cb68d0ba15203b20e8a783f457445c8d61 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 087b30a5c919dea21e0a1bd1e97d9ac1d16ddd4f..0ebbff900cb39aec22fb1c98585e3606685456de 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 77c816413ccec102736e11607a0a487b14973253..00271ec0de9d8cbd70c3c65f5b7121cfb4afe199 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index a96cbbcbb51d30fe9b6182db65844d755f57dbce..8e7aca7b72ae744200eaa600b0843f13c40576e1 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 53a52d415c0c6d03ff1655d4ca051b1c0385df5e..2c0f468c826b5c93ff8603257cbaa282a56c237e 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index 3a284c60e34d9ef7c55ea287518506e33005b29a..689373bfcbcd0104e56dadc3298ac1d712b0731f 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
                 wl-summary-buffer-elmo-folder msgnum)
              (elmo-msgdb-overview-get-entity
               msgnum (wl-summary-buffer-msgdb))))
-          (from (wl-summary-line-from))
+          (from (let ((from-field (elmo-message-entity-field wl-message-entity
+                                                             'from)))
+                  (if (listp from-field)
+                      (car from-field)
+                    from-field)))
           (to (let ((to-field (elmo-message-entity-field wl-message-entity
                                                          'to)))
                 (if (listp to-field)
index 45c25589ae791a87675fc198ed0f7646517cd4b0..e4e5293e20c935725d7bd55266f1ecb1df13935a 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
index d5cb8bacc792d6ec24d662891d11ba031304b249..325a5248dc613122f0221bec944346fca8795dbe 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.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -95,7 +95,7 @@
 
 ;;; Version
 
-(defconst org-version "6.33c"
+(defconst org-version "6.33x"
   "The version number of the file org.el.")
 
 (defun org-version (&optional here)
@@ -2858,6 +2858,17 @@ appears on the page."
   :group 'org-latex
   :type 'string)
 
+;; The following variable is defined here because is it also used
+;; when formatting latex fragments.  Originally it was part of the
+;; LaTeX exporter, which is why the name includes "export".
+(defcustom org-export-latex-packages-alist nil
+  "Alist of packages to be inserted in the header.
+Each cell is of the format \( \"option\" . \"package\" \)."
+  :group 'org-export-latex
+  :type '(repeat
+         (list
+          (string :tag "option")
+          (string :tag "package"))))
 
 (defgroup org-font-lock nil
   "Font-lock settings for highlighting in Org-mode."
@@ -3550,7 +3561,9 @@ collapsed state."
 (eval-and-compile
   (org-autoload "org-archive"
    '(org-add-archive-files org-archive-subtree
-     org-archive-to-archive-sibling org-toggle-archive-tag)))
+     org-archive-to-archive-sibling org-toggle-archive-tag
+     org-archive-subtree-default
+     org-archive-subtree-default-with-confirmation)))
 
 ;; Autoload Column View Code
 
@@ -4507,6 +4520,7 @@ will be prompted for."
                nil
              (add-text-properties (match-beginning 0) (match-end 0)
                                   (list 'mouse-face 'highlight
+                                        'face 'org-link
                                         'keymap org-mouse-map))
              (org-rear-nonsticky-at (match-end 0)))
            t)))))
@@ -4529,7 +4543,7 @@ will be prompted for."
              (beg1 (line-beginning-position 2))
              (dc1 (downcase (match-string 2)))
              (dc3 (downcase (match-string 3)))
-             end end1 quoting)
+             end end1 quoting block-type)
          (cond
           ((member dc1 '("html:" "ascii:" "latex:" "docbook:"))
            ;; a single line of backend-specific content
@@ -4543,8 +4557,8 @@ will be prompted for."
            t)
           ((and (match-end 4) (equal dc3 "begin"))
            ;; Truely a block
-           (setq quoting (member (downcase (match-string 5))
-                                 org-protecting-blocks))
+           (setq block-type (downcase (match-string 5))
+                 quoting (member block-type org-protecting-blocks))
            (when (re-search-forward
                   (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*")
                   nil t)  ;; on purpose, we look further than LIMIT
@@ -4557,8 +4571,13 @@ will be prompted for."
               '(font-lock-fontified t font-lock-multiline t))
              (add-text-properties beg beg1 '(face org-meta-line))
              (add-text-properties end1 end '(face org-meta-line))
-             (when quoting
+             (cond
+              (quoting
                (add-text-properties beg1 end1 '(face org-block)))
+              ((string= block-type "quote")
+               (add-text-properties beg1 end1 '(face org-quote)))
+              ((string= block-type "verse")
+               (add-text-properties beg1 end1 '(face org-verse))))
              t))
           ((not (member (char-after beg) '(?\  ?\t)))
            ;; just any other in-buffer setting, but not indented
@@ -4887,7 +4906,7 @@ For plain list items, if they are matched by `outline-regexp', this returns
           ;; Links
           (if (memq 'tag lk) '(org-activate-tags (1 'org-tag prepend)))
           (if (memq 'angle lk) '(org-activate-angle-links (0 'org-link t)))
-          (if (memq 'plain lk) '(org-activate-plain-links (0 'org-link t)))
+          (if (memq 'plain lk) '(org-activate-plain-links))
           (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t)))
           (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t)))
           (if (memq 'date lk) '(org-activate-dates (0 'org-date t)))
@@ -5413,19 +5432,6 @@ This function is the default value of the hook `org-cycle-hook'."
      ((eq state 'children) (or (org-subtree-end-visible-p) (recenter 1)))
      ((eq state 'subtree)  (or (org-subtree-end-visible-p) (recenter 1))))))
 
-;; FIXME: no longer in use
-(defun org-compact-display-after-subtree-move ()
-  "Show a compacter version of the tree of the entry's parent."
-  (save-excursion
-    (if (org-up-heading-safe)
-       (progn
-         (hide-subtree)
-         (show-entry)
-         (show-children)
-         (org-cycle-show-empty-lines 'children)
-         (org-cycle-hide-drawers 'children))
-      (org-overview))))
-
 (defun org-remove-empty-overlays-at (pos)
   "Remove outline overlays that do not contain non-white stuff."
   (mapc
@@ -6855,7 +6861,9 @@ WITH-CASE, the sorting considers case as well."
      ((org-at-item-p)
       ;; we will sort this plain list
       (org-beginning-of-item-list) (setq start (point))
-      (org-end-of-item-list) (setq end (point))
+      (org-end-of-item-list)
+      (or (bolp) (insert "\n"))
+      (setq end (point))
       (goto-char start)
       (setq plain-list-p t
            what "plain list"))
@@ -6865,6 +6873,7 @@ WITH-CASE, the sorting considers case as well."
       (org-back-to-heading)
       (setq start (point)
            end (progn (org-end-of-subtree t t)
+                      (or (bolp) (insert "\n"))
                       (org-back-over-empty-lines)
                       (point))
            what "children")
@@ -6875,7 +6884,15 @@ WITH-CASE, the sorting considers case as well."
       ;; we will sort the top-level entries in this file
       (goto-char (point-min))
       (or (org-on-heading-p) (outline-next-heading))
-      (setq start (point) end (point-max) what "top-level")
+      (setq start (point))
+      (goto-char (point-max))
+      (beginning-of-line 1)
+      (when (looking-at ".*?\\S-")
+       ;; File ends in a non-white line
+       (end-of-line 1)
+       (insert "\n"))
+      (setq end (point-max))
+      (setq what "top-level")
       (goto-char start)
       (show-all)))
 
@@ -7703,6 +7720,10 @@ according to FMT (default from `org-email-link-description-format')."
   "Make a link with brackets, consisting of LINK and DESCRIPTION."
   (unless (string-match "\\S-" link)
     (error "Empty link"))
+  (when (and description
+            (stringp description)
+            (not (string-match "\\S-" description)))
+    (setq description nil))
   (when (stringp description)
     ;; Remove brackets from the description, they are fatal.
     (while (string-match "\\[" description)
@@ -9006,10 +9027,12 @@ avoiding backtracing."
          (aset org-olpa level heading)))
     (let (rtn)
       (save-excursion
-       (while (org-up-heading-safe)
-         (when (looking-at org-complex-heading-regexp)
-           (push (org-match-string-no-properties 4) rtn)))
-       rtn))))
+       (save-restriction
+         (widen)
+         (while (org-up-heading-safe)
+           (when (looking-at org-complex-heading-regexp)
+             (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.
@@ -9059,7 +9082,8 @@ such as the file name."
                                     (org-back-to-heading t)
                                     (if (looking-at org-complex-heading-regexp)
                                         (list (match-string 4)))))))
-    (message (org-format-outline-path
+    (message "%s"
+            (org-format-outline-path
              path
              (1- (frame-width))
              (and file bfn (concat (file-name-nondirectory bfn) "/"))))))
@@ -12219,11 +12243,11 @@ allowed value."
                  (if (equal rpl 0) (setq rpl 10))
                  (if (and (> rpl 0) (<= rpl (length allowed)))
                      (car (nth (1- rpl) allowed))
-                   (org-completing-read "Value: " allowed nil))))
+                   (org-completing-read "Effort: " allowed nil))))
               (t
                (let (org-completion-use-ido org-completion-use-iswitchb)
                  (org-completing-read
-                  (concat "Value " (if (and cur (string-match "\\S-" cur))
+                  (concat "Effort " (if (and cur (string-match "\\S-" cur))
                                        (concat "[" cur "]") "")
                           ": ")
                   existing nil nil "" nil cur))))))
@@ -13122,7 +13146,7 @@ user."
             deltadef (nth 2 delta)))
 
     ;; Check if there is an iso week date in there
-    ;; If yes, sore the info and postpone interpreting it until the rest
+    ;; If yes, store the info and postpone interpreting it until the rest
     ;; of the parsing is done
     (when (string-match "\\<\\(?:\\([0-9]+\\)-\\)?[wW]\\([0-9]\\{1,2\\}\\)\\(?:-\\([0-6]\\)\\)?\\([ \t]\\|$\\)" ans)
       (setq iso-year (if (match-end 1) (org-small-year-to-year (string-to-number (match-string 1 ans))))
@@ -14561,15 +14585,9 @@ Some of the options can be changed using the variable
         (opt org-format-latex-options)
         (matchers (plist-get opt :matchers))
         (re-list org-latex-regexps)
-        (cnt 0) txt link beg end re e checkdir
+        (cnt 0) txt hash link beg end re e checkdir
         executables-checked
         m n block linkfile movefile ov)
-    ;; Check if there are old images files with this prefix, and remove them
-    (when (file-directory-p todir)
-      (mapc 'delete-file
-           (directory-files
-            todir 'full
-            (concat (regexp-quote prefixnodir) "_[0-9]+\\.png$"))))
     ;; Check the different regular expressions
     (while (setq e (pop re-list))
       (setq m (car e) re (nth 1 e) n (nth 2 e)
@@ -14587,9 +14605,15 @@ Some of the options can be changed using the variable
            (setq txt (match-string n)
                  beg (match-beginning n) end (match-end n)
                  cnt (1+ cnt)
-                 linkfile (format "%s_%04d.png" prefix cnt)
-                 movefile (format "%s_%04d.png" absprefix cnt)
                  link (concat block "[[file:" linkfile "]]" block))
+           (let (print-length print-level) ; make sure full list is printed
+             (setq hash (sha1 (prin1-to-string
+                               (list org-format-latex-header
+                                     org-export-latex-packages-alist
+                                     org-format-latex-options
+                                     forbuffer txt)))
+                   linkfile (format "%s_%s.png" prefix hash)
+                   movefile (format "%s_%s.png" absprefix hash)))
            (if msg (message msg cnt))
            (goto-char beg)
            (unless checkdir ; make sure the directory exists
@@ -14603,8 +14627,9 @@ Some of the options can be changed using the variable
               "dvipng" "needed to convert LaTeX fragments to images")
              (setq executables-checked t))
 
-           (org-create-formula-image
-            txt movefile opt forbuffer)
+            (unless (file-exists-p movefile)
+              (org-create-formula-image
+               txt movefile opt forbuffer))
            (if overlays
                (progn
                  (mapc (lambda (o)
@@ -14628,7 +14653,6 @@ Some of the options can be changed using the variable
              (delete-region beg end)
              (insert link))))))))
 
-(defvar org-export-latex-packages-alist) ;; defined in org-latex.el
 ;; This function borrows from Ganesh Swami's latex2png.el
 (defun org-create-formula-image (string tofile options buffer)
   "This calls dvipng."
@@ -14936,7 +14960,6 @@ Some of the options can be changed using the variable
     ("Agenda Views etc")
     ("v" . org-agenda)
     ("/" . org-sparse-tree)
-    ("/" . org-sparse-tree)
     ("Misc")
     ("o" . org-open-at-point)
     ("?" . org-speed-command-help)
@@ -16656,7 +16679,12 @@ really on, so that the block visually is on the match."
        (add-to-list 'files f 'append)
        (add-to-list 'tnames (file-truename f) 'append)))
     (multi-occur
-     (mapcar (lambda (x) (or (get-file-buffer x) (find-file-noselect x))) files)
+     (mapcar (lambda (x)
+              (with-current-buffer
+                  (or (get-file-buffer x) (find-file-noselect x))
+                (widen)
+                (current-buffer)))
+            files)
      regexp)))
 
 (if (boundp 'occur-mode-find-occurrence-hook)