emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111025: Merge upstream Org (from


From: Bastien Guerry
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111025: Merge upstream Org (from commit 488eea)
Date: Wed, 12 Dec 2012 17:47:07 +0100
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111025
committer: Bastien Guerry <address@hidden>
branch nick: emacs-24
timestamp: Wed 2012-12-12 17:47:07 +0100
message:
  Merge upstream Org (from commit 488eea)
modified:
  doc/misc/ChangeLog
  doc/misc/org.texi
  lisp/org/ChangeLog
  lisp/org/org-agenda.el
  lisp/org/org-bibtex.el
  lisp/org/org-clock.el
  lisp/org/org-element.el
  lisp/org/org-latex.el
  lisp/org/org-list.el
  lisp/org/org-remember.el
  lisp/org/org-src.el
  lisp/org/org-table.el
  lisp/org/org-timer.el
  lisp/org/org-version.el
  lisp/org/org.el
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2012-12-02 15:33:17 +0000
+++ b/doc/misc/ChangeLog        2012-12-12 16:47:07 +0000
@@ -1,3 +1,21 @@
+2012-12-12  Bastien Guerry  <address@hidden>
+
+       * org.texi (Summary, Code block specific header arguments)
+       (Code block specific header arguments)
+       (Header arguments in function calls, var, noweb)
+       (Results of evaluation, Code evaluation security): Small
+       reformatting: add a blank line before some example.
+
+       * org.texi (System-wide header arguments)
+       (Header arguments in Org mode properties, Conflicts)
+       (Dynamic blocks, Using the mapping API): Fix indendation of
+       Elisp code examples.
+
+       * org.texi (Comment lines): Fix description of the comment syntax.
+
+       * org.texi (Installation): Mention "make test" in the correct
+       section.
+
 2012-12-02  Michael Albinus  <address@hidden>
 
        * tramp.texi (Top, Obtaining Tramp): Replace CVS by Git.

=== modified file 'doc/misc/org.texi'
--- a/doc/misc/org.texi 2012-12-05 22:27:56 +0000
+++ b/doc/misc/org.texi 2012-12-12 16:47:07 +0000
@@ -834,7 +834,6 @@
 @address@hidden an environment for literate programming}
 @end example
 
-
 @cindex FAQ
 There is a website for Org which provides links to the newest
 version of Org, as well as additional information, frequently asked
@@ -879,8 +878,6 @@
 path, give the full path to the executable.  Avoid spaces in any path names.
 @item Run @code{make config}
 again to check the configuration.
address@hidden Optionally run @code{make test}
-to build Org mode and then run the full testsuite.
 @item Run @code{make install} or @code{sudo make install}
 to build and install Org mode on your system.
 @end itemize
@@ -903,6 +900,8 @@
 executable.  Avoid spaces in any path names.
 @item Run @code{make config}
 to check the configuration.
address@hidden Optionally run @code{make test}
+to build Org mode and then run the full testsuite.
 @item Run @code{make update2} or @code{make up2}
 to update the Git repository and build and install Org mode.  The latter
 invocation runs the complete test suite before installation and installs only
@@ -947,7 +946,7 @@
 Installing Info files is system dependent, because of differences in the
 @file{install-info} program.  The Info documentation is installed together
 with the rest of Org mode.  If you don't install Org mode, it is possible to
-install the Info documentation separately (you need to have
+install the Info documentation seperately (you need to have
 address@hidden output from install-info (if any) is system
 dependent.  In particular Debian and its derivatives use two different
 versions of install-info and you may see the message:
@@ -9222,11 +9221,11 @@
 @cindex exporting, not
 @cindex #+BEGIN_COMMENT
 
-Lines starting with zero or more whitespace characters followed by @samp{#}
-are treated as comments and will never be exported.  Also entire subtrees
-starting with the word @samp{COMMENT} will never be exported.  Finally,
-regions surrounded by @samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will
-not be exported.
+Lines starting with zero or more whitespace characters followed by one
address@hidden and a whitespace are treated as comments and will never be 
exported.
+Also entire subtrees starting with the word @samp{COMMENT} will never be
+exported.  Finally, regions surrounded by @samp{#+BEGIN_COMMENT}
+... @samp{#+END_COMMENT} will not be exported.
 
 @table @kbd
 @kindex C-c ;
@@ -13155,8 +13154,8 @@
 
 @lisp
 (setq org-babel-default-header-args
-(cons '(:noweb . "yes")
-(assq-delete-all :noweb org-babel-default-header-args)))
+      (cons '(:noweb . "yes")
+           (assq-delete-all :noweb org-babel-default-header-args)))
 @end lisp
 
 @node Language-specific header arguments, Buffer-wide header arguments, 
System-wide header arguments, Using header arguments
@@ -13201,9 +13200,9 @@
 
 @example
 * outline header
-:PROPERTIES:
-:cache:    yes
-:END:
+  :PROPERTIES:
+  :cache:    yes
+  :END:
 @end example
 
 @kindex C-c C-x p
@@ -13247,6 +13246,7 @@
 @cindex #+HEADERS:
 
 Multi-line header arguments on an un-named code block:
+
 @example
  #+HEADERS: :var data1=1
  #+BEGIN_SRC emacs-lisp :var data2=2
@@ -13258,6 +13258,7 @@
 @end example
 
 Multi-line header arguments on a named code block:
+
 @example
    #+NAME: named-block
    #+HEADER: :var data=2
@@ -13280,12 +13281,14 @@
 
 The following will apply the @code{:exports results} header argument to the
 evaluation of the @code{#+CALL:} line.
+
 @example
 #+CALL: factorial(n=5) :exports results
 @end example
 
 The following will apply the @code{:session special} header argument to the
 evaluation of the @code{factorial} code block.
+
 @example
 #+CALL: factorial[:session special](n=5)
 @end example
@@ -13366,6 +13369,7 @@
 
 @item table
 an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line
+
 @example
 #+TBLNAME: example-table
 | 1 |
@@ -13948,7 +13952,6 @@
 -- <<example>>
 @end example
 
-
 expands to:
 
 @example
@@ -14331,6 +14334,7 @@
 @end example
 
 In non-session mode, the `2' is not printed and does not appear.
+
 @example
 #+BEGIN_SRC python :results output :session
  print "hello"
@@ -14705,6 +14709,7 @@
 
 For example, here is how to execute "ditaa" code (which is considered safe)
 without asking:
+
 @example
 (defun my-org-confirm-babel-evaluate (lang body)
   (not (string= lang "ditaa")))  ; don't ask for ditaa
@@ -14806,7 +14811,7 @@
 @item #+SETUPFILE: file
 This line defines a file that holds more in-buffer setup.  Normally this is
 entirely ignored.  Only when the buffer is parsed for option-setting lines
-(i.e., when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
+(i.e.@: when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
 settings line, or when exporting), then the contents of this file are parsed
 as if they had been included in the buffer.  In particular, the file can be
 any other Org mode file with internal setup.  You can visit the file the
@@ -15168,7 +15173,7 @@
 Things become cleaner still if you skip all the even levels and use only odd
 levels 1, 3, 5..., effectively adding two stars to go from one outline level
 to the address@hidden you need to specify a level for a property search
-or refile targets, @samp{LEVEL=2} will correspond to 3 stars, etc.}.  In this
+or refile targets, @samp{LEVEL=2} will correspond to 3 stars, address@hidden  
In this
 way we get the outline view shown at the beginning of this section.  In order
 to make the structure editing and export commands handle this convention
 correctly, configure the variable @code{org-odd-levels-only}, or set this on
@@ -15259,7 +15264,7 @@
 constants in the variable @code{org-table-formula-constants}, install
 the @file{constants} package which defines a large number of constants
 and units, and lets you use unit prefixes like @samp{M} for
address@hidden, etc.  You will need version 2.0 of this package, available
address@hidden, address@hidden  You will need version 2.0 of this package, 
available
 at @url{http://www.astro.uva.nl/~dominik/Tools}.  Org checks for
 the function @code{constants-get}, which has to be autoloaded in your
 setup.  See the installation instructions in the file
@@ -15401,7 +15406,7 @@
 
 @lisp
 (defun yas/org-very-safe-expand ()
-       (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
+  (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
 @end lisp
 
 Then, tell Org mode what to do with the new function:
@@ -15409,10 +15414,10 @@
 @lisp
 (add-hook 'org-mode-hook
           (lambda ()
-              (make-variable-buffer-local 'yas/trigger-key)
-              (setq yas/trigger-key [tab])
-              (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
-              (define-key yas/keymap [tab] 'yas/next-field)))
+           (make-variable-buffer-local 'yas/trigger-key)
+           (setq yas/trigger-key [tab])
+           (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
+           (define-key yas/keymap [tab] 'yas/next-field)))
 @end lisp
 
 @item @file{windmove.el} by Hovav Shacham
@@ -16053,9 +16058,9 @@
 
 @lisp
 (defun org-dblock-write:block-update-time (params)
-   (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
-     (insert "Last block update at: "
-             (format-time-string fmt (current-time)))))
+  (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
+    (insert "Last block update at: "
+           (format-time-string fmt (current-time)))))
 @end lisp
 
 If you want to make sure that all dynamic blocks are always up-to-date,
@@ -16450,8 +16455,8 @@
 
 @lisp
 (org-map-entries
-   '(org-todo "UPCOMING")
-   "+TOMORROW" 'file 'archive 'comment)
+ '(org-todo "UPCOMING")
+ "+TOMORROW" 'file 'archive 'comment)
 @end lisp
 
 The following example counts the number of entries with TODO keyword
@@ -16693,7 +16698,7 @@
 opened the doors for many new ideas and features.
 
 @item Jambunathan K
-Jambunathan contributed the ODT exporter, definitely a killer feature of
+Jambunathan contributed the ODT exporter, definitly a killer feature of
 Org mode.  He also contributed the new HTML exporter, which is another core
 feature of Org.  Here too, I knew I could rely on him to fix bugs in these
 areas and to patiently explain the users what was the problems and solutions.
@@ -16701,7 +16706,7 @@
 @item Achim Gratz
 Achim rewrote the building process of Org, turning some @emph{ad hoc} tools
 into a flexible and conceptually clean process.  He patiently coped with the
-many hiccups that such a change can create for users.
+many hicups that such a change can create for users.
 
 @item Nick Dokos
 The Org mode mailing list would not be such a nice place without Nick, who

=== modified file 'lisp/org/ChangeLog'
--- a/lisp/org/ChangeLog        2012-10-26 14:42:05 +0000
+++ b/lisp/org/ChangeLog        2012-12-12 16:47:07 +0000
@@ -1,3 +1,90 @@
+2012-12-12  Bastien Guerry  <address@hidden>
+
+       * org-latex.el (org-export-latex-links): Escape raw path when
+       exporting links to files.
+
+       * org-src.el (org-src-native-tab-command-maybe): Fix bug: the
+       S-TAB key should not trigger a native TAB command.
+
+       * org.el (org-open-at-point): Allow to open any link within
+       footnotes definition, not only bracket links.
+
+       * org.el (org-sort-entries): Bugfix: keep track of the clock
+       marker when sorting entries.  Enhance the docstring.
+
+       * org-clock.el (org-clock-out): Use `user-error' when the user
+       tries to clock out while there is no running clock.
+
+       * org-table.el (org-table-sort-lines): Ensure coordinates are
+       correctly displayed when sorting.
+
+       * org.el (org-do-sort): Enhance prompt.
+
+       * org-agenda.el (org-agenda-finalize): Also activate plain links.
+
+       * org-timer.el (org-timer-stop): Add message.
+
+       * org-agenda.el (org-agenda-schedule, org-agenda-deadline): Fix
+       redundant messages.
+
+       * org-agenda.el (org-agenda-finalize): Fix clock highlighting.
+
+       * org.el (org-additional-option-like-keywords): Add "INDEX:".
+
+       * org-install.el: Enhance warning.
+
+2012-12-12  Erik Hetzner  <address@hidden>  (tiny change)
+
+       * org.el (org-log-into-drawer): Honor the nil value for the
+       :LOG_INTO_DRAWER: property.
+
+2012-12-12  Le Wang  <address@hidden>  (tiny change)
+
+       * org-src.el (org-edit-src-exit): Fix editing source section with
+       blank lines.
+
+2012-12-12  Le Wang  <address@hidden>
+
+       * org-src.el (org-edit-src-code): Use marker with insertion type
+       t to track end and remove hack requiring delete from beg to (1- end).
+
+2012-12-12  Nicolas Goaziou  <address@hidden>
+
+       * org-element.el (org-element-context): When point is between two
+       objects, be sure to return the second one.
+
+       * org-list.el (org-list-separating-blank-lines-number): When
+       computing number of blank lines separating items, also count those
+       in unparsed blocks, like example blocks.
+
+       * org.el (org-end-of-line): When visual line mode is on, really
+       move by visual lines.  Small refactoring.
+
+       * org.el (org-end-of-line): On a hidden block make sure to
+       delegate motion to `end-of-line' instead of `move-end-of-line' in
+       order to stay on the current line.
+
+2012-12-12  Rafael Laboissiere  <address@hidden>  (tiny change)
+
+       * org-bibtex.el: In the documentation section of the file, fix the
+       broken URL to Andrew Roberts' document on BibTeX entries.
+
+       * org-remember.el (org-remember-handler): Correctly strip the
+       comment lines in the temporary buffer *Remember* when handling a
+       remember note.
+
+       * org-remember.el (org-remember-apply-template): Start the
+       commented lines in the Remember temporary buffer with the
+       appropriate characters.
+
+2012-12-12  Toby S. Cubitt  <address@hidden>
+
+       * org.el (org-beginning-of-line): Check `visual-line-mode' instead
+       of `line-visual-mode' to determine whether to move by visual
+       lines.
+
+       * org.el (org-kill-line): Use the `org-bound-and-true-p' macro.
+
 2012-10-26  Achim Gratz  <address@hidden>
 
        * ob-ditaa.el: Needs to (require 'org-compat) for

=== modified file 'lisp/org/org-agenda.el'
--- a/lisp/org/org-agenda.el    2012-10-26 14:42:05 +0000
+++ b/lisp/org/org-agenda.el    2012-12-12 16:47:07 +0000
@@ -3517,6 +3517,9 @@
        (while (org-activate-bracket-links (point-max))
          (add-text-properties (match-beginning 0) (match-end 0)
                               '(face org-link)))
+       (while (org-activate-plain-links (point-max))
+         (add-text-properties (match-beginning 0) (match-end 0)
+                              '(face org-link)))
        (org-agenda-align-tags)
        (unless org-agenda-with-colors
          (remove-text-properties (point-min) (point-max) '(face nil))))
@@ -3531,7 +3534,11 @@
        (org-agenda-fontify-priorities))
       (when (and org-agenda-dim-blocked-tasks org-blocker-hook)
        (org-agenda-dim-blocked-tasks))
-      (org-agenda-mark-clocking-task)
+      ;; We need to widen when `org-agenda-finalize' is called from
+      ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in')
+      (save-restriction
+       (widen)
+       (org-agenda-mark-clocking-task))
       (when org-agenda-entry-text-mode
        (org-agenda-entry-text-hide)
        (org-agenda-entry-text-show))
@@ -8602,7 +8609,7 @@
        (goto-char pos)
        (setq ts (org-schedule arg time)))
       (org-agenda-show-new-time marker ts "S"))
-    (message "Item scheduled for %s" ts)))
+    (message "%s" ts)))
 
 (defun org-agenda-deadline (arg &optional time)
   "Schedule the item at point.
@@ -8622,7 +8629,7 @@
        (goto-char pos)
        (setq ts (org-deadline arg time)))
       (org-agenda-show-new-time marker ts "D"))
-    (message "Deadline for this item set to %s" ts)))
+    (message "%s" ts)))
 
 (defun org-agenda-clock-in (&optional arg)
   "Start the clock on the currently selected item."

=== modified file 'lisp/org/org-bibtex.el'
--- a/lisp/org/org-bibtex.el    2012-09-30 15:14:59 +0000
+++ b/lisp/org/org-bibtex.el    2012-12-12 16:47:07 +0000
@@ -88,7 +88,7 @@
 ;;
 ;; - All Bibtex information is taken from the document compiled by
 ;;   Andrew Roberts from the Bibtex manual, available at
-;;   http://www.andy-roberts.net/misc/latex/sessions/bibtex/bibentries.pdf
+;;   http://www.andy-roberts.net/res/writing/latex/bibentries.pdf
 ;;
 ;;; History:
 ;;

=== modified file 'lisp/org/org-clock.el'
--- a/lisp/org/org-clock.el     2012-10-26 14:42:05 +0000
+++ b/lisp/org/org-clock.el     2012-12-12 16:47:07 +0000
@@ -1447,7 +1447,7 @@
            (delq 'org-mode-line-string global-mode-string))
       (setq frame-title-format org-frame-title-format-backup)
       (force-mode-line-update)
-      (if fail-quietly (throw 'exit t) (error "No active clock")))
+      (if fail-quietly (throw 'exit t) (user-error "No active clock")))
     (let ((org-clock-out-switch-to-state
           (if switch-to-state
               (completing-read "Switch to state: "

=== modified file 'lisp/org/org-element.el'
--- a/lisp/org/org-element.el   2012-10-26 14:42:05 +0000
+++ b/lisp/org/org-element.el   2012-12-12 16:47:07 +0000
@@ -4316,18 +4316,22 @@
                                (funcall (intern (format "org-element-%s-parser"
                                                         (car closest-cand))))))
                        (cbeg (org-element-property :contents-begin object))
-                       (cend (org-element-property :contents-end object)))
+                       (cend (org-element-property :contents-end object))
+                       (obj-end (org-element-property :end object)))
                   (cond
                    ;; ORIGIN is after OBJECT, so skip it.
-                   ((< (org-element-property :end object) origin)
-                    (goto-char (org-element-property :end object)))
-                   ;; ORIGIN is within a non-recursive object or at an
-                   ;; object boundaries: Return that object.
+                   ((<= obj-end origin)
+                    (if (/= obj-end end) (goto-char obj-end)
+                      (throw 'exit
+                             (org-element-put-property
+                              object :parent parent))))
+                   ;; ORIGIN is within a non-recursive object or at
+                   ;; an object boundaries: Return that object.
                    ((or (not cbeg) (> cbeg origin) (< cend origin))
                     (throw 'exit
                            (org-element-put-property object :parent parent)))
-                   ;; Otherwise, move within current object and restrict
-                   ;; search to the end of its contents.
+                   ;; Otherwise, move within current object and
+                   ;; restrict search to the end of its contents.
                    (t (goto-char cbeg)
                       (org-element-put-property object :parent parent)
                       (setq parent object

=== modified file 'lisp/org/org-latex.el'
--- a/lisp/org/org-latex.el     2012-10-26 14:42:05 +0000
+++ b/lisp/org/org-latex.el     2012-12-12 16:47:07 +0000
@@ -2291,14 +2291,13 @@
                    (concat type ":" raw-path))
                   ((equal type "file")
                    (if (and (org-file-image-p
-                             (expand-file-name
-                              raw-path)
+                             (expand-file-name (org-link-unescape raw-path))
                              org-export-latex-inline-image-extensions)
-                            (or (get-text-property 0 'org-no-description
-                                                   raw-path)
+                            (or (get-text-property 0 'org-no-description 
raw-path)
                                 (equal desc full-raw-path)))
                        (setq imgp t)
-                     (progn (when (string-match "\\(.+\\)::.+" raw-path)
+                     (progn (setq raw-path (org-link-unescape raw-path))
+                            (when (string-match "\\(.+\\)::.+" raw-path)
                               (setq raw-path (match-string 1 raw-path)))
                             (if (file-exists-p raw-path)
                                 (concat type "://" (expand-file-name raw-path))

=== modified file 'lisp/org/org-list.el'
--- a/lisp/org/org-list.el      2012-09-30 15:14:59 +0000
+++ b/lisp/org/org-list.el      2012-12-12 16:47:07 +0000
@@ -1230,7 +1230,9 @@
             ;; Are there blank lines inside the list so far?
             ((save-excursion
                (goto-char (org-list-get-top-point struct))
-               (org-list-search-forward
+               ;; Do not use `org-list-search-forward' so blank lines
+               ;; in blocks can be counted in.
+               (re-search-forward
                 "^[ \t]*$" (org-list-get-item-end-before-blank item struct) t))
              1)
             ;; Default choice: no blank line.

=== modified file 'lisp/org/org-remember.el'
--- a/lisp/org/org-remember.el  2012-10-26 14:42:05 +0000
+++ b/lisp/org/org-remember.el  2012-12-12 16:47:07 +0000
@@ -472,12 +472,12 @@
        (erase-buffer)
        (insert (substitute-command-keys
                 (format
-                 "## %s  \"%s\" -> \"* %s\"
-## C-u C-c C-c  like C-c C-c, and immediately visit note at target location
-## C-0 C-c C-c  \"%s\" -> \"* %s\"
-## %s  to select file and header location interactively.
-## C-2 C-c C-c  as child (C-3: as sibling) of the currently clocked item
-## To switch templates, use `\\[org-remember]'.  To abort use `C-c C-k'.\n\n"
+                 "# %s  \"%s\" -> \"* %s\"
+# C-u C-c C-c  like C-c C-c, and immediately visit note at target location
+# C-0 C-c C-c  \"%s\" -> \"* %s\"
+# %s  to select file and header location interactively.
+# C-2 C-c C-c  as child (C-3: as sibling) of the currently clocked item
+# To switch templates, use `\\[org-remember]'.  To abort use `C-c C-k'.\n\n"
                  (if org-remember-store-without-prompt "    C-c C-c" "    C-1 
C-c C-c")
                  (abbreviate-file-name (or file org-default-notes-file))
                  (or headline "")
@@ -840,12 +840,12 @@
       (if (= end beg) (setq beg (1- beg)))
       (put-text-property beg end 'org-position-cursor t)))
   (goto-char (point-min))
-  (while (looking-at "^[ \t]*\n\\|^##.*\n")
+  (while (looking-at "^[ \t]*\n\\|^# .*\n")
     (replace-match ""))
   (when org-remember-delete-empty-lines-at-end
     (goto-char (point-max))
     (beginning-of-line 1)
-    (while (and (looking-at "[ \t]*$\\|##.*") (> (point) 1))
+    (while (and (looking-at "[ \t]*$\\|[ \t]*# .*") (> (point) 1))
       (delete-region (1- (point)) (point-max))
       (beginning-of-line 1)))
   (catch 'quit

=== modified file 'lisp/org/org-src.el'
--- a/lisp/org/org-src.el       2012-10-26 14:42:05 +0000
+++ b/lisp/org/org-src.el       2012-12-12 16:47:07 +0000
@@ -215,11 +215,22 @@
     (setq org-edit-src-saved-temp-window-config 
(current-window-configuration)))
   (let* ((mark (and (org-region-active-p) (mark)))
         (case-fold-search t)
-        (info (org-edit-src-find-region-and-lang))
+        (info
+         ;; If the src region consists in no lines, we insert a blank
+         ;; line.
+         (let* ((temp (org-edit-src-find-region-and-lang))
+                (beg (nth 0 temp))
+                (end (nth 1 temp)))
+           (if (>= end beg) temp
+             (goto-char beg)
+             (insert "\n")
+             (org-edit-src-find-region-and-lang))))
         (full-info (org-babel-get-src-block-info 'light))
         (org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive
         (beg (make-marker))
-        (end (make-marker))
+        ;; Move marker with inserted text for case when src block is
+        ;; just one empty line, i.e. beg == end.
+        (end (copy-marker nil t))
         (allow-write-back-p (null code))
         block-nindent total-nindent ovl lang lang-f single lfmt buffer msg
         begline markline markcol line col transmitted-variables)
@@ -689,10 +700,9 @@
       (kill-buffer buffer))
     (goto-char beg)
     (when allow-write-back-p
-      (delete-region beg (max beg (1- end)))
-      (unless (string-match "^[ \t]*$" code)
-       (insert code)
-       (delete-char 1))
+      (delete-region beg (max beg end))
+      (unless (string-match "\\`[ \t]*\\'" code)
+       (insert code))
       (goto-char beg)
       (if single (just-one-space)))
     (if (memq t (mapcar (lambda (overlay)
@@ -820,6 +830,7 @@
 Alter code block according to effect of TAB in the language major
 mode."
   (and org-src-tab-acts-natively
+       (not (equal this-command 'org-shifttab))
        (let ((org-src-strip-leading-and-trailing-blank-lines nil))
         (org-babel-do-key-sequence-in-edit-buffer (kbd "TAB")))))
 

=== modified file 'lisp/org/org-table.el'
--- a/lisp/org/org-table.el     2012-10-26 14:42:05 +0000
+++ b/lisp/org/org-table.el     2012-12-12 16:47:07 +0000
@@ -1594,6 +1594,7 @@
   (interactive "P")
   (let* ((thisline (org-current-line))
         (thiscol (org-table-current-column))
+        (otc org-table-overlay-coordinates)
         beg end bcol ecol tend tbeg column lns pos)
     (when (equal thiscol 0)
       (if (org-called-interactively-p 'any)
@@ -1642,12 +1643,15 @@
                                  x))
                      (org-split-string (buffer-substring beg end) "\n")))
     (setq lns (org-do-sort lns "Table" with-case sorting-type))
+    (when org-table-overlay-coordinates
+      (org-table-toggle-coordinate-overlays))
     (delete-region beg end)
     (move-marker beg nil)
     (move-marker end nil)
     (insert (mapconcat 'cdr lns "\n") "\n")
     (org-goto-line thisline)
     (org-table-goto-column thiscol)
+    (when otc (org-table-toggle-coordinate-overlays))
     (message "%d lines sorted, based on column %d" (length lns) column)))
 
 ;;;###autoload

=== modified file 'lisp/org/org-timer.el'
--- a/lisp/org/org-timer.el     2012-10-26 14:42:05 +0000
+++ b/lisp/org/org-timer.el     2012-12-12 16:47:07 +0000
@@ -162,7 +162,8 @@
   (run-hooks 'org-timer-stop-hook)
   (setq org-timer-start-time nil
        org-timer-pause-time nil)
-  (org-timer-set-mode-line 'off))
+  (org-timer-set-mode-line 'off)
+  (message "Timer stopped"))
 
 ;;;###autoload
 (defun org-timer (&optional restart no-insert-p)

=== modified file 'lisp/org/org-version.el'
--- a/lisp/org/org-version.el   2012-10-26 15:27:29 +0000
+++ b/lisp/org/org-version.el   2012-12-12 16:47:07 +0000
@@ -11,7 +11,7 @@
 (defun org-git-version ()
   "The Git version of org-mode.
   Inserted by installing org-mode or when a release is made."
-   (let ((org-git-version "7.9.2+-GNU-Emacs-24-3"))
+   (let ((org-git-version "7.9.2+-GNU-Emacs-24-3 (commit 488eea)"))
      org-git-version))
 ;;;###autoload
 (defvar org-odt-data-dir "/usr/share/emacs/etc/org"

=== modified file 'lisp/org/org.el'
--- a/lisp/org/org.el   2012-10-26 14:42:05 +0000
+++ b/lisp/org/org.el   2012-12-12 16:47:07 +0000
@@ -2498,9 +2498,10 @@
   "Return the value of `org-log-into-drawer', but let properties overrule.
 If the current entry has or inherits a LOG_INTO_DRAWER property, it will be
 used instead of the default value."
-  (let ((p (org-entry-get nil "LOG_INTO_DRAWER" 'inherit)))
+  (let ((p (org-entry-get nil "LOG_INTO_DRAWER" 'inherit t)))
     (cond
-     ((or (not p) (equal p "nil")) org-log-into-drawer)
+     ((not p) org-log-into-drawer)
+     ((equal p "nil") nil)
      ((equal p "t") "LOGBOOK")
      (t p))))
 
@@ -8016,11 +8017,12 @@
 
 The command prompts for the sorting type unless it has been given to the
 function through the SORTING-TYPE argument, which needs to be a character,
-\(?n ?N ?a ?A ?t ?T ?s ?S ?d ?D ?p ?P ?r ?R ?f ?F).  Here is the
+\(?n ?N ?a ?A ?t ?T ?s ?S ?d ?D ?p ?P ?o ?O ?r ?R ?f ?F).  Here is the
 precise meaning of each character:
 
 n   Numerically, by converting the beginning of the entry/item to a number.
 a   Alphabetically, ignoring the TODO keyword and the priority, if any.
+o   By order of TODO keywords.
 t   By date/time, either the first active time stamp in the entry, or, if
     none exist, by the first inactive one.
 s   By the scheduled date/time.
@@ -8040,6 +8042,13 @@
 WITH-CASE, the sorting considers case as well."
   (interactive "P")
   (let ((case-func (if with-case 'identity 'downcase))
+       (cmstr
+        ;; The clock marker is lost when using `sort-subr', let's
+        ;; store the clocking string.
+        (when (equal (marker-buffer org-clock-marker) (current-buffer))
+          (save-excursion
+            (goto-char org-clock-marker)
+            (looking-back "^.*") (match-string-no-properties 0))))
         start beg end stars re re2
         txt what tmp)
     ;; Find beginning and end of region to sort
@@ -8096,7 +8105,7 @@
       (message
        "Sort %s: [a]lpha  [n]umeric  [p]riority  p[r]operty  todo[o]rder  
[f]unc
                [t]ime [s]cheduled  [d]eadline  [c]reated
-               A/N/T/S/D/C/P/O/F means reversed:"
+               A/N/P/R/O/F/T/S/D/C means reversed:"
        what)
       (setq sorting-type (read-char-exclusive))
 
@@ -8193,6 +8202,12 @@
           ((= dcst ?f) compare-func)
           ((member dcst '(?p ?t ?s ?d ?c)) '<)))))
     (run-hooks 'org-after-sorting-entries-or-items-hook)
+    ;; Reset the clock marker if needed
+    (when cmstr
+      (save-excursion
+       (goto-char start)
+       (search-forward cmstr nil t)
+       (move-marker org-clock-marker (point))))
     (message "Sorting entries...done")))
 
 (defun org-do-sort (table what &optional with-case sorting-type)
@@ -8204,7 +8219,7 @@
 If WITH-CASE is non-nil, the sorting will be case-sensitive."
   (unless sorting-type
     (message
-     "Sort %s: [a]lphabetic. [n]umeric. [t]ime.  A/N/T means reversed:"
+     "Sort %s: [a]lphabetic, [n]umeric, [t]ime.  A/N/T means reversed:"
      what)
     (setq sorting-type (read-char-exclusive)))
   (let ((dcst (downcase sorting-type))
@@ -9644,7 +9659,7 @@
           (not (org-in-regexp org-bracket-link-regexp)))
       (org-follow-timestamp-link))
      ((and (or (org-footnote-at-reference-p) (org-footnote-at-definition-p))
-          (not (org-in-regexp org-bracket-link-regexp)))
+          (not (org-in-regexp org-any-link-re)))
       (org-footnote-action))
      (t
       (let (type path link line search (pos (point)))
@@ -11219,7 +11234,7 @@
     "COLUMNS:" "PROPERTY:"
     "CAPTION:" "LABEL:"
     "SETUPFILE:"
-    "INCLUDE:"
+    "INCLUDE:" "INDEX:"
     "BIND:"
     "MACRO:"))
 
@@ -21270,7 +21285,7 @@
                     (car org-special-ctrl-a/e)
                   org-special-ctrl-a/e))
        refpos)
-    (if (org-bound-and-true-p line-move-visual)
+    (if (org-bound-and-true-p visual-line-mode)
        (beginning-of-visual-line 1)
       (beginning-of-line 1))
     (if (and arg (fboundp 'move-beginning-of-line))
@@ -21331,36 +21346,33 @@
   (interactive "P")
   (let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e)
                   org-special-ctrl-a/e))
-        (type (org-element-type
-               (save-excursion (beginning-of-line) (org-element-at-point)))))
-    (cond
-     ((or (not special) arg)
-      (call-interactively
-       (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line)))
-     ((memq type '(headline inlinetask))
-      (let ((pos (point)))
-        (beginning-of-line 1)
-        (if (looking-at (org-re ".*?\\(?:\\([ 
\t]*\\)\\(:[[:alnum:address@hidden:]+:\\)?[ \t]*\\)?$"))
-            (if (eq special t)
-                (if (or (< pos (match-beginning 1)) (= pos (match-end 0)))
-                    (goto-char (match-beginning 1))
-                  (goto-char (match-end 0)))
-              (if (or (< pos (match-end 0))
-                      (not (eq this-command last-command)))
-                  (goto-char (match-end 0))
-                (goto-char (match-beginning 1))))
-          (call-interactively
-           (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line)))))
-     ((memq type
-            '(center-block comment-block drawer dynamic-block example-block
-                           export-block item plain-list property-drawer
-                           quote-block special-block src-block verse-block))
-      ;; Never move past the ellipsis.
-      (or (eolp) (move-end-of-line 1))
-      (when (org-invisible-p2) (backward-char)))
-     (t
-      (call-interactively
-       (if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))))
+       (move-fun (cond ((org-bound-and-true-p visual-line-mode)
+                        'end-of-visual-line)
+                       ((fboundp 'move-end-of-line) 'move-end-of-line)
+                       (t 'end-of-line))))
+    (if (or (not special) arg) (call-interactively move-fun)
+      (let* ((element (save-excursion (beginning-of-line)
+                                     (org-element-at-point)))
+            (type (org-element-type element)))
+       (cond
+        ((memq type '(headline inlinetask))
+         (let ((pos (point)))
+           (beginning-of-line 1)
+           (if (looking-at (org-re ".*?\\(?:\\([ 
\t]*\\)\\(:[[:alnum:address@hidden:]+:\\)?[ \t]*\\)?$"))
+               (if (eq special t)
+                   (if (or (< pos (match-beginning 1)) (= pos (match-end 0)))
+                       (goto-char (match-beginning 1))
+                     (goto-char (match-end 0)))
+                 (if (or (< pos (match-end 0))
+                         (not (eq this-command last-command)))
+                     (goto-char (match-end 0))
+                   (goto-char (match-beginning 1))))
+             (call-interactively move-fun))))
+        ((org-element-property :hiddenp element)
+         ;; If element is hidden, `move-end-of-line' would put point
+         ;; after it.  Use `end-of-line' to stay on current line.
+         (call-interactively 'end-of-line))
+        (t (call-interactively move-fun)))))
     (org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t)))))
 
 (define-key org-mode-map "\C-a" 'org-beginning-of-line)
@@ -21400,7 +21412,7 @@
                (not (y-or-n-p "Kill hidden subtree along with headline? ")))
            (error "C-k aborted - would kill hidden subtree")))
     (call-interactively
-     (if (and (boundp 'visual-line-mode) visual-line-mode) 'kill-visual-line 
'kill-line)))
+     (if (org-bound-and-true-p visual-line-mode) 'kill-visual-line 
'kill-line)))
    ((looking-at (org-re ".*?\\S-\\([ 
\t]+\\(:[[:alnum:address@hidden:]+:\\)\\)[ \t]*$"))
     (kill-region (point) (match-beginning 1))
     (org-set-tags nil t))


reply via email to

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