* org-list.el (org-list-parse-list): rewrite of function to allow text
following a sub-list in the same item. See docstring for an example
of output.
(org-list-to-generic): use new parsing function.
(org-list-to-latex,org-list-to-html): minor change for clearer export.
* org-list.el (org-list-has-child-p): renamed from org-list-get-child.
Returning first child is only useful as a predicate, as we're
allowing an item to have more than one sub-list.
(org-list-indent-item-generic): use `org-list-has-child-p' instead of
org-list-get-child.
(org-in-item-p): also return item beginning when list starts at
context beginning.
(org-list-get-parent): use of `org-list-struct-parent-alist' helper
function is not optional anymore.
(org-list-get-all-items): shorten code with the help of cl.el.
(org-list-get-children): now returns all children of item, even if
they do not belong to the same list. Renamed from
org-list-get-all-children.
(org-list-get-list-begin): function wasn't return value when item was
already the first item of the list at point.
(org-list-get-list-end): function wasn't return value when item was
already the last item of the list at point.
(org-list-struct-fix-box,org-update-checkbox-count): now uses
`org-list-get-children'.
* org.el (org-indent-line-function): Indentation of item's body starts
just after the bullet, not after a checkbox. Moreover, As
`org-in-item-p' also returns item beginning position when point is
in a list, do not compute it a second time.
* org.el (org-ctrl-c-ctrl-c): when called at a list item, replace
usage `org-repair-list', forcing another reading of the list, with
only needed subroutines.
* org-list.el (org-list-separating-blank-lines-number): use new
accessors.
(org-list-insert-item-generic): use list structures to insert a new
item.
(org-list-exchange-items): refactor and comment code. Now return new
struct instead of modifying it, as list sorting would sometimes eat
first item.
(org-move-item-down,org-move-item-up): reflect changes to
`org-list-exchange-items'.
(org-insert-item): as `org-in-item-p' also computes item beginning
when applicable, reuse the result.
* org-timer.el (org-timer-item): as `org-in-item-p' also computes item
beginning when applicable, reuse the result.
* lisp/org-list.el (org-list-in-item-p): unify methods for this predicate.
(org-list-in-item-p-with-indent): removed function
(org-list-ending-between): removed function
(org-list-maybe-skip-block): removed function
(org-list-in-item-p-with-regexp): removed function
(org-list-top-point-with-regexp): removed function
(org-list-top-point-with-indent): removed function
(org-list-bottom-point-with-indent): removed function
(org-list-bottom-point-with-regexp): removed function
(org-list-get-item-same-level): removed function
(org-list-top-point): removed function
(org-list-bottom-point): removed function
(org-get-item-beginning): renamed to org-list-get-item-begin to be
consistent with naming policy of non-interactive functions.
(org-get-beginning-of-list): removed function
(org-beginning-of-item-list): use new accessors
(org-get-end-of-list): removed function
(org-end-of-list): use new accessors
(org-get-end-of-item): removed function
(org-end-of-item): use new accessors
(org-get-previous-item): removed function
(org-previous-item): use new accessors
(org-get-next-item): removed function
(org-next-item): use new accessors
(org-end-of-item-before-blank): renamed to
(org-list-get-item-end-before-blank): Use new accessors.
* org-list.el (org-list-repair): removed optional argument
FORCE-BULLET. The job of this interactive function is to completely
fix a list at point. Changing bullets is a separate task. Also
removed others optional arguments TOP and BOTTOM to follow the new
structures.
(org-list-indent-item-generic): remove need for TOP and BOTTOM. STRUCT
is a new required argument. This avoids computing a list structure
many times when function is called more than once in a row, for
example in org-cycle-item-indentation. Use new accessors. Now, also
call `org-update-checkbox-count-maybe'.
(org-outdent-item,org-indent-item,org-outdent-item-tree,org-indent-item-tree):
remove need for TOP and BOTTOM.
(org-list-insert-item-generic): reflect changes to `org-list-repair'.
(org-list-exchange-items): use new accessors. Now modify struct to
avoid re-reading it later.
(org-move-item-down): reflect changes to `org-list-repair'. Use new
accessors.
(org-move-item-up): reflect changes to `org-list-repair'. Use new
accessors.
(org-cycle-list-bullet): use new structures. Also use a shortcut to
`org-list-struct-fix-struct' in order to avoid unnecessary fixes, like
`org-list-struct-fix-box'
(org-sort-list): use of new structures. Renamed an internal function
for a little more clarity.
(org-cycle-item-indentation): remove dependency on org-list-repair.
Use new accessors.
(org-list-get-child): correct bug when asking for the child of the
last item
(org-list-exchange-items): use new accessors.
* lisp/org-list.el (org-list-blocks): new variable
(org-list-context): new function
(org-list-full-item-re): new variable
(org-list-struct-assoc-at-point): use new varible
(org-list-struct): rewrite of function. Now, list data is collected by
looking at the list line after line. It reads the whole list each time
because reading only a subtree was not enough for some operations,
like fixing checkboxes. It also removes the need to get
`org-list-top-point' and `org-list-bottom-point' first. An added data
is the position of item ending. This aims to be able to have list
followed by text inside an item.
(org-list-struct-assoc-end): new function
(org-list-struct-parent-alist): new function
(org-list-get-parent): new function
(org-list-get-child): new function
(org-list-get-next-item): new function
(org-list-get-prev-item): new function
(org-list-get-subtree): use helper function `org-list-struct-prev-alist'.
(org-list-get-all-items): new function
(org-list-get-all-children): new function
(org-list-get-top-point): new function
(org-list-get-bottom-point): new function
(org-list-get-counter): new function
(org-list-get-item-end): new function
(org-list-struct-fix-bul): rewrite for cleaner code. Make use of new
accessors.
(org-list-struct-fix-ind): make use of new accessors.
(org-list-struct-fix-box): new function
(org-list-struct-fix-checkboxes): removed function
(org-list-struct-outdent): use new accessors. Use the fact that there
is no longer a virtual item at beginning of structure.
(org-list-struct-indent): use helper functions
`org-list-struct-prev-alist' and `org-list-struct-parent-alist'. Also
use new accessors.
(org-list-struct-fix-struct): comment function. Call directly
`org-list-struct-apply-struct', without removing unchanged items
first.
(org-list-struct-apply-struct): comment function. Rewrite using new
accessors. Use new variable `org-list-full-item-re'.
(org-list-shift-item-indentation): removed function, now included in
`org-list-struct-apply-struct' because it is too specific.
Conflicts:
lisp/org-list.el
org-list: new way to get structure of a list and new accessors
* lisp/org-list.el (org-list-blocks): new variable
(org-list-context): new function
(org-list-full-item-re): new variable
(org-list-struct-assoc-at-point): use new varible
(org-list-struct): rewrite of function. Now, list data is collected by
looking at the list line after line. It reads the whole list each time
because reading only a subtree was not enough for some operations,
like fixing checkboxes. It also removes the need to get
`org-list-top-point' and `org-list-bottom-point' first. An added data
is the position of item ending. This aims to be able to have list
followed by text inside an item.
(org-list-struct-assoc-end): new function
(org-list-struct-parent-alist): new function
(org-list-get-parent): new function
(org-list-get-child): new function
(org-list-get-next-item): new function
(org-list-get-prev-item): new function
(org-list-get-subtree): use helper function `org-list-struct-prev-alist'.
(org-list-get-all-items): new function
(org-list-get-all-children): new function
(org-list-get-counter): new function
(org-list-get-item-end): new function
(org-list-struct-fix-bul): rewrite for cleaner code. Make use of new
accessors.
(org-list-struct-fix-ind): make use of new accessors.
(org-list-struct-fix-box): new function
(org-list-struct-fix-checkboxes): removed function
(org-list-struct-outdent): use new accessors. Use the fact that there
is no longer a virtual item at beginning of structure.
(org-list-struct-indent): use helper functions
`org-list-struct-prev-alist' and `org-list-struct-parent-alist'. Also
use new accessors.
(org-list-struct-fix-struct): comment function. Call directly
`org-list-struct-apply-struct', without removing unchanged items
first.
(org-list-struct-apply-struct): comment function. Rewrite using new
accessors. Use new variable `org-list-full-item-re'.
(org-list-shift-item-indentation): removed function, now included in
`org-list-struct-apply-struct' because it is too specific.
Conflicts:
lisp/org-list.el
* lisp/org-list.el (org-list-get-all-items): new function
(org-list-get-all-children): new function
(org-list-get-nth): new function
(org-list-set-nth): new function
(org-list-get-ind): new function
(org-list-set-ind): new function
(org-list-get-bullet): new function
(org-list-set-bullet): new function
(org-list-get-checkbox): new function
(org-list-set-checkbox): new function
(org-list-struct-fix-bul): use new accessors
(org-list-repair): use new accessors
(org-list-indent-item-generic): make use of accessors
(org-list-get-parent): renamed from org-list-struct-get-parent
(org-list-get-child): renamed from org-list-struct-get-child
(org-list-struct-fix-ind): make use of accessors
(org-list-get-next-item): new function
(org-list-get-subtree): new function
* lisp/org-list.el (org-list-struct-assoc-at-point): add checkbox to
list structure
* lisp/org-list.el (org-list-struct-assoc-at-point): add checkbox as
value in structure
* lisp/org-list.el (org-list-struct-apply-struct): also apply checkboxes
* org-protocol.el (org-protocol-unhex-single-byte-sequence)
(org-protocol-unhex-string, org-protocol-unhex-compound): Change date
of obsolete declaration to 2011-02-17.
* org.el (org-link-unescape): Simpler algorithm for replacing percent
escapes.
(org-link-unescape-compound): Use cond statements instead of nested
if, convert hex string with string-to-number, save match data.
(org-link-unescape-single-byte-sequence): Use mapconcat and
string-to-number for unescaping single byte sequence.
* org-protocol.el (org-protocol-unhex-string)
(org-protocol-unhex-compound)
(org-protocol-unhex-single-byte-sequence): Declare obsolete and
alias to respective org-link-unescape-* functions.
* org-macs.el (org-char-to-string): Inline function to properly decode
utf8 characters in Emacs 22. Moved and renamed from org-protocol.el.
* org-protocol.el (org-protocol-unhex-compound): Use renamed inline
function.
* org.el (org-link-escape-chars, org-link-escape-chars-browser): New
format of percent escape table.
(org-link-escape): Use new table format.
Just a plain list with the chars that should be escaped.
* org-protocol.el (org-protocol-unhex-single-byte-sequence): New
function. Decode hex-encoded singly byte sequences.
(org-protocol-unhex-compound): Use new function if decoding sequence
as unicode character failed.
* org-publish.el (org-publish-cache-ctime-of-src): improve
docstring.
(org-publish-find-title): New option to explicitly reset the
title in the cache.
(org-publish-format-file-entry): Use this new option.
Thanks to Jonathan Bisson for reporting this.
* 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-html.el (org-export-as-html): handle the case when
`org-export-html-validation-link' is nil to keep backward
compatible with the old default value of this variable.
Thanks to Sébastien Vauban for spotting this.
Datetree entries have a fixed form now:
* 2011
** 2011-02 monthname
*** 2011-02-13 dayname
These headings will not be recognized as datetrees:
* 2011 A task for 2011
** 2011-02 several words
*** 2011-02-13 several words
Thanks to Detlef Steuer for reporting this.
* org-bbdb.el (org-bbdb-export): When a link description has been
added by org-export-normalize-links, use path instead (remove the
`bbdb:' prefix).
The existing code handled the case where desc is nil. However, this no
longer occurs, since org-export-normalize-links now automatically adds
a desc to links, with a `bbdb:' prefix that would not usually be
wanted in exported text. The patch results in the same output as
originally intended.
TINYCHANGE
* org-ascii.el (org-export-ascii-underline): Put the level's
characters in the right order, as documented by the docstring.
(org-ascii-level-start): select the right char for underlining
headlines.
* org-agenda.el (org-agenda-date-later)
(org-agenda-date-earlier): Enhance docstrings.
(org-agenda-bulk-mark-regexp): Only match against headlines.
Send a message when no entry is marked.
(org-agenda-bulk-action): Fix bug about scattering deadlines.
Send an error when trying to scatter outside an agenda or a
timeline view. Silently fail when trying to scatter sexp
entries.
* org-clock.el (org-clock-clocktable-language-setup): New
custom variable.
(org-clocktable-defaults): Set the default language.
(org-clocktable-write-default): Use the new variable.
* lisp/ob.el (org-babel-src-block-names): Don't strip text properties from search hits
(org-babel-result-names): Don't strip text properties from search hits
* lisp/ob-python.el (org-babel-python-evaluate-session): Pass nil as
remove-echo part of META argument to `org-babel-comint-with-output'
The regexp matching involved in this procedure can fail on large input
data, so we only do it when necessary (i.e. output mode).
* lisp/ob.el (org-babel-script-escape): Use `substring' comparison
instead of regexp matching
Workaround for regexp limitation, e.g.
(string-match
"^\\[.+\\]$"
(concat
"["
(mapconcat (lambda (i) "x") (number-sequence 1 33500) "")
"]"))
gives "Stack overflow in regexp matcher" in several current builds.
* lisp/org-src.el (org-edit-src-code): When generating the code edit
buffer, it is necessary for several variables to inherit their values
from the parent org buffer. These changes collect all such variables
together into a single association list of (variable-name value)
pairs. In addition, a new variable is added to the list:
`org-edit-src-content-indentation'. This has the effect that a buffer
local value can be used for that variable.
This permits sbe to be used to retrieve multiline results. An example
of usage is with the :shebang and :preamble header args,
#+srcname: get-shebang
#+begin_src org
initial
shebang
lines
here
#+end_src
#+begin_src emacs-lisp :shebang (sbe get-shebang)
stuff
#+end_src
* lisp/ob-table.el (sbe): Don't truncate sbe results
* 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.
* lisp/org.el (org-open-at-point): Fix bug when using prefix arg to
construct `org-link-search' call. Rename prefix arg with a more
generic name, to reflect its diverse uses in this function.
* org-icalendar.el (org-icalendar-use-UTC-date-time): remove.
(org-icalendar-date-time-format): New custom variable.
(org-icalendar-use-UTC-date-timep): New function.
(org-ical-ts-to-string): Use the new variable.
----
When exporting to ical, using localtime is incompatible with some
software, using explicit universal time may failed with daylight
saving time, so we need another possibility, that is localtime with
explicit timezone.
* org-capture.el (org-capture-templates): document currentfile
for capture template.
(org-capture-templates): Allow to use currentfile for capture
templates.
(org-capture-set-target-location): Handle currentfile as a way
to setting the capture buffer.
* org.texi (Template elements): document currentfile for
capture templates.
* lisp/org.el (org-entry-get): Don't look for a property drawer if we
are before the first heading in the file.
(org-entry-get-with-inheritance): Don't attempt to move up the tree if
we are before the first heading in the file. Also, enclose less of the
function in the save-excursion.
The LaTeX looks for strings to export before the first headline. Such
strings are defined as "before the first heading", so they normally never
match a heading regexp. However, #+INCLUDE can insert lines before the
first heading matching a heading regexp, causing these lines to appear
twice: as first lines and as normal headings.
The fix is to never include first lines when they match a heading regexp.
This was reported by Rasmus <rasmus.pank@gmail.com>.
* org-agenda.el (org-get-entries-from-diary): Put multiline
diary entries on a single line when lines don't start with a
diary time.
This was requested by Suvayu Ali.
* org-html.el (org-export-html-protect-char-alist): New custom
variable to define characters to be HTML protected.
(org-html-protect): Use the new variable.
Hi,
Here's a patch that make the sitemap entry formating coherent with the
new html-pre/postamble one.
While here I was trying to add some documentation about this feature in
org.texi but I end up copy/pasting or paraphrasing the docstring of
correspondant customs. Is it acceptable for the documentation or plain
useless?
>From 766b0db7d0189d2edb0d8799c3424d62f9ac4e47 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
Date: Fri, 11 Feb 2011 15:32:58 +0100
Subject: [PATCH] org-publish.el: sitemap formating coherent with new preamble
Adopt downcase for format directive to be coherent with the new
pre/postamble formating.
Use `format-spec' function instead of `org-replace-escapes'.
* org-info.el (org-info-store-link): use "#" to separate the
info file and the node.
(org-info-follow-link): use both "#" to separate the info file
and the node. Continue to use ":" for backward compatibility.
* org-icalendar.el (org-icalendar-honor-noexport-tag): New
custom variable.
(org-print-icalendar-entries): Use this new variable to
prevent export of entries with a :noexport: tag.
This was requested by Juraj Kubelka.
* 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.)
* lisp/org-exp-blocks.el (org-export-blocks-format-ditaa): This
function is begin deprecated in favor of begin_src blocks.
(org-export-blocks-format-dot): This function is begin deprecated in
favor of begin_src blocks.
When a heading like
* 2011 Do this
existed, the creation of a datetree for the year 2011 didn't work,
as the "2011 Do this" heading was mistaken for such a datetree.
This has been reported by Charles Cave.
Locally kill org-agenda-current-span as a variable, otherwise
the current value of org-agenda-current-span is taken as the
default value when redoing the buffer or calling org-agenda
with a different view.
This might be a temporary fix, as Julien is looking for a
more general solution. See his message here:
http://article.gmane.org/gmane.emacs.orgmode/37359
* org-publish.el (org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): new custom variables.
(org-publish-projects): use these variables to format the
sitemap entries.
* lisp/org-agenda.el (org-agenda-filter-by-tag): Refresh agenda when
updating the filter while the clock report is following the filter.
When the clock table in the agenda has been set up to respect the
current agenda tags filter, modifying the filter will now
automatically rebuild the agenda to make sure that also the clock
report is updated along with it. Updating the entire agenda is not
strictly necessary - updating the table would be enough. However,
right now we do not really have a function that will update only the
clock table, as inserting the table is currently part of building the
agenda itself. Maybe someone can optimize this in the future.
This feature was requested by Sebastien Vauban.
On Sat, Feb 05 2011, Matt Lundin wrote:
> This results in only a day view because org-agenda-current-span is still
> 'day.
Here's a proposal fix.
I could have setq org-agenda-current-span to nil as a work around, but
it seems more logical to just kill all the local variables. That is, a
custom agenda view would not keep any of the local variable of the
previous agenda, which seems logical to me.
>From b48fc7c395dffea60df20c23b26e362ac0354b01 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 7 Feb 2011 12:36:42 +0100
Subject: [PATCH] org-agenda: kill local variables in agenda view
* org-agenda.el (org-agenda): Kill all local variables. This
assures we are not keeping buffer variable from an old agenda view
when switching to a new custom agenda.
Signed-off-by: Julien Danjou <julien@danjou.info>
This patch adds sort options to the sitemap. In addition to
alphabetical order, one can choose chronological or anti-chronological
ordering of sitemap entries. To retrieve file date, it tries to parse
the "#+date" keyword and if not present defaults to file modification
time.
* lisp/org-crypt.el (org-encrypt-string): New function.
(org-encrypt-entry): Use org-encrypt-string to encrypt, so we use cached
crypted values.
(org-decrypt-entry): Store crypted text in decrypted text.
Signed-off-by: Julien Danjou <julien@danjou.info>
If I run M-x org-store-link when my current emacs frame is just showing
one MH-E window (and nothing else in the frame), e.g. the "show-+inbox"
buffer, then the link to that email is created okay, but the window
frames are altered so that the +inbox summary window is also shown.
In general, the previous window contents are forgotten. I suggest
adding a 'save-window-excursion' into org-mhe-store-link so that the
window arrangement is preserved on exit from the function.
Patch below is long just because of the extra indentation.
Stephen
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
* lisp/org-agenda.el (org-agenda-get-day-entries): Compare DATE with
modified today.
When a user sets org-extend-today-until, the agenda TODO list would
come up empty when requested in the extension period between midnight
and org-extend-today-until. This problem is new, it was caused by a
patch that introduced the function org-today and used it also
in org-todo-list.
The reason why this caused a problem is a bit difficult. The agenda
need a date to be defined, and getting todo entries is subject to the
current date being today. This is a leftover condition from the times
when the TODO list was often part of the daily agenda listing, and the
test is there to avoid that the TODO list comes also up when looking
at the agenda for tomorrow. Much of this is irrelevant now, because
people use either block agendas, or separate views - but the old
functionality is retained for backward compatibility.
This patch fixes the problem by making `org-agenda-get-day-entries'
check for the date computed by `org-today'.
* org.el (org-update-parent-todo-statistics): fix bug when
updating statistics from the column view.
This was reported by James Deaton and confirmed by Bernt Hansen.
* org-agenda.el (org-agenda-bulk-mark-regexp): New command.
(org-agenda-menu): Add the new command to the menu.
(org-agenda-mode-map): Add % as the keybinding for the new
command.
* 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.el (org-narrow-to-block): New function to narrow to block.
Bound this function to `C-x n b'.
* org.texi (Dynamic blocks, Structure editing): Mention
the function `org-narrow-to-block'.
This is inspired by a request by Leonidas Tsampros.
* org-agenda.el (org-agenda-repeating-timestamp-show-all):
Allow to use a list of TODO keywords as the value of this
variable. The agenda will show repeating stamps for entries
matching these TODO keywords.
(org-agenda-get-timestamps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Allow the use of a list of
keywords in `org-agenda-repeating-timestamp-show-all'.
---
This was suggested by Jeff Horn and supported by Detlef Steuer.
* org-latex.el (org-export-latex-emph-format): Don't use
`org-export-latex-use-verb'. Remove this variable.
This variable was introduced by Carsten for testing purpose,
it was not meant to be a user variable.
* org-archive.el (org-archive-save-context-info): Fix
docstring typo.
(org-archive-subtree-add-inherited-tags): New variable to
control whether inherited tags should be appended to local
tags when archiving subtrees.
(org-archive-subtree): Use the new variable.
This feature was suggested by Carsten, after a request by Osamu OKANO.
* org-crypt.el (org-decrypt-entry): Delete \n on top level heading.
This avoids a display bug showing the heading outlined where the text
is not since it does not have the outline property.
Restore subtree visibility state after decryption.
Cc: John Wiegley <johnw@gnu.org>
Cc: Peter Jones <pjones@pmade.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
On Mon, Jan 17 2011, Carsten Dominik wrote:
> have you been following this thread? I think this has to do with your
> rewrite of the dagenda span stuff. Maybe you can find out better and
> faster that I why this goes wrong? Please read the entire thread.
I've followed but not sure I understood what the bug is. But from my
various tries, I found a bug: when pressing 'j', the current span is
discarded.
Attached is a patch that should fix that, even for future use of
`org-agenda-list' with the span unspecified. :)
>From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 17 Jan 2011 16:05:28 +0100
Subject: [PATCH] Fix agenda span on date jump
* org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
possible default span if it is set.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-src.el (org-edit-src-persistent-message): Change docstring.
(org-edit-src-code): Get rid of help message in echo area.
* lisp/ob.el (org-babel-do-in-edit-buffer): Do not pass 'quietly
argument to org-edit-src-code as this has been removed
\protectedtexttt for the =...= emphasis and \verb for the
~...~ emphasis.
(org-export-latex-use-verb): now defaults to t.
(org-export-latex-emph-format): distinguish between =...= and
~...~ emphasis.
---
This patch was submitted by Carsten as a variation on Thomas Dye's
original patch.
On Sat, Jan 29 2011, Matt Lundin wrote:
> The regexp in org-link-expand-abbrev does not allow for accented
> characters in the link abbreviation. I am not sure whether this is an
> intended limitation or a bug. :)
I don't see any reason. Patch attached.
>From 1ec1e178aaa6a9935819a873ae492be7a2ddb2f6 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 31 Jan 2011 21:19:07 +0100
Subject: [PATCH] Allow more char type in link abbrev
* org.el (org-link-expand-abbrev): Allow any type of character
in link expand.
Signed-off-by: Julien Danjou <julien@danjou.info>
At Mon, 17 Jan 2011 18:55:54 +0100,
Bastien wrote:
>
> David Maus <dmaus@ictsoc.de> writes:
>
> >> It seems that such a non-regression test base and script do not
> >> exist. However that would be good to have in order to check that any
> >> correction does not break anything.
> >
> > That's exactly what the testing framework[1] could and should do.
> > I've just not figured out how to best write tests for entire export
> > operations. Thinking of it: We could create an input file dedicated
> > to test link exporting, put in different kinds of links, export and
> > then use regexps to check if the links have been exported fine.
>
> I've just added testing/links.org to the testing framework.
>
> Vincent, feel free to suggest any addition to testing/ so that we can
> enrich our test-base with various examples! Being able to reproduce
> errors on those files will help people feel confident the error does
> not come from their configuration.
Attached patch factors out the link handling part of
`org-export-as-html' in a separat function which takes the processed
line and the exporting options as arguments and returns the possibly
modified line. Having the link handling in a separate function makes
it way easier to test this specific behaviour of export.
Best,
-- David
On Jan 26, 2011, at 10:34 AM, Eli Zaretskii wrote:
> The file org-complete.el, added about a month ago, causes a file-name
> clash with org-compat.el after 8+3 truncation. This causes trouble
> when unpacking Emacs tarballs on DOS filesystems.
Also rename org-complete-* functions in org-pcomplete.el and remove a
wrong reference to org-complete in doc/org.texi.
We still use org-complete-* namespace for the custom group and the
custom variables.
* lisp/org-latex.el (org-latex-default-figure-position): New defcustom
for default placement of latex figures.
(org-export-latex-tables): Positioning tables using the new
defcustom variable.
(org-export-latex-format-image): Positioning images using the new
defcustom variable.
* lisp/ob-exp.el (org-babel-exp-do-export): Simplified, no longer need
to do anything to export code.
(org-babel-exp-results): No longer returns a replacement for the
code block.
(org-babel-exp-inline-src-blocks): Simplified.
(org-babel-exp-src-block): Removed unnecessary pluralization from
function name.
* lisp/ob-exp.el (org-babel-exp-inline-src-blocks): Simplified
exportation of inline code blocks using normal code block execution
mechanism to insert results.
(org-babel-exp-results): Results exportation mechanism is unified
for both inline and regular code blocks.
* lisp/ob.el (org-babel-where-is-src-block-result): Returns the point
after an inline code block for inline code blocks.
* lisp/ob.el (org-babel-insert-result): Special handling of the
position of results of inline code blocks.
(org-babel-examplize-region): Now able to comment inline regions.
* 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 \\=.
`org-export-process-option-filters' is supported for HTML export but not
for latex export. The patch at the bottom fixes that.
I note that there is one other location in the same function where it
seems the same change could be made. I suspect this is not necessary,
but if someone is familiar with the org-latex code they might like to
have a look. (I didn't manage to understand the roles of the several
variables with names like *-opt-plist *-options-plist in that function.)
I'm protecting this patch from patchwork with ^$; it's the patch at the
bottom that I propose.
$ diff --git a/lisp/org-latex.el b/lisp/org-latex.el
$ index 51ee6d2..53d6b40 100644
$ --- a/lisp/org-latex.el
$ +++ b/lisp/org-latex.el
$ @@ -700,7 +700,8 @@ when PUB-DIR is set, use this as the publishing directory."
$ '(:org-license-to-kill nil))))
$ (org-update-radio-target-regexp)
$ (org-export-latex-set-initial-vars ext-plist arg)
$ - (setq org-export-opt-plist org-export-latex-options-plist)
$ + (setq org-export-opt-plist
$ + (org-export-process-option-filters org-export-latex-options-plist))
$ (org-install-letbind)
$ (run-hooks 'org-export-latex-after-initial-vars-hook)
$ (let* ((wcf (current-window-configuration))
$
Support `org-export-process-option-filters' in latex export
* lisp/org-latex.el (org-export-as-latex): Process export property
list with `org-export-process-option-filters' early in latex export
Modified lisp/org-latex.el
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>
* org-agenda.el (org-agenda-get-progress): Fix regexp for statep: it
must has \\ at the end of the line. This avoid matching the following
heading when there's no newline between the logged state and the next
heading.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-publish.el (org-publish-get-base-files): Add sitemap file.
I noticed some wonkiness in getting my sitemap created on my webserver
when pushing my website, and the problem seems to lie in
org-publish-get-base-files only returning existing files, and not
picking up on the soon to be generated sitemap. My patch always adds
the sitemap file to the list of returned files if a sitemap is
requested, regardless of if it exists or not.
* lisp/org-agenda.el: (org-agenda-todo-ignore-deadlines): New option.
(org-agenda-todo-ignore-scheduled): New option.
(org-agenda-todo-ignore-timestamp): New option.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item): Allow user
to specify custom distance to ignore (future or past).
(org-agenda-todo-custom-ignore-p): New function.
This patch gives users greater control over which past or future items
they would like to ignore in the global todo list. By setting
org-agenda-todo-ignore-scheduled to 7, for instance, a user can ignore
all items scheduled 7 or more days in the future. Similarly, by
setting org-agenda-todo-ignore-scheduled to -1, a user can ignore all
items that are truly in the past (unlike the 'past setting, which
ignores items scheduled today). Thanks to Paul Sexton for the idea for
this new functionality.
* lisp/org-habit.el: (org-habit-parse-todo) Don't parse more days than
needed.
When constructing a consistency graph, org-habit now stops searching
for timestamps when the number of matches exceeds the span of time
displayed in the graph. This can lead to a significant speedup in
agenda construction, especially for entries with many logbook entries.
Previously, org-habit would parse all logbook timestamps, even if they
numbered in the hundreds.
* lisp/ob.el (org-babel-map-inline-src-blocks): Macro for executing
code in each inline code block.
(org-babel-execute-buffer): Executes inline code blocks as well as
regular code blocks.
* lisp/org-clock.el (org-clock-before-select-task-hook): New hook.
(org-clock-select-task): Run new hook.
Hi Org-moders,
I am often frustrated because I clock a lot of things and some of them
are repeated (i.e, coffee, read mails, etc.). So when I want to clock
time I spend drinking coffee, the best I found was to search for a
headline matching "Coffee". Or to tag frequent clocks and do some
agenda research on this tag. Too long. :-)
So here is a solution for this need : to add a shortcut property to
entries I would like to "bookmark" and insert matching entries in the
org-clock-select-task menu. This can be done with :
* TODO Pause and drink coffee
:PROPERTIES:
:SHORTCUT: p
:END:
then C-u C-c C-x C-i p. And voil, "Pause and drink coffee" is clocked!
Here is a patch that adds a hook into org-clock-select-task and a module
that adds the shortcut feature. I tried to be the least intrusive
possible, if this proves to be useful, the hook trick might not be
needed.
Benj
TINYCHANGE
* org-agenda.el (org-agenda-get-blocks): Fix time of start/end
of events with range. This display things like:
<2011-01-22 Sat 14:00>--<2011-01-23 Sun 20:00>
correctly, with the event starting at 14:00 and ending at 20:00.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-ascii.el (org-ascii-level-start): Catch the case of levels
which do not have an equivalent in the list of underline characters.
For more information see
http://thread.gmane.org/gmane.emacs.orgmode/36097
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
Xin Shi <shixin111@gmail.com> wrote:
>
> Shr\"odinger will give the o with two dots on top. Notice that the " is a double quotation mark.
>
> However, when org translate that into LaTeX, it will become two single quotation mark! \'' (it's very hard to see the difference, but the pdf version will
> see the wrong result).
>
> Could someone tell me how to do that?
>
It works correctly in headlines, but not in running text. I think [fn:1]
that it is a bug and that the following patch fixes it:
--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---
but I have not tested it extensively and it may do more harm than good:
I'd wait for a more definitive opinion.
Alternatively, you can use UTF-8 in your org file and write Schrödinger
explicitly. This will survive the LaTeX export intact and the
\usepackage[utf8]{inputenc} in the LaTeX file will do the right thing
with it.[fn:2]
Nick
Footnotes:
[fn:1] but I'm really not sure: I've lost track of how things work in
LaTeX export - sigh...
[fn:2] I'm not sure whether it will survive the email trip
though. Here's hoping that it will.
* org-latex.el (org-export-latex-make-header): Export email in
author line if `org-export-email-info' is non-nil.
Previously exporting to LaTeX would not include the document author's
email address when org-export-email-info was set. This patch corrects
this oversight using the \thanks command to add a footnote to the
author line.
On Mon, Jan 17 2011, Bernt Hansen wrote:
>
> Thanks for this patch. I think this fixes the issue I was having with
> 'j' in the agenda switching from week-view back to single-day view when
> org-agenda-ndays is set to 1.
>
> There is still a (new?) problem with jumping to today.
>
> Set the following variable
>
> (setq org-agenda-start-on-weekday 6)
>
> | Key Sequence | Notes |
> |--------------+------------------------------------------------|
> | C-c a a | Display weekly agenda |
> | f | Go forward a week |
> | d | Display day agenda |
> | . | Go to to day - but it goes to Saturday instead |
>
> This should go to today and not the first day of the week.
Attached is a fix for that.
>From f566a5612560f997f4760144ca850dda5c06bc5e Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 17 Jan 2011 18:09:30 +0100
Subject: [PATCH] Fix org-agenda-goto-today not respecting the current span.
* org-agenda.el (org-agenda-goto-today): Respect current span.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-complete.el (pcomplete/org-mode/link):
(pcomplete/org-mode/todo):
(pcomplete/org-mode/prop): Copy list before uniquifying.
For a description of the bug, see
http://thread.gmane.org/gmane.emacs.orgmode/35640