Merge branch 'master' of git://repo.or.cz/org-mode
This commit is contained in:
commit
3f9be0bb15
|
@ -98,8 +98,10 @@ return nil."
|
||||||
(let ((case-fold-search t)
|
(let ((case-fold-search t)
|
||||||
type args new-refere new-referent result lob-info split-file split-ref
|
type args new-refere new-referent result lob-info split-file split-ref
|
||||||
index index-row index-col)
|
index index-row index-col)
|
||||||
;; if ref is indexed grab the indices
|
;; if ref is indexed grab the indices -- beware nested indicies
|
||||||
(when (string-match "\\[\\(.+\\)\\]" ref)
|
(when (and (string-match "\\[\\(.+\\)\\]" ref)
|
||||||
|
(let ((str (substring ref 0 (match-beginning 0))))
|
||||||
|
(= (count ?( str) (count ?) str))))
|
||||||
(setq index (match-string 1 ref))
|
(setq index (match-string 1 ref))
|
||||||
(setq ref (substring ref 0 (match-beginning 0))))
|
(setq ref (substring ref 0 (match-beginning 0))))
|
||||||
;; assign any arguments to pass to source block
|
;; assign any arguments to pass to source block
|
||||||
|
|
|
@ -1,3 +1,27 @@
|
||||||
|
2010-04-25 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org.el (org-mode): Make table mapping quiet.
|
||||||
|
(org-table-map-tables): New optional argument QUIETLY.
|
||||||
|
|
||||||
|
* org-ascii.el (org-export-ascii-preprocess): Make table
|
||||||
|
mapping quiet.
|
||||||
|
|
||||||
|
* org-html.el (org-export-as-html, org-html-level-start): Change
|
||||||
|
XHTML IDs to not use dots.
|
||||||
|
|
||||||
|
* org-exp.el (org-export-define-heading-targets): Change
|
||||||
|
XHTML IDs to not use dots.
|
||||||
|
|
||||||
|
* org-docbook.el (org-export-docbook-level-start): Change
|
||||||
|
XHTML IDs to not use dots.
|
||||||
|
|
||||||
|
* org-latex.el (org-export-as-latex): Make sure that the
|
||||||
|
result buffer is in latex-mode.
|
||||||
|
|
||||||
|
* org.el (org-shiftup-final-hook, org-shiftdown-final-hook)
|
||||||
|
(org-shiftleft-final-hook, org-shiftright-final-hook): New
|
||||||
|
hooks.
|
||||||
|
|
||||||
2010-04-24 Carsten Dominik <carsten.dominik@gmail.com>
|
2010-04-24 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org-table.el (org-table-justify-field-maybe): Make sure that
|
* org-table.el (org-table-justify-field-maybe): Make sure that
|
||||||
|
|
|
@ -550,9 +550,8 @@ publishing directory."
|
||||||
(org-ascii-replace-entities)
|
(org-ascii-replace-entities)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(org-table-map-tables
|
(org-table-map-tables
|
||||||
(lambda ()
|
(lambda () (org-if-unprotected (org-table-align)))
|
||||||
(org-if-unprotected
|
'quietly)))
|
||||||
(org-table-align))))))
|
|
||||||
;; Put quotes around verbatim text
|
;; Put quotes around verbatim text
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward org-verbatim-re nil t)
|
(while (re-search-forward org-verbatim-re nil t)
|
||||||
|
|
|
@ -1228,7 +1228,8 @@ When TITLE is nil, just close all open levels."
|
||||||
(setq section-number (org-section-number level))
|
(setq section-number (org-section-number level))
|
||||||
(insert (format "\n<section xml:id=\"%s%s\">\n<title>%s</title>"
|
(insert (format "\n<section xml:id=\"%s%s\">\n<title>%s</title>"
|
||||||
org-export-docbook-section-id-prefix
|
org-export-docbook-section-id-prefix
|
||||||
section-number title))
|
(replace-regexp-in-string "\\." "_" section-number)
|
||||||
|
title))
|
||||||
(org-export-docbook-open-para))))
|
(org-export-docbook-open-para))))
|
||||||
|
|
||||||
(defun org-docbook-expand (string)
|
(defun org-docbook-expand (string)
|
||||||
|
|
|
@ -1239,7 +1239,9 @@ Also find all ID and CUSTOM_ID propertiess and store them."
|
||||||
(save-excursion (goto-char (point-at-bol))
|
(save-excursion (goto-char (point-at-bol))
|
||||||
(org-outline-level))))
|
(org-outline-level))))
|
||||||
(setq target (org-solidify-link-text
|
(setq target (org-solidify-link-text
|
||||||
(format "sec-%s" (org-section-number level))))
|
(format "sec-%s" (replace-regexp-in-string
|
||||||
|
"\\." "_"
|
||||||
|
(org-section-number level)))))
|
||||||
(setq last-section-target target)
|
(setq last-section-target target)
|
||||||
(push (cons target target) target-alist)
|
(push (cons target target) target-alist)
|
||||||
(add-text-properties
|
(add-text-properties
|
||||||
|
|
|
@ -871,7 +871,9 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
t t line)))
|
t t line)))
|
||||||
(while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt)
|
(while (string-match "<\\(<\\)+\\|>\\(>\\)+" txt)
|
||||||
(setq txt (replace-match "" t t txt)))
|
(setq txt (replace-match "" t t txt)))
|
||||||
(setq href (format "sec-%s" snumber))
|
(setq href
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\." "_" (format "sec-%s" snumber)))
|
||||||
(setq href (or (cdr (assoc href org-export-preferred-target-alist)) href))
|
(setq href (or (cdr (assoc href org-export-preferred-target-alist)) href))
|
||||||
(push
|
(push
|
||||||
(format
|
(format
|
||||||
|
@ -2027,7 +2029,7 @@ When TITLE is nil, just close all open levels."
|
||||||
(cdr (assoc target org-export-preferred-target-alist))))
|
(cdr (assoc target org-export-preferred-target-alist))))
|
||||||
(remove (or preferred target))
|
(remove (or preferred target))
|
||||||
(l org-level-max)
|
(l org-level-max)
|
||||||
snumber href suffix)
|
snumber snu href suffix)
|
||||||
(setq extra-targets (remove remove extra-targets))
|
(setq extra-targets (remove remove extra-targets))
|
||||||
(setq extra-targets
|
(setq extra-targets
|
||||||
(mapconcat (lambda (x)
|
(mapconcat (lambda (x)
|
||||||
|
@ -2076,7 +2078,8 @@ When TITLE is nil, just close all open levels."
|
||||||
extra-targets title "<br/>\n")
|
extra-targets title "<br/>\n")
|
||||||
(insert "<ul>\n<li>" title "<br/>\n"))))
|
(insert "<ul>\n<li>" title "<br/>\n"))))
|
||||||
(aset org-levels-open (1- level) t)
|
(aset org-levels-open (1- level) t)
|
||||||
(setq snumber (org-section-number level))
|
(setq snumber (org-section-number level)
|
||||||
|
snu (replace-regexp-in-string "\\." "_" snumber))
|
||||||
(setq level (+ level org-export-html-toplevel-hlevel -1))
|
(setq level (+ level org-export-html-toplevel-hlevel -1))
|
||||||
(if (and org-export-with-section-numbers (not body-only))
|
(if (and org-export-with-section-numbers (not body-only))
|
||||||
(setq title (concat
|
(setq title (concat
|
||||||
|
@ -2084,9 +2087,9 @@ When TITLE is nil, just close all open levels."
|
||||||
level snumber)
|
level snumber)
|
||||||
" " title)))
|
" " title)))
|
||||||
(unless (= head-count 1) (insert "\n</div>\n"))
|
(unless (= head-count 1) (insert "\n</div>\n"))
|
||||||
(setq href (cdr (assoc (concat "sec-" snumber) org-export-preferred-target-alist)))
|
(setq href (cdr (assoc (concat "sec-" snu) org-export-preferred-target-alist)))
|
||||||
(setq suffix (or href snumber))
|
(setq suffix (or href snu))
|
||||||
(setq href (or href (concat "sec-" snumber)))
|
(setq href (or href (concat "sec-" snu)))
|
||||||
(insert (format "\n<div id=\"outline-container-%s\" class=\"outline-%d%s\">\n<h%d id=\"%s\">%s%s</h%d>\n<div class=\"outline-text-%d\" id=\"text-%s\">\n"
|
(insert (format "\n<div id=\"outline-container-%s\" class=\"outline-%d%s\">\n<h%d id=\"%s\">%s%s</h%d>\n<div class=\"outline-text-%d\" id=\"text-%s\">\n"
|
||||||
suffix level (if extra-class (concat " " extra-class) "")
|
suffix level (if extra-class (concat " " extra-class) "")
|
||||||
level href
|
level href
|
||||||
|
|
|
@ -793,7 +793,9 @@ when PUB-DIR is set, use this as the publishing directory."
|
||||||
(replace-match "\n")))
|
(replace-match "\n")))
|
||||||
|
|
||||||
(run-hooks 'org-export-latex-final-hook)
|
(run-hooks 'org-export-latex-final-hook)
|
||||||
(or to-buffer (save-buffer))
|
(if to-buffer
|
||||||
|
(unless (eq major-mode 'latex-mode) (latex-mode))
|
||||||
|
(save-buffer))
|
||||||
(org-export-latex-fix-inputenc)
|
(org-export-latex-fix-inputenc)
|
||||||
(run-hooks 'org-export-latex-after-save-hook)
|
(run-hooks 'org-export-latex-after-save-hook)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
29
lisp/org.el
29
lisp/org.el
|
@ -3402,21 +3402,22 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables."
|
||||||
|
|
||||||
(defvar org-table-clean-did-remove-column nil)
|
(defvar org-table-clean-did-remove-column nil)
|
||||||
|
|
||||||
(defun org-table-map-tables (function)
|
(defun org-table-map-tables (function &optional quietly)
|
||||||
"Apply FUNCTION to the start of all tables in the buffer."
|
"Apply FUNCTION to the start of all tables in the buffer."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(save-restriction
|
(save-restriction
|
||||||
(widen)
|
(widen)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward org-table-any-line-regexp nil t)
|
(while (re-search-forward org-table-any-line-regexp nil t)
|
||||||
(message "Mapping tables: %d%%" (/ (* 100.0 (point)) (buffer-size)))
|
(unless quietly
|
||||||
|
(message "Mapping tables: %d%%" (/ (* 100.0 (point)) (buffer-size))))
|
||||||
(beginning-of-line 1)
|
(beginning-of-line 1)
|
||||||
(when (looking-at org-table-line-regexp)
|
(when (looking-at org-table-line-regexp)
|
||||||
(save-excursion (funcall function))
|
(save-excursion (funcall function))
|
||||||
(or (looking-at org-table-line-regexp)
|
(or (looking-at org-table-line-regexp)
|
||||||
(forward-char 1)))
|
(forward-char 1)))
|
||||||
(re-search-forward org-table-any-border-regexp nil 1))))
|
(re-search-forward org-table-any-border-regexp nil 1))))
|
||||||
(message "Mapping tables: done"))
|
(unless quietly (message "Mapping tables: done")))
|
||||||
|
|
||||||
;; Declare and autoload functions from org-exp.el & Co
|
;; Declare and autoload functions from org-exp.el & Co
|
||||||
|
|
||||||
|
@ -4456,7 +4457,7 @@ The following commands are available:
|
||||||
(unless org-inhibit-startup
|
(unless org-inhibit-startup
|
||||||
(when org-startup-align-all-tables
|
(when org-startup-align-all-tables
|
||||||
(let ((bmp (buffer-modified-p)))
|
(let ((bmp (buffer-modified-p)))
|
||||||
(org-table-map-tables 'org-table-align)
|
(org-table-map-tables 'org-table-align 'quietly)
|
||||||
(set-buffer-modified-p bmp)))
|
(set-buffer-modified-p bmp)))
|
||||||
(when org-startup-indented
|
(when org-startup-indented
|
||||||
(require 'org-indent)
|
(require 'org-indent)
|
||||||
|
@ -15933,15 +15934,31 @@ See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
(defvar org-shiftup-hook nil
|
(defvar org-shiftup-hook nil
|
||||||
"Hook for functions attaching themselves to `S-up'.
|
"Hook for functions attaching themselves to `S-up'.
|
||||||
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
|
(defvar org-shiftup-final-hook nil
|
||||||
|
"Hook for functions attaching themselves to `S-up'.
|
||||||
|
This one runs after all other options except shift-select have been excluded.
|
||||||
|
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
(defvar org-shiftdown-hook nil
|
(defvar org-shiftdown-hook nil
|
||||||
"Hook for functions attaching themselves to `S-down'.
|
"Hook for functions attaching themselves to `S-down'.
|
||||||
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
|
(defvar org-shiftdown-final-hook nil
|
||||||
|
"Hook for functions attaching themselves to `S-down'.
|
||||||
|
This one runs after all other options except shift-select have been excluded.
|
||||||
|
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
(defvar org-shiftleft-hook nil
|
(defvar org-shiftleft-hook nil
|
||||||
"Hook for functions attaching themselves to `S-left'.
|
"Hook for functions attaching themselves to `S-left'.
|
||||||
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
|
(defvar org-shiftleft-final-hook nil
|
||||||
|
"Hook for functions attaching themselves to `S-left'.
|
||||||
|
This one runs after all other options except shift-select have been excluded.
|
||||||
|
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
(defvar org-shiftright-hook nil
|
(defvar org-shiftright-hook nil
|
||||||
"Hook for functions attaching themselves to `S-right'.
|
"Hook for functions attaching themselves to `S-right'.
|
||||||
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
|
(defvar org-shiftright-final-hook nil
|
||||||
|
"Hook for functions attaching themselves to `S-right'.
|
||||||
|
This one runs after all other options except shift-select have been excluded.
|
||||||
|
See `org-ctrl-c-ctrl-c-hook' for more information.")
|
||||||
|
|
||||||
(defun org-modifier-cursor-error ()
|
(defun org-modifier-cursor-error ()
|
||||||
"Throw an error, a modified cursor command was applied in wrong context."
|
"Throw an error, a modified cursor command was applied in wrong context."
|
||||||
|
@ -16151,6 +16168,7 @@ depending on context. See the individual commands for more information."
|
||||||
((and (not org-support-shift-select) (org-at-item-p))
|
((and (not org-support-shift-select) (org-at-item-p))
|
||||||
(call-interactively 'org-previous-item))
|
(call-interactively 'org-previous-item))
|
||||||
((org-clocktable-try-shift 'up arg))
|
((org-clocktable-try-shift 'up arg))
|
||||||
|
((run-hook-with-args-until-success 'org-shiftup-final-hook))
|
||||||
(org-support-shift-select
|
(org-support-shift-select
|
||||||
(org-call-for-shift-select 'previous-line))
|
(org-call-for-shift-select 'previous-line))
|
||||||
(t (org-shiftselect-error))))
|
(t (org-shiftselect-error))))
|
||||||
|
@ -16174,6 +16192,7 @@ depending on context. See the individual commands for more information."
|
||||||
((and (not org-support-shift-select) (org-at-item-p))
|
((and (not org-support-shift-select) (org-at-item-p))
|
||||||
(call-interactively 'org-next-item))
|
(call-interactively 'org-next-item))
|
||||||
((org-clocktable-try-shift 'down arg))
|
((org-clocktable-try-shift 'down arg))
|
||||||
|
((run-hook-with-args-until-success 'org-shiftdown-final-hook))
|
||||||
(org-support-shift-select
|
(org-support-shift-select
|
||||||
(org-call-for-shift-select 'next-line))
|
(org-call-for-shift-select 'next-line))
|
||||||
(t (org-shiftselect-error))))
|
(t (org-shiftselect-error))))
|
||||||
|
@ -16209,6 +16228,7 @@ Depending on context, this does one of the following:
|
||||||
(org-at-property-p))
|
(org-at-property-p))
|
||||||
(call-interactively 'org-property-next-allowed-value))
|
(call-interactively 'org-property-next-allowed-value))
|
||||||
((org-clocktable-try-shift 'right arg))
|
((org-clocktable-try-shift 'right arg))
|
||||||
|
((run-hook-with-args-until-success 'org-shiftright-final-hook))
|
||||||
(org-support-shift-select
|
(org-support-shift-select
|
||||||
(org-call-for-shift-select 'forward-char))
|
(org-call-for-shift-select 'forward-char))
|
||||||
(t (org-shiftselect-error))))
|
(t (org-shiftselect-error))))
|
||||||
|
@ -16244,6 +16264,7 @@ Depending on context, this does one of the following:
|
||||||
(org-at-property-p))
|
(org-at-property-p))
|
||||||
(call-interactively 'org-property-previous-allowed-value))
|
(call-interactively 'org-property-previous-allowed-value))
|
||||||
((org-clocktable-try-shift 'left arg))
|
((org-clocktable-try-shift 'left arg))
|
||||||
|
((run-hook-with-args-until-success 'org-shiftleft-final-hook))
|
||||||
(org-support-shift-select
|
(org-support-shift-select
|
||||||
(org-call-for-shift-select 'backward-char))
|
(org-call-for-shift-select 'backward-char))
|
||||||
(t (org-shiftselect-error))))
|
(t (org-shiftselect-error))))
|
||||||
|
|
Loading…
Reference in New Issue