* org-exp.el (org-export-get-title-from-subtree): Don't format tags in
title if title headline does not have tags.
Fixes a bug reported by John Hendy in
<CA+M2ft_UnBVfUbmoUX6J2MY7e_9w+7an5n23rAarpnnQnaV=ZA@mail.gmail.com>.
* lisp/ob.el (org-babel-strip-protective-commas): Use
`org-strip-protective-commas'.
* lisp/org-exp.el (org-export-select-backend-specific-text): Use
`org-strip-protective-commas'.
* lisp/org-src.el (org-edit-src-code): Use
`org-strip-protective-commas'.
* lisp/org.el (org-strip-protective-commas): Single definition for
this functionality.
* org-exp.el (org-export-get-title-from-subtree): Don't format tags in
title if title headline does not have tags.
Fixes a bug reported by John Hendy in
<CA+M2ft_UnBVfUbmoUX6J2MY7e_9w+7an5n23rAarpnnQnaV=ZA@mail.gmail.com>.
* lisp/org-exp.el (org-export-select-backend-specific-text): Always
preserve original indentation as a text property so that lists do
not get broken by indentation at column 0.
Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.
Also define two aliases.
* org-exp.el (org-export-date-timestamp-format): New option to
define the way a timestamp in #+DATE will be exported.
(org-infile-export-plist): Use the new option.
Thanks to Torsten Wagner for this idea.
* org-exp.el (org-export-normalize-links): Mark bracket links before
normalization to avoid erroneous normalization of bracket link parts.
This fixes a bug reported by M. Bauer at
<http://thread.gmane.org/gmane.emacs.orgmode/49756> and allows proper
normalization of bracket links with a link in the query part, e.g.
[[http://example.tld?q=http://example.tld][Example]]
* lisp/org-exp.el (org-export-res/src-name-cleanup): Remove #+name and
#+results lines during preprocess.
Now Babel doesn't handle anymore those keywords cleanup (as #+name may
be used for other thing than code evaluation), that task is moved to
org-export.el. See commit 25a0a02121.
* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
regexp. Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
regexp. Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp. Also
use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text. Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.
This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
* lisp/org-exp.el (org-store-forced-table-alignment): Parse
the column cookie for both alignment and width specification.
Store the resulting value in `org-col-cookies' property.
Retire the previously used `org-forced-aligns' property for
consistency. Renamed local variable `aligns' to `cookies'.
* lisp/org-html.el (org-format-org-table-html): Use
`org-col-cookies'. Renamed local variable forced-aligns to
col-cookies.
This is a preparatory patch. A backend can look at the colwidth
specification and (at it's discretion) use it to control relative
sizes of individual columns in a table. At this moment, it is unclear
whether the widths used to control the display of table in Org buffer
can be overloaded to also control the formatting of table in a
backend.
Refer following discussion with Matt Price:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01053.html
> I would like to submit 2 more patches - one to the manual and other to
> org-exp.el.
I am attaching the promised patch to org-exp.el. Can someone review and
commit this change?
Please note that I have withheld the changes to org-odt & co which make
use of this change.
ps: The patch to org.texi will follow soon - maybe in a day or two.
>From 39ab2a263336ba077c7cd6627a3203c55c5bddba Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Tue, 4 Oct 2011 23:32:35 +0530
Subject: [PATCH] org-exp.el: Enhance `org-export-number-lines' to support odt export
* lisp/org-exp.el (org-export-number-lines): Modified. Add a
new parameter `preprocess' and use this for backend-agnostic
handling of literal examples.
This parameter is currently exercised only by the odt exporter. Hint:
See future commits.
* org-mode/lisp/org-exp.el (org-export-number-lines):
Check whether number parameter (this is a numbered block!) is
non-nil as well as whether cont is nil (this numbered block should
*not* continue numbering where we left off before!) before resetting
the count to zero.
From the docs:
If you use a `+n' switch, the numbering from the previous
numbered snippet will be continued in the current one.
With this change I believe the code complies with the docs.
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
* org-exp.el (org-infile-export-plist): Handle recursively
included setup files. The value of the last included file
always takes precedence over previous values.
Thanks to Stefan Vollmar for signaling this bug.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): don't remove the ending regexp
when it consists in blank lines.
* lisp/org-list.el (org-list-parse-list): ditto, but remove it
completely when it isn't made of blank lines (i.e. during export process).
Use `org-outline-regexp' instead or `outline-regexp'. Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.
* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.
* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.
* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.
* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.
* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.
* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.
* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.
* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* lisp/org-exp.el (org-export-preprocess-string): add the possibility
to call recursively the function. Also change order of some function
calls. Comment export process for footnotes.
* lisp/org-footnote.el (org-footnote-normalize): change the export
specific parameter to hold properties of export. Thus, the function
can send every footnote definition in the buffer through
`org-export-process-string'.
`org-export-export-preprocess-string' was a dummy copy of
`org-export-preprocess-string', adapted for specific needs
of org-mw-export. We now use `org-export-preprocess-string'
directly. This requires a minor change in this latter function:
if :for-backend is not explicitely passed, then the let binding
of `org-export-current-backend' falls back on the previous value
of org-export-current-backend'.
* lisp/org-exp.el (org-export-preprocess-string): if the last subtree
is a task, footnotes may be removed along with the subtree. This
patch ensures footnotes are put at the end of the buffer after the
subtree has been removed.