When inserting new list entries, sometime empty lines will be
inserted automatically. This, however, makes only sense if empty
lines do not terminate the list, as configured by
`org-empty-line-terminates-plain-lists'.
This commit makes sure that, if
`org-empty-line-terminates-plain-lists' is set, automatic empty lines
will never be inserted.
Ian Barton writes:
>
> This has been happening for a while. I suspect it's something in my
> settings, but I can't work out what. When I publish a single file, I
> get the following error:
>
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> file-truename(nil)
> org-publish-file("/home/ian/nfs/firewall/Documents/org/holiday/holiday.org")
> org-publish-current-file(nil)
> call-interactively(org-publish-current-file)
> org-export(nil)
> call-interactively(org-export)
>
> Publishing a whole project works fine.
This was caused by an attempt of the publishing code to always find
the top enclosing project. While this makes sense when publishing a
project, for a single file we want just the smallest enclosing
project. This commit makes sure that this difference is treated
correctly.
A new hook is introduced, `org-agenda-before-write-hook'.
A function that ca be added to this hook is
`org-agenda-add-entry-text'. When this is done, each of the entries
shown in the agenda is amended with text that in the original buffer
is part of the entry text below the headline. Drawers are not copied,
and also the line with scheduling and deadline information is not
used. Finally, the number of ines to be added is imited by
`org-agenda-add-entry-text-maxlines'.
Links with description not create a note before the next headline that
contains the link. In the text, the description will be shown.
The new variable `org-export-ascii-links-to-notes' can be configured
to turn off this behavior, then the reference will be inserted inline
in the text. If the line becomes too long because of this, it will
be wrapped.
If the headline contains a time-of-day in one format or another, it
will be used to sort the entry into the time sequence of items for a
day. Some people have time stamps in the headline that refer to the
creation time or so, and then this produces an unwanted side effect.
If this is the case for your, use the new option
`org-agenda-search-headline-for-time' to turn off searching the
headline for a time.
Undo will now remove up to 20 characters typed consecutively, just
like Emacs normally does. We need a special implementation for this
because Org has its own self-insert command.
The code for doing this is a patch by Martin Pohlack.
A line: #+MARCO: name replacement text
can be referenced by {{{name}}}. As special cases, {{{title}}} will
reference #+TITLE, and similar with similar lines.
Alan E. Davis writes:
> I have found the behavior of the cursor at the beginning of
> the line to be clumsy, and troublesome. I cannot easily set
> a region, for example.
>
> However, the special setting of ctrl-e is extremely useful.
>
> A single variable controls these two variables, in a unified
> way. This variable also has two aliases. The aliases are
> not recognized by the functions that are affected by these
> variables in org.el: org-beginning-of-line, and
> org-end-of-line. As far as I can see, there seems no reason
> to keep these two aliased variables as references to a
> single unified variable, insofar as the underlying code is
> concerned.
>
> Because, at least for me, the behaviors have sufficiently
> distinct behaviors, I propose these should be separated.
This is a reasonable request, and this commit implements it.
To have separate values, set org-special-ctrl-a/e to a cons
cell with the setting for C-a in the car and the setting for
C-e in the cdr.
This commit fixes the bug discussed in:
http://thread.gmane.org/gmane.emacs.orgmode/11106
The reason for the empty line being inserted is subtle:
The function `org-add-planning-info' is used to add and remove planning
info time stamps (deadline, scheduled, closed) from the second line in
an entry. Usually, the function is called to add something, with an
optional argument to also remove something. In doing so, it assumes
that the second line must be there, and if it is not there, it creates
it.
Now, sometimes `org-add-planning-info' is called only to remove a time
stamp. In this particular case it was to remove the CLOSED time
stamp. This happens when the state is changed from a DONE or nil
state to a not-done state. The idea behind this is that maybe to
entry was marked earlier as DONE, but the user has changed his mind,
so the timestamp recording when it was finished should be removed.
So in this case, an empty line was created, assuming that there would
be something to add - only nothing was added.
This commit arranges for checking if there is something to add before
creating an empty line.
orgstruct++-mode is an enhanced version of orgstruct mode that
also imports all indentation and paragraph settings into the major
mode. Furthermore, it now allows to use M-RET and M-S-RET in items
after the first line. The latter change was a request by Austin
Frank.
The new command `org-reload' allows to reload all Org lisp files.
By default it will load compiled files if these are available. If
not, or when called with a C-u prefix argument, uncompiled code will
be loaded. This is good for producing a meaningful backtrace when an
error occurs.
Like TODO keywords before, now also tags each get their own CSS class,
given by the tag itself. Invalid characters in tags are all replaced
by "_" to make sure the resulting HTML remains valid.
Two new variables can be used to add a prefix to the class names for
TODO keywords and tags.
Russel Adams writes:
> That worked, the only point I may make would be to exclude
> LATEX_HEADER and TEXT from that list.
>
> I'm also trying to resolve an ordering issue. I want to have a
> header/footer line declared in the header, but I want to use these
> orgTITLE macros in that. Currently LATEX_HEADER and the class go first
> before the definitions, and TEXT occurs inside the document. If the
> macro isn't defined before the header/footer, you get an error.
>
> I may have to manually code those, which defeats the purpose of using
> the org options.
OK, I removed those two fields, and I switched things around so that
the new macros are defined earlier.
Since we now have org-use-fast-todo-selection set by default,
there is no reason for special treatment of the prefix argument
anymore.
Reported by Wanrong Lin.
Org has a number of places where the value read by completing-read may
contains spaces. For these occasions, the space character needs to be
a normal character.
The recent support for ido.el invalidated these special cases because
ido has its own way of dealing with spaces.
This commit now makes sure that ido is off for the critical cases
where completion must allow spaces.
This commit implements the possibility to import the in-buffer export
options as TeX macros, like \orgTITLE, \orgAUTHOR etc.
Requested by Russel Adams.
John Rakestraw writes:
> I noticed today that, at least in my set-up, setting these variables
> this way:
>
> (setq org-agenda-dim-blocked-tasks 'invisible)
> (setq org-enforce-todo-checkbox-dependencies t)
>
> means that a TODO task with checkboxes doesn't get included in the
> agenda. However, the sub-tasks in the checkbox list don't get included,
> either. So the TODO task with checkboxes doesn't show up in the agenda.
>
> It makes sense given the way the variables work. However, I wonder if
> it makes more sense for a task with checklisted sub-tasks to be
> included in the agenda so that the tasks and sub-tasks don't get lost.
> Or, to put the point slightly differently, I think that a TODO that's
> blocked because it has dependent TODOs might be treated differently in
> agenda listings than a TODO that's blocked because it has dependent
> checklist items.
>
> Not a big deal to me because I don't typically use checkboxes for TODO
> items. But I thought I'd raise it for consideration.
I agree with this view and the commit implements exactly this.
(org-indent-line-function): Make sure this works even if there is not
`org-drawer-regexp' defined. This can happen when orgstruct-mode is
used in a non-org buffer.
This commit makes it possible to force new lines and even empty lines
in the fast tag selection interface, either by splitting tags
definition into several lines, or by inserting "\n" into the tags
list, or by inserting (:newline) into the tags alist.
This is largely a patch from Christopher Suckling
The variables `org-agenda-todo-ignore-deadlines' and
`org-agenda-todo-ignore-with-date, and
`org-agenda-tags-todo-honor-ignore-options' are now all mentioned in
the docs.
The commands org-agenda-show can now be used to show varying degrees of
context when called with a prefix argument. `0 SPC', `1 SPC', ... `4
SPC'.
The new command `org-agenda-cycle-show' shows different amounts of
context when called several times in succession.