* lisp/org-list.el (org-alphabetical-lists): new variable
(org-item-re, org-list-full-item, org-cycle-list-bullet,
org-list-struct-fix-bul, org-list-inc-bullet-maybe): reflect
introduction of the new variable.
(org-item-beginning-re): changed into a function, so any modification
of `org-alphabetical-lists' will not require reloading Org.
(org-at-item-p, org-toggle-checkbox, org-update-checkbox-count,
org-list-parse-list, org-list-send-list): reflect changes to
`org-item-beginning-re'.
(org-list-use-alpha-bul-p): new function.
* lisp/org.el (org-check-for-hidden): reflect changes to
`org-item-beginning-re'.
* lisp/org-capture.el (org-capture-place-item): reflect changes to
`org-item-beginning-re'.
* lisp/org-docbook.el (org-export-docbook-list-line): handle new type
of items.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): reflect changes to
`org-item-beginning-re'.
* lisp/org-html.el (org-html-export-list-line): handle new type of
items.
* lisp/org-latex.el (org-export-latex-lists): handle new type of items
and reflect changes to `org-item-beginning-re'.
* lisp/org-ascii.el (org-export-ascii-preprocess): handle new counters.
Modified from a patch by Nathaniel Flath.
* lisp/org-list.el (org-list-end-re): removed function and made it a
variable. There's no need for the overhead of calling the function
every at every line in a list. User will have to reload Org if he
change value of either `org-list-end-regexp' or
`org-empty-line-terminates-plain-lists'.
(org-in-item-p,org-list-struct,org-list-parse-list): apply change.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): apply change
* lisp/org-latex.el (org-export-latex-lists): apply change. Also
prevent items with org-example property to be considered as real
items.
* lisp/org-exp.el (org-export-preprocess-string): mark list endings
before babel blocks preprocessing starts, so blank lines that may be
inserted do not break list's structure. Then, mark list with special
properties required by exporters. Thus output from babel can easily
be included in lists.
(org-export-mark-list-end): new function
(org-export-mark-list-properties): new function
(org-export-mark-lists): removed function. It was split into the two
preceding functions.
* lisp/org-list.el (org-list-forbidden-blocks): variable renamed from
org-list-blocks.
(org-list-export-context): new variable
* list/org-exp.el (org-export-mark-lists): use new variable.
* list/org-latex.el (org-export-latex-lists): use new variable
* lisp/org-exp.el (org-export-mark-lists): new function, replacing
org-export-mark-list-ending. It adds information as text properties
to every list, before changes done by exporter destruct them.
* lisp/org-html.el (org-export-as-html): delegate list handling to
external function org-html-export-list-line.
(org-html-export-list-line): new function.
* lisp/org-latex.el (org-export-latex-lists): small modification.
* lisp/org.el (org-skip-over-state-notes,org-store-log-note): use new
accessors.
* list/ob.el (org-babel-result-end): use new accessors.
* list/org-exp.el (org-export-mark-list-ending): use new accessors.
* org-exp.el (org-export-preprocess-string): Set the source
buffer and use `org-clone-local-variables' to get local
variables from it.
* org.el (org-clone-local-variables): New function.
* lisp/org-exp.el (org-export-format-source-code-or-example):
Allow empty string as second element in minted/listings options
Both
(setq org-export-latex-minted-options
'(("frame" "lines")
("fontsize" "\\scriptsize")
("linenos" "")))
and
(setq org-export-latex-minted-options
'(("frame" "lines")
("fontsize" "\\scriptsize")
("linenos")))
will result in latex like
\begin{minted}[frame=lines,fontsize=\scriptsize,linenos]{common-lisp}
Three new user-customizable variables:
org-export-latex-listings-options (default nil)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Association list of options for the latex listings package.
These options are supplied as a comma-separated list to the
\\lstset command. Each element of the association list should be
a list containing two strings: the name of the option, and the
value. For example,
(setq org-export-latex-listings-options
'((\"basicstyle\" \"\\small\")
(\"keywordstyle\" \"\\color{black}\\bfseries\\underbar\")))
will typeset the code in a small size font with underlined, bold
black keywords.
Note that the same options will be applied to blocks of all
languages.
See ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf
customization group: org-export-latex
org-export-latex-minted-options (default nil)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Association list of options for the latex minted package.
These options are supplied within square brackets in
\\begin{minted} environments. Each element of the alist should be
a list containing two strings: the name of the option, and the
value. For example,
(setq org-export-latex-minted-options
'((\"bgcolor\" \"bg\") (\"frame\" \"lines\")))
will result in src blocks being exported with
\\begin{minted}[bgcolor=bg,frame=lines]{<LANG>}
as the start of the minted environment. Note that the same
options will be applied to blocks of all languages."
customization group: org-export-latex
See minted.googlecode.com/files/minted.pdf
org-export-latex-custom-lang-environments (default nil)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Association list mapping languages to language-specific latex
environments used during export of src blocks by the listings
and minted latex packages. For example,
(setq org-export-latex-custom-lang-environments
'((python \"pythoncode\")))
* lisp/org-exp.el (org-export-format-source-code-or-example):
Support new user-customizable options
(org-export-latex-custom-lang-environments): Ensure new variable is defined
(org-export-latex-listings-options): Ensure new variable is defined
(org-export-latex-minted-options): Ensure new variable is defined
* lisp/org-latex.el (org-export-latex-listings-options): New variable
(org-export-latex-minted-options): New variable
(org-export-latex-custom-lang-environments): New variable
* org-exp.el (org-export-add-options-to-plist): Require match to start
at a word-boundary.
Previously, if an option was the suffix of another option (such as TeX
and LaTeX) the setting for the former would propagator to the latter.
This seems like an unintended consequence of a lax regexp in
org-export-add-options-to-plist. This patch allows options to share a
suffix with another option by requiring that the match against an
option starts at a word-boundary.
* org-exp.el (org-export-initial-scope): new custom variable.
(org-export): Use this new variable. If there is an active
region, tell it when prompting the user for an export command.
Also change the way the function handles selection of buffer
and subtree export.
----
Now `1' switches between subtree/buffer export until the user
select an export command. Also, when there is an active region,
modify the message so that the user is aware he will only export
the surrounding subtree.
* org-html.el (org-export-html-auto-preamble)
(org-export-html-auto-postamble): Remove.
(org-export-html-preamble, org-export-html-postamble): Turn
into custom variables. Update the docstrings.
(org-export-html-preamble-format)
(org-export-html-postamble-format): New custom variables.
(org-export-as-html): Use org-export-html-postamble-format and
org-export-html-preamble-format.
(org-export-html-title-format): delete.
* org-exp.el (org-export-plist-vars): Remove
:auto-preamble and :auto-postamble. Rename :preamble and
:postamble to :html-preamble and :html-postamble.
* org-publish.el (org-publish-project-alist): Remove
:auto-preamble and :auto-postamble. Rename :preamble and
:postamble to :html-preamble and :html-postamble.
* org.texi (Publishing options): replace :preamble and
:auto-preamble by :html-preamble (same for postamble.)
Following on from Stephen's recent post, a
thing-that-slightly-bothers-me is the way the export dispatcher window
doesn't go away until export is complete. I've briefly looked at the
code twice now and it wasn't obvious to me why the save-window-excursion
(line 941 org-exp.el) wasn't already doing what I wanted. However, the
change below seems to have the effect I wanted. While this particular
solution may be a hack, I wonder whether people would prefer its
behaviour? E.g. try exporting this:
#+title: title
#+begin_src sh :exports results
sleep 5 && echo hello
#+end_src
export can often take several seconds and it's nice to be able to zone
out looking at your org document rather than the dispatcher window.
Modified lisp/org-exp.el
(I see that (sit-for .0001) is used in a couple of places in Org for
this effect, so maybe that should be used instead.)
Dan
* org-exp.el (org-export-target-internal-links): Locally turn
on `org-link-search-must-match-exact-headline' to match exact
internal links.
Thanks to Jambunathan K for spotting this.
* org-exp.el (org-export-with-LaTeX-fragments): Fix docstring so that
\\[ a = b \\] is not interpreted as a keybinding by
`substitute-command-keys'.
In a docstring \\[text] is used to indicate that text should be
interpreted by `substitute-command-keys'. To avoid this
interpretation, we need to prefix it with \\=.
I just found a left over in org-list.el. :)
Updated patch attached.
>From bf6c65a42e04d4753c58795442a479685bb5f318 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Wed, 26 Jan 2011 11:14:11 +0100
Subject: [PATCH] org: remove org-invisible-p
* org.el: Remove org-invisible-p: outline-invisible-p is
available in Emacs 22 and in recent XEmacs 21. Replace in
various files.
Signed-off-by: Julien Danjou <julien@danjou.info>
Hi Carsten,
On Sat, Jan 8, 2011 at 11:35 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> Hi Puneeth,
>
> can cou please augment the patch with a propert ChangeLog-like entry, and
> with documentation for the manual, and then resubmit?
Here is a patch with a ChangeLog entry and documentation for the
manual. Please tell me if it looks OK. Also, I hope using
git-format-patch is the right way to send this page. If not, what is
the right way?
Thanks,
Puneeth
>From 4a9be5b1a7a19c5d092ed14a86d29ad83122e9a8 Mon Sep 17 00:00:00 2001
From: Puneeth Chaganti <punchagan@gmail.com>
Date: Sun, 9 Jan 2011 00:48:51 +0530
Subject: [PATCH] Include only specified range of line numbers of a file
* doc/org.texi (Include files): Document :lines.
* lisp/org-exp.el (org-export-handle-include-files): Support :lines
property.
(org-get-file-contents): New argument lines to include specify a range
of lines to include.
On Fri, Jan 7, 2011 at 1:29 PM, Puneeth <punchagan@gmail.com> wrote:
> On Fri, Jan 7, 2011 at 10:03 AM, Venkatesh Choppella
> <venkatesh.choppella@iiit.ac.in> wrote:
>> I would like to include a part of a file (between a given range of
>> line numbers) instead of the whole file. Is there a way to do that
>> in org-mode?
>
> It isn't possible to include files using line numbers, as of now.
> Here's a quick patch that would add this feature. I have tested it
> with small files and works fine. Can somebody tell me if it looks
> good?
>
> :lines "5-10" will include the lines from 5 to 10, 10 excluded.
> :lines "-10" will include the lines from 1 to 10, 10 excluded.
> :lines "5-" will include the lines from 1 to the end of the file.
>
> HTH,
> Puneeth
* lisp/org-exp.el (org-export-mark-list-ending): insert additional
newline characters if end-list-marker is at a wrong position.
This solves a problem arising when exporting a region to HTML with a
list ending at the end of region. The marker would then be inserted on
the last line, following text from the list.
* doc/org.texi (Include files): Document :minlevel.
* lisp/org-exp.el (org-export-handle-include-files): Support :minlevel
property.
(org-get-file-contents): New argument minlevel to demote included
content.
On Sat, Nov 13, 2010 at 1:12 AM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
> On Nov 10, 2010, at 3:46 AM, Jianshi Huang wrote:
>
>> Hi,
>>
>> I know I can include any file using #+INCLUDE.
>>
>> I need to include several org files, but they were edited
>> independently as a complete document.
>>
>> Now I want to lower the levels of headers in these org files
>> automatically during inclusion. Is there a way to do that?
>
> No. But since #+include accepts arguments, it could be implemented,
> something like
>
> #+include "aaa.org" :minlevel 4
>
> or so. I would accept a good patch to this effect.
Here's a patch. I tested it with a simple document and works fine.
Thanks,
Puneeth
* lisp/org.el (org-shorten-string): New function.
* lisp/org-exp.el (org-export-convert-protected-spaces): New function.
(org-export-preprocess-string): Call
`org-export-convert-protected-spaces' to handle new hard spaces.
* lisp/org-clock.el (org-clocktable): New customization group.
(org-clocktable-defaults): New option.
(org-clock-clocktable-formatter): New option.
(org-clock-clocktable-default-properties): New option.
(org-dblock-write:clocktable): Rewrite to split out functionality
into separate functions.
(org-clocktable-write-default):
(org-clocktable-indent-string):
(org-clock-get-table-data): New functions.
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-redo):
(org-agenda-clockreport-mode):
(org-agenda-set-mode-name): Rewrite to implement filtered clock tables.
* doc/org.texi (Clocking commands):
(The clock table): New sections.
(Agenda commands): Document filtered clock reports.
* lisp/org-exp.el (org-export-format-source-code-or-example): Use
minted for latex source code export if `org-export-latex-listings' has
the value 'minted
* lisp/org-latex.el (org-export-latex-listings): Document special
value 'minted
* lisp/org-latex.el (org-export-latex-minted): Delete variable
The attached patch adds a new functions org-export-string.
,----
| org-export-string is a Lisp function in `org-exp.el'.
|
| (org-export-string STRING FMT &optional DIR)
|
| Export STRING to FMT using existing export facilities.
| During export STRING is saved to a temporary file whose location
| could vary. Optional argument DIR can be used to force the
| directory in which the temporary file is created during export
| which can be useful for resolving relative paths. Dir defaults
| to the value of `temporary-file-directory'.
`----
This function should be useful in user code, and can already reduce the
amount of code in ob-org.el and org-mime.el.
>From e51017e4d7051aad31384a470f0a695dca0d6716 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Sun, 17 Oct 2010 15:17:13 -0600
Subject: [PATCH] org-export-string -- exports a string of org-mode markup text
* lisp/org-exp.el (org-export-string): new function org-export-string
can be used to convert a string of test in org-mode markup to a
specified format
* contrib/lisp/org-mime.el (org-mime-htmlize): now using new
org-export-string function for exportation
* lisp/ob-org.el (org-babel-execute:org): now using new
org-export-string function for exportation
* doc/org.texi: Document the <c> cookie.
* lisp/org-exp.el (org-store-forced-table-alignment):
(org-export-remove-special-table-lines): Allow the "c" cookie for
table alignment.
* lisp/org-html.el (org-export-table-header-tags):
(org-export-table-data-tags): Add another %s format for the alignment.
(org-export-html-table-align-individual-fields): New option.
(org-format-org-table-html): Implement field-by-field alignment and
support centering.
(org-format-table-table-html): Make sure the new table tag formats
don't break this function.
* lisp/org-table.el (org-table-cookie-line-p):
(org-table-align): Allow for the <c> cookie.
* lisp/org.el (org-set-font-lock-defaults): Allow for the <c> cookie.
* org-exp.el (org-export-format-source-code-or-example): latex
formatting of source code blocks using the minted package
(org-export-plist-vars): Add :latex-minted property
(org-export-latex-minted): Ensure variable is defined
(org-export-latex-minted-langs): Ensure variable is defined
* org-latex.el (org-export-latex-minted): new variable
(org-export-latex-minted-langs): new variable
(org-export-latex-minted-with-line-numbers): new variable
(org-export-latex-minted):
* lisp/org-exp.el (org-export-language-setup): Fix Polish entries.
Hello.
There is no such named entity as ś. If you want to be 7bit clean
then use ś (or decimal ś).