emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/org ChangeLog org-agenda.el org-arch...


From: Carsten Dominik
Subject: [Emacs-diffs] emacs/lisp/org ChangeLog org-agenda.el org-arch...
Date: Fri, 20 Nov 2009 20:50:37 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Carsten Dominik <cdominik>      09/11/20 20:50:36

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

Log message:
        2009-11-20  Carsten Dominik  <address@hidden>
        
                * 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  <address@hidden>
        
                * 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.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/ChangeLog?cvsroot=emacs&r1=1.95&r2=1.96
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-agenda.el?cvsroot=emacs&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-archive.el?cvsroot=emacs&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-ascii.el?cvsroot=emacs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-attach.el?cvsroot=emacs&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-bbdb.el?cvsroot=emacs&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-bibtex.el?cvsroot=emacs&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-clock.el?cvsroot=emacs&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-colview.el?cvsroot=emacs&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-compat.el?cvsroot=emacs&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-crypt.el?cvsroot=emacs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-datetree.el?cvsroot=emacs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-docbook.el?cvsroot=emacs&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-exp-blocks.el?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-exp.el?cvsroot=emacs&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-faces.el?cvsroot=emacs&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-feed.el?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-footnote.el?cvsroot=emacs&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-freemind.el?cvsroot=emacs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-gnus.el?cvsroot=emacs&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-habit.el?cvsroot=emacs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-html.el?cvsroot=emacs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-icalendar.el?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-id.el?cvsroot=emacs&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-indent.el?cvsroot=emacs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-info.el?cvsroot=emacs&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-inlinetask.el?cvsroot=emacs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-irc.el?cvsroot=emacs&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-jsinfo.el?cvsroot=emacs&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-latex.el?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-list.el?cvsroot=emacs&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mac-message.el?cvsroot=emacs&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-macs.el?cvsroot=emacs&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mew.el?cvsroot=emacs&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mhe.el?cvsroot=emacs&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mobile.el?cvsroot=emacs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-mouse.el?cvsroot=emacs&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-plot.el?cvsroot=emacs&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-protocol.el?cvsroot=emacs&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-publish.el?cvsroot=emacs&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-remember.el?cvsroot=emacs&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-rmail.el?cvsroot=emacs&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-src.el?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-table.el?cvsroot=emacs&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-timer.el?cvsroot=emacs&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-vm.el?cvsroot=emacs&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-w3m.el?cvsroot=emacs&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-wl.el?cvsroot=emacs&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org-xoxo.el?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/org/org.el?cvsroot=emacs&r1=1.60&r2=1.61

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/ChangeLog,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- ChangeLog   15 Nov 2009 07:11:04 -0000      1.95
+++ ChangeLog   20 Nov 2009 20:50:32 -0000      1.96
@@ -1,3 +1,96 @@
+2009-11-20  Carsten Dominik  <address@hidden>
+
+       * 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  <address@hidden>
+
+       * 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  <address@hidden>
 
        * org-latex.el (org-export-as-latex): Add the :drawers property.

Index: org-agenda.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-agenda.el,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- org-agenda.el       15 Nov 2009 07:11:04 -0000      1.38
+++ org-agenda.el       20 Nov 2009 20:50:32 -0000      1.39
@@ -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 @@
   :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 @@
 (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 @@
   (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)))
+    (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,13 +4658,23 @@
        '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."
+(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 " :"
@@ -4665,7 +4687,7 @@
                                 (concat ":" x))
                             x))
                         tags ":")
-                       (if have-i "::" ":")))))
+                         (if have-i "::" ":"))))))
   txt)
 
 (defun org-downcase-keep-props (s)
@@ -5693,8 +5715,8 @@
     (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 @@
 
 (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 @@
       (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 @@
        (insert (format "%%%%(diary-anniversary %s) %s"
                        (calendar-date-string d1 nil t) text))))
      ((eq type 'day)
+      (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-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 @@
       (if (> (calendar-absolute-from-gregorian d1)
             (calendar-absolute-from-gregorian d2))
          (setq d1 (prog1 d2 (setq d2 d1))))
+      (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-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 @@
       (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: org-archive.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-archive.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- org-archive.el      15 Nov 2009 07:11:05 -0000      1.29
+++ org-archive.el      20 Nov 2009 20:50:32 -0000      1.30
@@ -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 @@
   (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: org-ascii.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-ascii.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- org-ascii.el        15 Nov 2009 07:11:05 -0000      1.7
+++ org-ascii.el        20 Nov 2009 20:50:32 -0000      1.8
@@ -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: org-attach.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-attach.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- org-attach.el       15 Nov 2009 07:11:05 -0000      1.23
+++ org-attach.el       20 Nov 2009 20:50:32 -0000      1.24
@@ -4,7 +4,7 @@
 
 ;; Author: John Wiegley <address@hidden>
 ;; Keywords: org data task
-;; Version: 6.33c
+;; Version: 6.33x
 
 ;; This file is part of GNU Emacs.
 ;;

Index: org-bbdb.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-bbdb.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- org-bbdb.el 15 Nov 2009 07:11:05 -0000      1.30
+++ org-bbdb.el 20 Nov 2009 20:50:32 -0000      1.31
@@ -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: org-bibtex.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-bibtex.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- org-bibtex.el       15 Nov 2009 07:11:05 -0000      1.28
+++ org-bibtex.el       20 Nov 2009 20:50:32 -0000      1.29
@@ -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: org-clock.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-clock.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- org-clock.el        15 Nov 2009 07:11:05 -0000      1.32
+++ org-clock.el        20 Nov 2009 20:50:32 -0000      1.33
@@ -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: org-colview.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-colview.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- org-colview.el      15 Nov 2009 07:11:05 -0000      1.30
+++ org-colview.el      20 Nov 2009 20:50:32 -0000      1.31
@@ -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: org-compat.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-compat.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- org-compat.el       15 Nov 2009 07:11:05 -0000      1.29
+++ org-compat.el       20 Nov 2009 20:50:33 -0000      1.30
@@ -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: org-crypt.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-crypt.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- org-crypt.el        15 Nov 2009 07:11:05 -0000      1.4
+++ org-crypt.el        20 Nov 2009 20:50:33 -0000      1.5
@@ -4,7 +4,7 @@
 
 ;; Emacs Lisp Archive Entry
 ;; Filename: org-crypt.el
-;; Version: 6.33c
+;; Version: 6.33x
 ;; Keywords: org-mode
 ;; Author: John Wiegley <address@hidden>
 ;; Maintainer: Peter Jones <address@hidden>

Index: org-datetree.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-datetree.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- org-datetree.el     15 Nov 2009 07:11:05 -0000      1.2
+++ org-datetree.el     20 Nov 2009 20:50:33 -0000      1.3
@@ -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 @@
 
 (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: org-docbook.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-docbook.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- org-docbook.el      15 Nov 2009 07:11:05 -0000      1.11
+++ org-docbook.el      20 Nov 2009 20:50:33 -0000      1.12
@@ -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: org-exp-blocks.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-exp-blocks.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- org-exp-blocks.el   13 Nov 2009 08:37:56 -0000      1.6
+++ org-exp-blocks.el   20 Nov 2009 20:50:33 -0000      1.7
@@ -217,9 +217,15 @@
 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 @@
                            "\n")))
     (cond
      ((or htmlp latexp docbookp)
+      (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))
+        (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 @@
 }
 #+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)
+      (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))
+        (shell-command (concat "dot " data-file " " args " -o " out-file)))
       (format "\n[[file:%s]]\n" out-file))
      (t (concat
         "\n#+BEGIN_EXAMPLE\n"

Index: org-exp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-exp.el,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- org-exp.el  15 Nov 2009 07:11:05 -0000      1.37
+++ org-exp.el  20 Nov 2009 20:50:33 -0000      1.38
@@ -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: org-faces.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-faces.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- org-faces.el        15 Nov 2009 07:11:05 -0000      1.29
+++ org-faces.el        20 Nov 2009 20:50:33 -0000      1.30
@@ -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 @@
   :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: org-feed.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-feed.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- org-feed.el 15 Nov 2009 07:11:05 -0000      1.6
+++ org-feed.el 20 Nov 2009 20:50:33 -0000      1.7
@@ -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: org-footnote.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-footnote.el,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- org-footnote.el     15 Nov 2009 07:11:05 -0000      1.13
+++ org-footnote.el     20 Nov 2009 20:50:33 -0000      1.14
@@ -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: org-freemind.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-freemind.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- org-freemind.el     15 Nov 2009 07:11:05 -0000      1.2
+++ org-freemind.el     20 Nov 2009 20:50:33 -0000      1.3
@@ -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 @@
                       ;; file is utf-8:
                       ;;
                       ;; (format "&#x%x;" (- cc ;; ?\x800))
-                      (char-to-string cc)
+                     (format "&#x%x" (encode-char cc 'ucs))
                       ))))
     fm-str))
 

Index: org-gnus.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-gnus.el,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- org-gnus.el 15 Nov 2009 07:11:06 -0000      1.31
+++ org-gnus.el 20 Nov 2009 20:50:33 -0000      1.32
@@ -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: org-habit.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-habit.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- org-habit.el        15 Nov 2009 07:11:06 -0000      1.2
+++ org-habit.el        20 Nov 2009 20:50:33 -0000      1.3
@@ -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 @@
     (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: org-html.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-html.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- org-html.el 15 Nov 2009 07:11:06 -0000      1.8
+++ org-html.el 20 Nov 2009 20:50:33 -0000      1.9
@@ -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 @@
   :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 @@
 <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 @@
 </head>
 <body>
 <div id=\"content\">
+%s
 "
                 (format
                  (or (and (stringp org-export-html-xml-declaration)
@@ -775,17 +775,17 @@
                      "")
                  (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: org-icalendar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-icalendar.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- org-icalendar.el    15 Nov 2009 07:11:06 -0000      1.6
+++ org-icalendar.el    20 Nov 2009 20:50:33 -0000      1.7
@@ -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: org-id.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-id.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- org-id.el   15 Nov 2009 07:11:06 -0000      1.29
+++ org-id.el   20 Nov 2009 20:50:33 -0000      1.30
@@ -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: org-indent.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-indent.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- org-indent.el       15 Nov 2009 07:11:06 -0000      1.8
+++ org-indent.el       20 Nov 2009 20:50:33 -0000      1.9
@@ -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 @@
   ;; 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: org-info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-info.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- org-info.el 15 Nov 2009 07:11:06 -0000      1.29
+++ org-info.el 20 Nov 2009 20:50:33 -0000      1.30
@@ -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: org-inlinetask.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-inlinetask.el,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- org-inlinetask.el   15 Nov 2009 07:11:06 -0000      1.9
+++ org-inlinetask.el   20 Nov 2009 20:50:34 -0000      1.10
@@ -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: org-irc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-irc.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- org-irc.el  15 Nov 2009 07:11:06 -0000      1.28
+++ org-irc.el  20 Nov 2009 20:50:34 -0000      1.29
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Philip Jackson <address@hidden>
 ;; Keywords: erc, irc, link, org
-;; Version: 6.33c
+;; Version: 6.33x
 ;;
 ;; This file is part of GNU Emacs.
 ;;

Index: org-jsinfo.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-jsinfo.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- org-jsinfo.el       15 Nov 2009 07:11:06 -0000      1.28
+++ org-jsinfo.el       20 Nov 2009 20:50:34 -0000      1.29
@@ -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: org-latex.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-latex.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- org-latex.el        15 Nov 2009 07:11:06 -0000      1.6
+++ org-latex.el        20 Nov 2009 20:50:34 -0000      1.7
@@ -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 @@
   :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 @@
   "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 @@
        (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 @@
           (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: org-list.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-list.el,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- org-list.el 15 Nov 2009 07:11:06 -0000      1.26
+++ org-list.el 20 Nov 2009 20:50:34 -0000      1.27
@@ -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: org-mac-message.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mac-message.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- org-mac-message.el  15 Nov 2009 07:11:06 -0000      1.30
+++ org-mac-message.el  20 Nov 2009 20:50:34 -0000      1.31
@@ -5,7 +5,7 @@
 ;; Author: John Wiegley <address@hidden>
 ;;         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: org-macs.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-macs.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- org-macs.el 15 Nov 2009 07:11:06 -0000      1.29
+++ org-macs.el 20 Nov 2009 20:50:34 -0000      1.30
@@ -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: org-mew.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mew.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- org-mew.el  15 Nov 2009 07:11:06 -0000      1.28
+++ org-mew.el  20 Nov 2009 20:50:34 -0000      1.29
@@ -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: org-mhe.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mhe.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- org-mhe.el  15 Nov 2009 07:11:06 -0000      1.28
+++ org-mhe.el  20 Nov 2009 20:50:34 -0000      1.29
@@ -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: org-mobile.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mobile.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- org-mobile.el       15 Nov 2009 07:11:06 -0000      1.4
+++ org-mobile.el       20 Nov 2009 20:50:34 -0000      1.5
@@ -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: org-mouse.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-mouse.el,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- org-mouse.el        15 Nov 2009 07:11:06 -0000      1.31
+++ org-mouse.el        20 Nov 2009 20:50:34 -0000      1.32
@@ -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: org-plot.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-plot.el,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- org-plot.el 15 Nov 2009 07:11:06 -0000      1.24
+++ org-plot.el 20 Nov 2009 20:50:34 -0000      1.25
@@ -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: org-protocol.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-protocol.el,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- org-protocol.el     15 Nov 2009 07:11:06 -0000      1.10
+++ org-protocol.el     20 Nov 2009 20:50:34 -0000      1.11
@@ -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 @@
                        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 @@
           :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 @@
             (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 @@
   "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 @@
            (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: org-publish.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-publish.el,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- org-publish.el      15 Nov 2009 07:11:06 -0000      1.34
+++ org-publish.el      20 Nov 2009 20:50:34 -0000      1.35
@@ -4,7 +4,7 @@
 ;; Author: David O'Toole <address@hidden>
 ;; 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: org-remember.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-remember.el,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- org-remember.el     15 Nov 2009 07:11:07 -0000      1.31
+++ org-remember.el     20 Nov 2009 20:50:34 -0000      1.32
@@ -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: org-rmail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-rmail.el,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- org-rmail.el        15 Nov 2009 07:11:07 -0000      1.31
+++ org-rmail.el        20 Nov 2009 20:50:34 -0000      1.32
@@ -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: org-src.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-src.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- org-src.el  15 Nov 2009 07:11:07 -0000      1.6
+++ org-src.el  20 Nov 2009 20:50:34 -0000      1.7
@@ -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: org-table.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-table.el,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- org-table.el        15 Nov 2009 07:11:07 -0000      1.35
+++ org-table.el        20 Nov 2009 20:50:34 -0000      1.36
@@ -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: org-timer.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-timer.el,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- org-timer.el        15 Nov 2009 07:11:07 -0000      1.16
+++ org-timer.el        20 Nov 2009 20:50:35 -0000      1.17
@@ -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: org-vm.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-vm.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- org-vm.el   15 Nov 2009 07:11:07 -0000      1.28
+++ org-vm.el   20 Nov 2009 20:50:35 -0000      1.29
@@ -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: org-w3m.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-w3m.el,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- org-w3m.el  15 Nov 2009 07:11:07 -0000      1.16
+++ org-w3m.el  20 Nov 2009 20:50:35 -0000      1.17
@@ -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: org-wl.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-wl.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- org-wl.el   15 Nov 2009 07:11:07 -0000      1.29
+++ org-wl.el   20 Nov 2009 20:50:35 -0000      1.30
@@ -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.
 ;;
@@ -91,7 +91,11 @@
                 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: org-xoxo.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-xoxo.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- org-xoxo.el 15 Nov 2009 07:11:07 -0000      1.6
+++ org-xoxo.el 20 Nov 2009 20:50:35 -0000      1.7
@@ -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: org.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org.el,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- org.el      15 Nov 2009 07:11:07 -0000      1.60
+++ org.el      20 Nov 2009 20:50:35 -0000      1.61
@@ -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 @@
   :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 @@
 (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 @@
                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 @@
              (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 @@
            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 @@
               '(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 @@
           ;; 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 @@
      ((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 @@
      ((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 @@
       (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 @@
       ;; 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 @@
   "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 @@
          (aset org-olpa level heading)))
     (let (rtn)
       (save-excursion
+       (save-restriction
+         (widen)
        (while (org-up-heading-safe)
          (when (looking-at org-complex-heading-regexp)
            (push (org-match-string-no-properties 4) rtn)))
-       rtn))))
+         rtn)))))
 
 (defun org-format-outline-path (path &optional width prefix)
   "Format the outlie path PATH for display.
@@ -9059,7 +9082,8 @@
                                     (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 @@
                  (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 @@
             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 @@
         (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 @@
            (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 @@
               "dvipng" "needed to convert LaTeX fragments to images")
              (setq executables-checked t))
 
+            (unless (file-exists-p movefile)
            (org-create-formula-image
-            txt movefile opt forbuffer)
+               txt movefile opt forbuffer))
            (if overlays
                (progn
                  (mapc (lambda (o)
@@ -14628,7 +14653,6 @@
              (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 @@
     ("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 @@
        (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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]