1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-25 10:47:00 +00:00

Sync with Org git commit 374c56b.

This commit is contained in:
Bastien Guerry 2012-04-26 19:30:04 +02:00
parent 2a12997ca9
commit 2f885dcacb
15 changed files with 220 additions and 83 deletions

View File

@ -1,3 +1,8 @@
2012-04-26 Ippei Furuhashi <top.tuna+orgmode@gmail.com> (tiny change)
* org.texi (Agenda commands): Fix two typos: give corresponding
function names, according to `org-agenda-view-mode-dispatch'.
2012-04-21 Glenn Morris <rgm@gnu.org>
* faq.texi (Major packages and programs): Remove section.

View File

@ -1,3 +1,13 @@
2012-04-26 Jambunathan K <kjambunathan@gmail.com>
* org/README: Update Copyright year.
2012-04-26 Jambunathan K <kjambunathan@gmail.com>
* org/OrgOdtStyles.xml (OrgDescriptionList): Modify style. With
this change, in a description list, if the description paragraph
spawns multiple lines then it will correctly indented.
2012-04-20 Glenn Morris <rgm@gnu.org>
* CONTRIBUTE: Expand a bit on copyright assignments.

View File

@ -649,34 +649,34 @@
<!-- Description List -->
<text:list-style style:name="OrgDescriptionList">
<text:list-level-style-number text:level="1" style:num-format="">
<style:list-level-properties text:space-before="0.635cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="0.635cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="2" style:num-format="">
<style:list-level-properties text:space-before="1.27cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="1.27cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="3" style:num-format="">
<style:list-level-properties text:space-before="1.905cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="1.905cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="4" style:num-format="">
<style:list-level-properties text:space-before="2.54cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="2.54cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="5" style:num-format="">
<style:list-level-properties text:space-before="3.175cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="3.175cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="6" style:num-format="">
<style:list-level-properties text:space-before="3.81cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="3.81cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="7" style:num-format="">
<style:list-level-properties text:space-before="4.445cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="4.445cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="8" style:num-format="">
<style:list-level-properties text:space-before="5.08cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="5.08cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="9" style:num-format="">
<style:list-level-properties text:space-before="5.715cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="5.715cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="10" style:num-format="">
<style:list-level-properties text:space-before="6.35cm" text:min-label-width="0.635cm"/>
<style:list-level-properties text:space-before="6.35cm"/>
</text:list-level-style-number>
</text:list-style>

View File

@ -1,3 +1,72 @@
2012-04-26 Nicolas Goaziou <n.goaziou@gmail.com>
* org-table.el (org-table-number-fraction): Fix typo.
2012-04-26 Eric Schulte <eric.schulte@gmx.com>
* ob-python.el (org-babel-execute:python): Ensure newline precedes
automatically-added returns.
2012-04-26 Nicolas Goaziou <n.goaziou@gmail.com>
* org-mouse.el (org-mode-hook): Do not move point when clicking on
a footnote reference.
2012-04-26 Bastien Guerry <bzg@gnu.org>
* org-faces.el (org-date-selected): Fix docstring.
2012-04-26 Bastien Guerry <bzg@gnu.org>
* org-ctags.el (org-ctags-new-topic-template): Remove * character
in front of variable docstring.
2012-04-26 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-list-struct-indent): Follow
`org-list-demote-modify-bullet' specifications for ordered
bullets.
(org-list-indent-item-generic, org-indent-item-tree)
(org-outdent-item-tree): Fix bug when operating on a region.
(org-outdent-item, org-indent-item): Allow to operate on a region.
* org.el (org-shiftmetaleft, org-shiftmetaright): Allow to operate
on a region.
2012-04-26 Nicolas Goaziou <n.goaziou@gmail.com>
* org-footnote.el (org-footnote-normalize): Fix positionning in
HTML export without a footnote section.
2012-04-26 Madan Ramakrishnan <madanr79@gmail.com> (tiny change)
* org-agenda.el (org-agenda-bulk-mark): Truly make arg optional as
advertised by the function.
2012-04-26 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
* org.el (org-read-date-display): Fix bug when displaying the
overlay.
2012-04-26 Bastien Guerry <bzg@gnu.org>
* org.el (org-mode): Don't use `buffer-face-mode' by default.
2012-04-26 Bastien Guerry <bzg@gnu.org>
* org-faces.el (org-date-selected): New face.
2012-04-26 Jambunathan K <kjambunathan@gmail.com>
* org-odt.el (org-odt-format-org-link): Pay no heed to whether the
internal links destined for headlines provide a description or
not. In fact, the `org-store-link' and `org-insert-link' create
internal links which do have a description.
2012-04-26 Bastien Guerry <bzg@gnu.org>
* org-clock.el (org-program-exists): Fix docstring.
2012-04-11 Bastien Guerry <bzg@gnu.org>
* org.el (org-point-at-end-of-empty-headline): Only try to match

View File

@ -64,7 +64,7 @@ This function is called by `org-babel-execute-src-block'."
(preamble (cdr (assoc :preamble params)))
(full-body
(org-babel-expand-body:generic
(concat body (if return-val (format "return %s" return-val) ""))
(concat body (if return-val (format "\nreturn %s" return-val) ""))
params (org-babel-variable-assignments:python params)))
(result (org-babel-python-evaluate
session full-body result-type result-params preamble)))

View File

@ -8294,7 +8294,7 @@ This is a command that has to be installed in `calendar-mode-map'."
(defun org-agenda-bulk-mark (&optional arg)
"Mark the entry at point for future bulk action."
(interactive "p")
(dotimes (i (max arg 1))
(dotimes (i (or arg 1))
(unless (org-get-at-bol 'org-agenda-diary-link)
(let* ((m (org-get-at-bol 'org-hd-marker))
ov)

View File

@ -664,7 +664,7 @@ Use alsa's aplay tool if available."
(error (beep t) (beep t)))))))))
(defun org-program-exists (program-name)
"Checks whenever we can locate program and launch it."
"Checks whenever we can locate PROGRAM-NAME using the `which' executable."
(if (member system-type '(gnu/linux darwin))
(= 0 (call-process "which" nil nil nil program-name))))

View File

@ -188,7 +188,7 @@ See the ctags documentation for more information.")
Created as a local variable in each buffer.")
(defcustom org-ctags-new-topic-template
"* <<%t>>\n\n\n\n\n\n"
"<<%t>>\n\n\n\n\n\n"
"Text to insert when creating a new org file via opening a hyperlink.
The following patterns are replaced in the string:
`%t' - replaced with the capitalized title of the hyperlink"

View File

@ -285,6 +285,16 @@ column view defines special faces for each outline level. See the file
"Face for date/time stamps."
:group 'org-faces)
(defface org-date-selected
(org-compatible-face nil
'((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold nil))
(((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold nil))
(((class color) (min-colors 8) (background light)) (:foreground "red" :bold nil))
(((class color) (min-colors 8) (background dark)) (:foreground "red" :bold nil))
(t (:inverse-video t))))
"Face for highlighting the calendar day when using `org-read-date'."
:group 'org-faces)
(defface org-sexp-date
'((((class color) (background light)) (:foreground "Purple"))
(((class color) (background dark)) (:foreground "Cyan"))

View File

@ -727,7 +727,14 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
(unless (bolp) (newline)))
;; No footnote section set: Footnotes will be added at the end
;; of the section containing their first reference.
((eq major-mode 'org-mode))
;; Nevertheless, in an export situation, set insertion point to
;; `point-max' by default.
((eq major-mode 'org-mode)
(when export-props
(goto-char (point-max))
(skip-chars-backward " \r\t\n")
(forward-line)
(delete-region (point) (point-max))))
(t
;; Remove any left-over tag in the buffer, if one is set up.
(when org-footnote-tag-for-non-org-mode-files

View File

@ -1484,8 +1484,19 @@ bullets between START and END."
(change-bullet-maybe
(function
(lambda (item)
(let* ((bul (org-trim (org-list-get-bullet item struct)))
(new-bul-p (cdr (assoc bul org-list-demote-modify-bullet))))
(let ((new-bul-p
(cdr (assoc
;; Normalize ordered bullets.
(let ((bul (org-trim
(org-list-get-bullet item struct))))
(cond ((string-match "[A-Z]\\." bul) "A.")
((string-match "[A-Z])" bul) "A)")
((string-match "[a-z]\\." bul) "a.")
((string-match "[a-z])" bul) "a)")
((string-match "[0-9]\\." bul) "1.")
((string-match "[0-9])" bul) "1)")
(t bul)))
org-list-demote-modify-bullet))))
(when new-bul-p (org-list-set-bullet item struct new-bul-p))))))
(ind
(lambda (cell)
@ -2500,7 +2511,6 @@ STRUCT is the list structure.
Return t if successful."
(save-excursion
(beginning-of-line)
(let* ((regionp (org-region-active-p))
(rbeg (and regionp (region-beginning)))
(rend (and regionp (region-end)))
@ -2509,7 +2519,8 @@ Return t if successful."
(prevs (org-list-prevs-alist struct))
;; Are we going to move the whole list?
(specialp
(and (= top (point))
(and (not regionp)
(= top (point-at-bol))
(cdr (assq 'indent org-list-automatic-rules))
(if no-subtree
(error
@ -2523,12 +2534,12 @@ Return t if successful."
(progn
(set-marker org-last-indent-begin-marker rbeg)
(set-marker org-last-indent-end-marker rend))
(set-marker org-last-indent-begin-marker (point))
(set-marker org-last-indent-begin-marker (point-at-bol))
(set-marker org-last-indent-end-marker
(cond
(specialp (org-list-get-bottom-point struct))
(no-subtree (1+ (point)))
(t (org-list-get-item-end (point) struct))))))
(no-subtree (1+ (point-at-bol)))
(t (org-list-get-item-end (point-at-bol) struct))))))
(let* ((beg (marker-position org-last-indent-begin-marker))
(end (marker-position org-last-indent-end-marker)))
(cond
@ -2583,19 +2594,35 @@ Return t if successful."
"Outdent a local list item, but not its children.
If a region is active, all items inside will be moved."
(interactive)
(if (org-at-item-p)
(let ((struct (org-list-struct)))
(org-list-indent-item-generic -1 t struct))
(error "Not at an item")))
(let ((regionp (org-region-active-p)))
(cond
((or (org-at-item-p)
(and regionp
(save-excursion (goto-char (region-beginning))
(org-at-item-p))))
(let ((struct (if (not regionp) (org-list-struct)
(save-excursion (goto-char (region-beginning))
(org-list-struct)))))
(org-list-indent-item-generic -1 t struct)))
(regionp (error "Region not starting at an item"))
(t (error "Not at an item")))))
(defun org-indent-item ()
"Indent a local list item, but not its children.
If a region is active, all items inside will be moved."
(interactive)
(if (org-at-item-p)
(let ((struct (org-list-struct)))
(org-list-indent-item-generic 1 t struct))
(error "Not at an item")))
(let ((regionp (org-region-active-p)))
(cond
((or (org-at-item-p)
(and regionp
(save-excursion (goto-char (region-beginning))
(org-at-item-p))))
(let ((struct (if (not regionp) (org-list-struct)
(save-excursion (goto-char (region-beginning))
(org-list-struct)))))
(org-list-indent-item-generic 1 t struct)))
(regionp (error "Region not starting at an item"))
(t (error "Not at an item")))))
(defun org-outdent-item-tree ()
"Outdent a local list item including its children.
@ -2604,10 +2631,12 @@ If a region is active, all items inside will be moved."
(let ((regionp (org-region-active-p)))
(cond
((or (org-at-item-p)
(and (org-region-active-p)
(goto-char (region-beginning))
(org-at-item-p)))
(let ((struct (org-list-struct)))
(and regionp
(save-excursion (goto-char (region-beginning))
(org-at-item-p))))
(let ((struct (if (not regionp) (org-list-struct)
(save-excursion (goto-char (region-beginning))
(org-list-struct)))))
(org-list-indent-item-generic -1 nil struct)))
(regionp (error "Region not starting at an item"))
(t (error "Not at an item")))))
@ -2619,10 +2648,12 @@ If a region is active, all items inside will be moved."
(let ((regionp (org-region-active-p)))
(cond
((or (org-at-item-p)
(and (org-region-active-p)
(goto-char (region-beginning))
(org-at-item-p)))
(let ((struct (org-list-struct)))
(and regionp
(save-excursion (goto-char (region-beginning))
(org-at-item-p))))
(let ((struct (if (not regionp) (org-list-struct)
(save-excursion (goto-char (region-beginning))
(org-list-struct)))))
(org-list-indent-item-generic 1 nil struct)))
(regionp (error "Region not starting at an item"))
(t (error "Not at an item")))))

View File

@ -915,6 +915,7 @@ This means, between the beginning of line and the point."
((assq :checkbox context) (org-toggle-checkbox))
((assq :item-bullet context)
(let ((org-cycle-include-plain-lists t)) (org-cycle)))
((org-footnote-at-reference-p) nil)
(t ad-do-it))))))
(defun org-mouse-move-tree-start (event)

View File

@ -1689,7 +1689,6 @@ ATTR is a string of other attributes of the a element."
(or (not thefile) (string= thefile ""))
(plist-get org-lparse-opt-plist :section-numbers)
(setq sec-frag fragment)
(org-find-text-property-in-string 'org-no-description fragment)
(or (string-match "\\`sec\\(\\(-[0-9]+\\)+\\)" sec-frag)
(and (setq sec-frag
(loop for alias in org-export-target-aliases do

View File

@ -135,8 +135,8 @@ Other options offered by the customize interface are more restrictive."
(defcustom org-table-number-fraction 0.5
"Fraction of numbers in a column required to make the column align right.
In a column all non-white fields are considered. If at least this
fraction of fields is matched by `org-table-number-fraction',
In a column all non-white fields are considered. If at least
this fraction of fields is matched by `org-table-number-regexp',
alignment to the right border applies."
:group 'org-table-settings
:type 'number)

View File

@ -5057,8 +5057,7 @@ The following commands are available:
'org-parse-arguments)
(set (make-local-variable 'pcomplete-termination-string) "")
(when (>= emacs-major-version 23)
(set (make-local-variable 'buffer-face-mode-face) 'org-default)
(buffer-face-mode))
(set (make-local-variable 'buffer-face-mode-face) 'org-default))
;; If empty file that did not turn on org-mode automatically, make it to.
(if (and org-insert-mode-line-in-empty-file
@ -14915,7 +14914,7 @@ So these are more for recording a certain time/date."
(org-time-stamp arg 'inactive))
(defvar org-date-ovl (make-overlay 1 1))
(overlay-put org-date-ovl 'face 'org-warning)
(overlay-put org-date-ovl 'face 'org-date-selected)
(org-detach-overlay org-date-ovl)
(defvar org-ans1) ; dynamically scoped parameter
@ -15131,13 +15130,13 @@ user."
(when org-read-date-display-live
(when org-read-date-overlay
(delete-overlay org-read-date-overlay))
(let ((p (point)))
(when (minibufferp (current-buffer))
(save-excursion
(end-of-line 1)
(while (not (equal (buffer-substring
(max (point-min) (- (point) 4)) (point))
" "))
(insert " "))
(goto-char p))
(insert " ")))
(let* ((ans (concat (buffer-substring (point-at-bol) (point-max))
" " (or org-ans1 org-ans2)))
(org-end-time-was-given nil)
@ -15159,7 +15158,7 @@ user."
(setq txt (concat txt " (=>F)")))
(setq org-read-date-overlay
(make-overlay (1- (point-at-eol)) (point-at-eol)))
(org-overlay-display org-read-date-overlay txt 'secondary-selection))))
(org-overlay-display org-read-date-overlay txt 'secondary-selection)))))
(defun org-read-date-analyze (ans org-def org-defdecode)
"Analyze the combined answer of the date prompt."
@ -17969,28 +17968,34 @@ See the individual commands for more information."
(defun org-shiftmetaleft ()
"Promote subtree or delete table column.
Calls `org-promote-subtree', `org-outdent-item',
or `org-table-delete-column', depending on context.
See the individual commands for more information."
Calls `org-promote-subtree', `org-outdent-item-tree', or
`org-table-delete-column', depending on context. See the
individual commands for more information."
(interactive)
(cond
((run-hook-with-args-until-success 'org-shiftmetaleft-hook))
((org-at-table-p) (call-interactively 'org-table-delete-column))
((org-at-heading-p) (call-interactively 'org-promote-subtree))
((org-at-item-p) (call-interactively 'org-outdent-item-tree))
((if (not (org-region-active-p)) (org-at-item-p)
(save-excursion (goto-char (region-beginning))
(org-at-item-p)))
(call-interactively 'org-outdent-item-tree))
(t (org-modifier-cursor-error))))
(defun org-shiftmetaright ()
"Demote subtree or insert table column.
Calls `org-demote-subtree', `org-indent-item',
or `org-table-insert-column', depending on context.
See the individual commands for more information."
Calls `org-demote-subtree', `org-indent-item-tree', or
`org-table-insert-column', depending on context. See the
individual commands for more information."
(interactive)
(cond
((run-hook-with-args-until-success 'org-shiftmetaright-hook))
((org-at-table-p) (call-interactively 'org-table-insert-column))
((org-at-heading-p) (call-interactively 'org-demote-subtree))
((org-at-item-p) (call-interactively 'org-indent-item-tree))
((if (not (org-region-active-p)) (org-at-item-p)
(save-excursion (goto-char (region-beginning))
(org-at-item-p)))
(call-interactively 'org-indent-item-tree))
(t (org-modifier-cursor-error))))
(defun org-shiftmetaup (&optional arg)