Commit 8c8b834f authored by Bastien Guerry's avatar Bastien Guerry
Browse files

Merge Org 7.8.10 -- important bug fixes since Org 7.8.09.

parent 4f32cc6c
2012-05-16 Bastien Guerry <>
* org.texi (Durations and time values): Fix typo.
2012-05-12 Andreas Schwab <>
* cc-mode.texi: Avoid space before macro in 4th argument of cross
......@@ -4,8 +4,8 @@
@setfilename ../../info/org
@settitle The Org Manual
@set VERSION 7.8.09
@set DATE April 2012
@set VERSION 7.8.10
@set DATE May 2012
@c Use proper quote and backtick for code sections in PDF output
@c Cf. Texinfo manual 14.2
......@@ -2625,7 +2625,7 @@ formulas or Elisp formulas:
Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds
are optional. With the @code{T} flag, computed durations will be displayed
as @code{[HH:MM:SS} (see the first formula above). With the @code{t} flag,
as @code{HH:MM:SS} (see the first formula above). With the @code{t} flag,
computed durations will be displayed according to the value of the variable
@code{org-table-duration-custom-format}, which defaults to @code{'hours} and
will display the result as a fraction of hours (see the second formula in the
......@@ -7900,9 +7900,9 @@ Interactively select another agenda view and append it to the current view.
Delete other windows.
@orgcmdkskc{v d,d,org-agenda-day-view}
@xorgcmdkskc{v w,w,org-agenda-day-view}
@xorgcmdkskc{v w,w,org-agenda-week-view}
@xorgcmd{v m,org-agenda-month-view}
@xorgcmd{v y,org-agenda-month-year}
@xorgcmd{v y,org-agenda-year-view}
@xorgcmd{v SPC,org-agenda-reset-view}
@vindex org-agenda-span
Switch to day/week/month/year view. When switching to day or week view, this
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
% Reference Card for Org Mode
\def\versionyear{2012} % latest update
\def\year{2012} % latest copyright year
2012-05-16 Bastien Guerry <>
* org.el (org-scan-tags): Correctly match TODO keywords.
2012-05-16 Nicolas Goaziou <>
* org-list.el (org-list-struct): Fix white spaces.
(org-list-swap-items, org-list-send-item): Fix visibility
2012-05-16 Nicolas Goaziou <>
* org-list.el (org-list-swap-items, org-list-send-item): Preserve
visibility when moving items.
2012-05-16 Mark E. Shoulson <> (tiny change)
* org.el (org-fontify-entities): Hide {} when prettifying
2012-05-16 Bastien Guerry <>
* org.el (org-cycle-internal-global): Prevent the display of
messages when cycling from with a Gnus article buffer.
2012-05-16 Bastien Guerry <>
* org-table.el (org-table-time-seconds-to-string): Fix bug about
handling a negative duration value.
2012-05-16 Nicolas Goaziou <>
* org.el (org-link-expand-abbrev): Fix docstring.
2012-05-16 Nicolas Goaziou <>
* org.el (org-translate-link): Fix bug.
2012-05-16 Bastien Guerry <>
* org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug when
setting the number of marked entries.
2012-05-16 Bastien Guerry <>
* org-table.el (org-tbl-calc-modes): Rename from
(org-set-calc-mode, org-table-eval-formula): Use it.
2012-05-16 Eric Schulte <>
* ob.el (org-babel-find-named-result): Fix bug finding empty named
2012-05-16 Nicolas Goaziou <>
* org.el (org-set-regexps-and-options): Fix
`org-planning-or-clock-line-re' regexp. Indeed "\\>" will never
match since time keywords must end with colons, which are not word
2012-05-16 Bastien Guerry <>
* org-ctags.el (org-ctags-new-topic-template): Fix the option
default value back again.
2012-05-16 Eric Schulte <>
* org-bibtex.el (org-bibtex-export-to-kill-ring): Don't rely on
kill-new to return a string.
2012-05-16 Eric Schulte <>
* org-bibtex.el (org-bibtex-headline): Remove call to
bibtex-reformat which often hangs.
2012-04-26 Nicolas Goaziou <>
* org-table.el (org-table-number-fraction): Fix typo.
......@@ -1498,7 +1498,7 @@ buffer or nil if no such result exists."
(catch 'is-a-code-block
(when (re-search-forward
(concat org-babel-result-regexp
"[ \t]" (regexp-quote name) "[ \t\n\f\v\r]+") nil t)
"[ \t]" (regexp-quote name) "[ \t]*[\n\f\v\r]") nil t)
(when (and (string= "name" (downcase (match-string 1)))
(or (beginning-of-line 1)
(looking-at org-babel-src-block-regexp)
......@@ -8315,13 +8315,13 @@ This is a command that has to be installed in `calendar-mode-map'."
(defun org-agenda-bulk-mark-regexp (regexp)
"Mark entries match REGEXP."
(interactive "sMark entries matching regexp: ")
(let (entries-marked)
(let ((entries-marked 0))
(goto-char (point-min))
(goto-char (next-single-property-change (point) 'txt))
(while (re-search-forward regexp nil t)
(when (string-match regexp (get-text-property (point) 'txt))
(setq entries-marked (+ entries-marked 1))
(setq entries-marked (1+ entries-marked))
(call-interactively 'org-agenda-bulk-mark))))
(if (not entries-marked)
(message "No entry matching this regexp."))))
......@@ -369,7 +369,7 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
(progn (goto-char (match-end 1)) (insert ", "))
(bibtex-make-field "keywords" t t))
(insert (mapconcat #'identity tags ", ")))
(bibtex-reformat) (buffer-string)))))))
(defun org-bibtex-ask (field)
(unless (assoc field org-bibtex-fields)
......@@ -661,7 +661,8 @@ This uses `bibtex-parse-entry'."
(defun org-bibtex-export-to-kill-ring ()
"Export current headline to kill ring as bibtex entry."
(kill-new (org-bibtex-headline)))
(let ((result (org-bibtex-headline)))
(kill-new result) result))
(defun org-bibtex-search (string)
"Search for bibliographical entries in agenda files.
......@@ -1071,8 +1071,10 @@ It determines the number of whitespaces to append by looking at
(defun org-list-swap-items (beg-A beg-B struct)
"Swap item starting at BEG-A with item starting at BEG-B in STRUCT.
Blank lines at the end of items are left in place. Return the
new structure after the changes.
Blank lines at the end of items are left in place. Item
visibility is preserved. Return the new structure after the
Assume BEG-A is lesser than BEG-B and that BEG-A and BEG-B belong
to the same sub-list.
......@@ -1089,7 +1091,17 @@ This function modifies STRUCT."
(body-B (buffer-substring beg-B end-B-no-blank))
(between-A-no-blank-and-B (buffer-substring end-A-no-blank beg-B))
(sub-A (cons beg-A (org-list-get-subtree beg-A struct)))
(sub-B (cons beg-B (org-list-get-subtree beg-B struct))))
(sub-B (cons beg-B (org-list-get-subtree beg-B struct)))
;; Store overlays responsible for visibility status. We
;; also need to store their boundaries as they will be
;; removed from buffer.
(overlays (cons
(mapcar (lambda (ov)
(list ov (overlay-start ov) (overlay-end ov)))
(overlays-in beg-A end-A))
(mapcar (lambda (ov)
(list ov (overlay-start ov) (overlay-end ov)))
(overlays-in beg-B end-B)))))
;; 1. Move effectively items in buffer.
(goto-char beg-A)
(delete-region beg-A end-B-no-blank)
......@@ -1122,7 +1134,22 @@ This function modifies STRUCT."
(setcar e (+ pos (- size-B size-A)))
(setcar (nthcdr 6 e) (+ end-e (- size-B size-A))))))))
(sort struct (lambda (e1 e2) (< (car e1) (car e2)))))))
(setq struct (sort struct (lambda (e1 e2) (< (car e1) (car e2)))))
;; Restore visibility status, by moving overlays to their new
;; position.
(mapc (lambda (ov)
(car ov)
(+ (nth 1 ov) (- (+ beg-B (- size-B size-A)) beg-A))
(+ (nth 2 ov) (- (+ beg-B (- size-B size-A)) beg-A))))
(car overlays))
(mapc (lambda (ov)
(move-overlay (car ov)
(+ (nth 1 ov) (- beg-A beg-B))
(+ (nth 2 ov) (- beg-A beg-B))))
(cdr overlays))
;; Return structure.
(defun org-list-separating-blank-lines-number (pos struct prevs)
"Return number of blank lines that should separate items in list.
......@@ -1340,8 +1367,8 @@ If DEST is a buffer position, the function will assume it points
to another item in the same list as ITEM, and will move the
latter just before the former.
If DEST is `begin' \(respectively `end'\), ITEM will be moved at
the beginning \(respectively end\) of the list it belongs to.
If DEST is `begin' (respectively `end'), ITEM will be moved at
the beginning (respectively end) of the list it belongs to.
If DEST is a string like \"N\", where N is an integer, ITEM will
be moved at the Nth position in the list.
......@@ -1351,6 +1378,8 @@ added to the kill-ring.
If DEST is `delete', ITEM will be deleted.
Visibility of item is preserved.
This function returns, destructively, the new list structure."
(let* ((prevs (org-list-prevs-alist struct))
(item-end (org-list-get-item-end item struct))
......@@ -1393,7 +1422,9 @@ This function returns, destructively, the new list structure."
(org-list-get-last-item item struct prevs))
(t dest)))
(org-M-RET-may-split-line nil))
(org-M-RET-may-split-line nil)
;; Store visibility.
(visibility (overlays-in item item-end)))
((eq dest 'delete) (org-list-delete-item item struct))
((eq dest 'kill)
......@@ -1429,9 +1460,14 @@ This function returns, destructively, the new list structure."
(+ end shift)))))))
(lambda (e1 e2) (< (car e1) (car e2))))))
;; 2. Eventually delete extra copy of the item and clean marker.
(org-list-delete-item (marker-position item) struct)
;; 2. Restore visibility.
(mapc (lambda (ov)
(move-overlay ov
(+ (overlay-start ov) (- (point) item))
(+ (overlay-end ov) (- (point) item))))
;; 3. Eventually delete extra copy of the item and clean marker.
(prog1 (org-list-delete-item (marker-position item) struct)
(move-marker item nil)))
(t struct))))
......@@ -225,7 +225,7 @@ Consider using the interactive functions `org-protocol-create' and
:type 'alist)
(defcustom org-protocol-protocol-alist nil
"* Register custom handlers for org-protocol.
"Register custom handlers for org-protocol.
Each element of this list must be of the form:
......@@ -2368,7 +2368,7 @@ of the new mark."
(looking-at org-table-auto-recalculate-regexp))
(org-table-recalculate) t))
(defvar org-table-modes)
(defvar org-tbl-calc-modes) ;; Dynamically bound in `org-table-eval-formula'
(defsubst org-set-calc-mode (var &optional value)
(if (stringp var)
(setq var (assoc var '(("D" calc-angle-mode deg)
......@@ -2376,10 +2376,10 @@ of the new mark."
("F" calc-prefer-frac t)
("S" calc-symbolic-mode t)))
value (nth 2 var) var (nth 1 var)))
(if (memq var org-table-modes)
(setcar (cdr (memq var org-table-modes)) value)
(cons var (cons value org-table-modes)))
(if (memq var org-tbl-calc-modes)
(setcar (cdr (memq var org-tbl-calc-modes)) value)
(cons var (cons value org-tbl-calc-modes)))
(defun org-table-eval-formula (&optional arg equation
suppress-align suppress-const
......@@ -2437,7 +2437,7 @@ not overwrite the stored one."
(org-table-get-formula equation (equal arg '(4)))))
(n0 (org-table-current-column))
(modes (copy-sequence org-calc-default-modes))
(org-tbl-calc-modes (copy-sequence org-calc-default-modes))
(numbers nil) ; was a variable, now fixed default
(keep-empty nil)
n form form0 formrpl formrg bw fmt x ev orig c lispp literal
......@@ -2453,8 +2453,9 @@ not overwrite the stored one."
(setq c (string-to-char (match-string 1 fmt))
n (string-to-number (match-string 2 fmt)))
(if (= c ?p)
(setq modes (org-set-calc-mode 'calc-internal-prec n))
(setq modes (org-set-calc-mode
(setq org-tbl-calc-modes (org-set-calc-mode 'calc-internal-prec n))
(setq org-tbl-calc-modes
(list (cdr (assoc c '((?n . float) (?f . fix)
(?s . sci) (?e . eng))))
......@@ -2479,7 +2480,7 @@ not overwrite the stored one."
(setq keep-empty t
fmt (replace-match "" t t fmt)))
(while (string-match "[DRFS]" fmt)
(setq modes (org-set-calc-mode (match-string 0 fmt)))
(setq org-tbl-calc-modes (org-set-calc-mode (match-string 0 fmt)))
(setq fmt (replace-match "" t t fmt)))
(unless (string-match "\\S-" fmt)
(setq fmt nil))))
......@@ -2588,7 +2589,7 @@ not overwrite the stored one."
duration-output-format) ev))
(or (fboundp 'calc-eval)
(error "Calc does not seem to be installed, and is needed to evaluate the formula"))
(setq ev (calc-eval (cons form modes) (if numbers 'num))
(setq ev (calc-eval (cons form org-tbl-calc-modes) (if numbers 'num))
ev (if duration (org-table-time-seconds-to-string
(string-to-number ev)
duration-output-format) ev)))
......@@ -3309,15 +3310,18 @@ If S is a string representing a number, keep this number."
"Convert a number of seconds to a time string.
If OUTPUT-FORMAT is non-nil, return a number of days, hours,
minutes or seconds."
(let* ((secs0 (abs secs))
(cond ((eq output-format 'days)
(format "%.3f" (/ (float secs) 86400)))
(format "%.3f" (/ (float secs0) 86400)))
((eq output-format 'hours)
(format "%.2f" (/ (float secs) 3600)))
(format "%.2f" (/ (float secs0) 3600)))
((eq output-format 'minutes)
(format "%.1f" (/ (float secs) 60)))
(format "%.1f" (/ (float secs0) 60)))
((eq output-format 'seconds)
(format "%d" secs))
(t (org-format-seconds "%.2h:%.2m:%.2s" secs))))
(format "%d" secs0))
(t (org-format-seconds "%.2h:%.2m:%.2s" secs0)))))
(if (< secs 0) (concat "-" res) res)))
(defun org-table-fedit-convert-buffer (function)
"Convert all references in this buffer, using FUNCTION."
......@@ -6,7 +6,7 @@
;; Maintainer: Bastien Guerry <bzg at gnu dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage:
;; Version: 7.8.09
;; Version: 7.8.10
;; This file is part of GNU Emacs.
......@@ -206,7 +206,7 @@ identifier."
;;; Version
(defconst org-version "7.8.09"
(defconst org-version "7.8.10"
"The version number of the file org.el.")
......@@ -4789,10 +4789,11 @@ but the stars and the body are.")
"\\|" org-clock-string "\\)\\)?"
" *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?[]>]\\|<%%([^\r\n>]*>\\)")
(concat "\\(?:^[ \t]*\\(" org-scheduled-string
"\\|" org-deadline-string
"\\|" org-closed-string "\\|" org-clock-string
(concat "^[ \t]*\\("
org-scheduled-string "\\|"
org-deadline-string "\\|"
org-closed-string "\\|"
org-clock-string "\\)")
(mapcar (lambda (w) (substring w 0 -1))
(list org-scheduled-string org-deadline-string
......@@ -5916,16 +5917,19 @@ needs to be inserted at a specific position in the font-lock sequence.")
(when org-pretty-entities
(catch 'match
(while (re-search-forward
limit t)
(if (and (not (org-in-indented-comment-line))
(setq ee (org-entity-get (match-string 1)))
(= (length (nth 6 ee)) 1))
((end (if (equal (match-string 2) "{}")
(match-end 2)
(match-end 1))))
(match-beginning 0) (match-end 1)
(match-beginning 0) end
(list 'font-lock-fontified t))
(compose-region (match-beginning 0) (match-end 1)
(compose-region (match-beginning 0) end
(nth 6 ee) nil)
(backward-char 1)
(throw 'match t))))
......@@ -6255,15 +6259,17 @@ in special contexts.
(defun org-cycle-internal-global ()
"Do the global cycling action."
;; Hack to avoid display of messages for .org attachments in Gnus
(let ((ga (string-match "\\*fontification" (buffer-name))))
((and (eq last-command this-command)
(eq org-cycle-global-status 'overview))
;; We just created the overview - now do table of contents
;; This can be slow in very large buffers, so indicate action
(run-hook-with-args 'org-pre-cycle-hook 'contents)
(message "CONTENTS...")
(unless ga (message "CONTENTS..."))
(message "CONTENTS...done")
(unless ga (message "CONTENTS...done"))
(setq org-cycle-global-status 'contents)
(run-hook-with-args 'org-cycle-hook 'contents))
......@@ -6272,7 +6278,7 @@ in special contexts.
;; We just showed the table of contents - now show everything
(run-hook-with-args 'org-pre-cycle-hook 'all)
(message "SHOW ALL")
(unless ga (message "SHOW ALL"))
(setq org-cycle-global-status 'all)
(run-hook-with-args 'org-cycle-hook 'all))
......@@ -6280,9 +6286,9 @@ in special contexts.
;; Default action: go to overview
(run-hook-with-args 'org-pre-cycle-hook 'overview)
(message "OVERVIEW")
(unless ga (message "OVERVIEW"))
(setq org-cycle-global-status 'overview)
(run-hook-with-args 'org-cycle-hook 'overview))))
(run-hook-with-args 'org-cycle-hook 'overview)))))
(defun org-cycle-internal-local ()
"Do the local cycling action."
......@@ -8574,7 +8580,7 @@ call CMD."
;;; Link abbreviations
(defun org-link-expand-abbrev (link)
"Apply replacements as defined in `org-link-abbrev-alist."
"Apply replacements as defined in `org-link-abbrev-alist'."
(if (string-match "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link)
(let* ((key (match-string 1 link))
(as (or (assoc key org-link-abbrev-alist-local)
......@@ -9432,7 +9438,7 @@ If the link is in hidden text, expose it."
(string-match "\\([a-zA-Z0-9]+\\):\\(.*\\)" s))
(setq s (funcall org-link-translation-function
(match-string 1) (match-string 2)))
(match-string 1 s) (match-string 2 s)))
(concat (car s) ":" (cdr s)))
......@@ -12823,7 +12829,9 @@ headlines matching this string."
" *\\(\\<\\("
(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
"\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
(if todo-only
"\\>\\)\\)[ \t]+\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"
"\\>\\)\\)? *\\([^ ].*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))))
(props (list 'face 'default
'done-face 'org-agenda-done
'undone-face 'default
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment