I have changed my mind and turned off shift-selection support again by
default, because it causes confusing behavior, sometimes calling an Org
command and sometimes doing shift selection. The default behavior is
now:
- in special contexts, execute Org commands
- outside special contexts, create an error that will point users to
configure the variable `org-support-shift-select'. Hopefully that
will make them read the docstring and then decide for themselves
what to do.
Emacs 23 introduces `shift-selection-mode', and even turns it on by
default. Therefore, it is fair to assume that users of Emacs 23 will
expect to be able to select a region by holding down shift will moving
the cursor. This conflicts with the use of shifted cursor keys in
Org-mode for other purposes, in particular to "change the item under
the cursor", like it is done for time stamps, item bullet types, TODO
keywords and priorities.
This commit tries to support `shift-selection-mode' as much as possible,
while retaining these valuable commands keys for Org-mode. The
following things are changed:
1. The range of contexts where Org's commands do act is reduced.
- S-up and S-down no longer jump to the previous and next plain list
item - you can use the paragraph commands C-up and C-down for this
quite well.
- S-left and S-right only change the bullet type of a plain list
item when the cursor is *exactly* on the bullet, not just anywhere
in the item line.
2. When a S-cursor key is used outside a special context, a region is
started or extended.
3. When a region has already been started, it will be continue to
extend even if the S-cursor keys move the cursor into a special
context.
4. If you want S-cursor selection to work in headlines as well, you
can set the variable `org-support-shift-select' to
`even-in-headlines'. Then you need to rely on `C-c C-t' to set
TODO keywords, and on `C-c ,' to set priorities.
If you want everything to behave the way it was, set
`org-support-shift-select' to nil.
There were two bugs:
1. Timestamp processing did not honor the setting of
`org-export-with-timestamps' in the text before the first
headline.
2. When `org-export-with-timestamps' was nil, time stamps were removed
even in tables. I think this is incorrect, so in tables, time
stamps are now never removed.
The variables =org-agenda-todo-ignore-with-date=,
=org-agenda-todo-ignore-with-date=, and
=org-agenda-todo-ignore-with-date= make it possible to
exclude TODO entries which have this kind of planning info
associated with them. This is most useful for people who
schedule everything, and who use the TODO list mainly to find
things that are not yet scheduled. Thomas Morgan pointed out
that also the tags-todo search may serve exactly this
purpose, and that it might be good to have a way to make
these variables also apply to the tags-todo search. I can
see than, but could not convince myself to make this the
default. A new variable must be set to make this happen:
=org-agenda-tags-todo-honor-ignore-options=.
Formulas can now refer to fields and regions in other tables, be it in
the same file or even in different files.
This also opens the door for more interesting R support, because
arbitrary tables in a file can now be accessed with appropriate
commands.
Finally, this commit also introduces a convenience for creating
references in tables. For the purpose of references, it will always
be *assumed* that there is another hline at the end if each table. So
for example in a table that has only a single hline, to separate
header from data, you can now access all of column two with
"@I$2..@II$2".
William Henney writes:
If a heading has tags, then that heading's time summary
overlay (shown by C-c C-x C-d) is displayed using the
org-tag face. This looks a bit strange. Is it intended? It
is especially noticeable in my case, since I have my tags
shown in a smaller font.
This is cause by the fact that we use the `secondary-selection' face
here which only highlights but inherits the rest from what is below.
The idea was that these clock times should have the same color as the
headline they belong to, but this idea is defeated when a line has tags
with a very different face.
This commit introduces a separate face for this purpose, so that users
can customize it.
The conversion commands `C-c -' and `C-c *' are now better
behaved and therefore more useful, I hope.
If there is an active region, these commands will act on the
region, otherwise on the current line.
- C-c - :: This command turns headings or normal lines into
items, or items into normal lines. When there is a
region, everything depends on the first line of the
region:
- if it is a item, turn all items in the region into
normal lines.
- if it is a headline, turn all headlines in the region
into items.
- if it is a normal line, turn all lines into items.
- special case: if there is no active region and the
current line is an item, cycle the bullet type of the
current list.
- C-c * :: This command turns items and normal lines into
headings, or headings into normal lines. When there is
a region, everything depends on the first line of the
region:
- if it is a item, turn all items in the region into
headlines.
- if it is a headline, turn all headlines in the region
into normal lines.
- if it is a normal line, turn all lines into headlines.
Matt Lundin writes:
I'm have a *minor* issue to report. It occurs when I export
an org file with footnotes to LaTeX. Specifically, it has to
do with the combination of American style quotation marks
and footnotes.
According to many American manuals of style, quotation marks
are to be placed after a sentence ending period if the
quoted passage is at the end of the sentence. E.g.
,----
| Here is "a quote."
|
| not
|
| Here is "a quote".
`----
When I use American style quotation in conjuction with a
footnote, the exporter does not convert the closing quote
marks into a two single quotation marks (i.e., LaTeX smart
quotes).
Thus, the following source snippet:
,----
| This is a footnote "with a quote."[fn:sample] And here
| is another footnote "with a quote".[fn:another]
|
| [fn:sample] Here is the sample footnote.
|
| [fn:another] Another footnote.
`----
Becomes
,----
| This is a footnote ``with a quote."\footnote{Here is
| the sample footnote. } And here is another footnote ``with
| a quote''.\footnote{Another footnote. }
`----
Notice the double quotation mark (rather than two single
apostrophes) at the end of the first sentence. Notice also
the correct quotation mark format appears in the second
sentence, where the period comes after the quotation mark.
This commit addresses this issue by checking of text
protection is off not after the quotation mark, but before.
The directory used for attachments to an entry is by default chosen
automatically, with a name derived from the entry ID to make sure it
is unique.
However, in some cases it may be better to assign a user-chosen
directory to and entry, to be used for attachments. This commits
implements this change. See the documentation changes for information
on how things work.
Thanks to Jason Jackson for pushing this part.
The second change made bu this commit is that it is now possible to
inherit the attachment directory from a parent, so that an entire
project subtree can use a single directory.
Two new variables, `org-export-html-inline-image-extensions' and
`org-export-latex-inline-image-extensions' now define the file
extensions that will be considered for inlining images. The default
for HTML is png, jpg, jpeg, and gif files. The default for LaTeX is
png, jpg, jpeg, and pdf, assuming processing with `pdflatex'.
For LaTeX export, this can lead to conflicts for links that point
to non-image PDF files. To avoid that such a link will be inlined by
accident, always give a description text for such a link, one that is
not equal to the path.
The special first column in some tables was not removed for LaTeX
export. This bug was probably introduces recently, while trying to
fix problems with special characters in LaTeX tables.
Export is now working again properly.
Reported by Giovanni Ridolfi.
William Henney writes:
The following table works correctly with org-plot
#+PLOT: title:"org-plot test" ind:1 type:2d with:hist set:"style fill
solid" set:"yrange [0:]"
| Year | a | b |
|-------+---+---|
| x2006 | 3 | 1 |
| 2007 | 1 | 2 |
| 2008 | 2 | 0 |
However, if the "x" is removed from the start of all the years, it no
longer works:
#+PLOT: title:"org-plot bug" ind:1 type:2d with:hist set:"style fill
solid" set:"yrange [0:]"
| Year | a | b |
|------+---+---|
| 2006 | 3 | 1 |
| 2007 | 1 | 2 |
| 2008 | 2 | 0 |
From glancing through org-plot.el, it seems as though the problem is
that the text-ind parameter is false when all the values in the
"independent variable" column are legal numbers. However, my lisp
skills are not up to fixing this.
This patch is by Charles Sebold and Eric Schulte fixes the problem.
When a property for column view is supposed to contain a date, not
defining allowed values could lead to an obscure error message. This
is now improved.
Reported by Charles Cave.
Daniel Clemente writes:
Hi. After you eval this (for instance to count the number of
headlines under a tree):
(org-map-entries 'ignore t 'tree)
you end up with a different view of the buffer
because (org-narrow-to-subtree) was called. This seems an
unwanted side effect since narrowing is not org-map-entries' job.
Should (save-excursion) be used inside (org-map-entries
... 'tree) ?
He is right, and save-restriction is needed as well. This is
what this commit implements.
Hsiu-Khuern Tang writes:
I find that doing a tags search for SCHEDULED or DEADLINE turns
up headings that do not have any schedule or deadlines.
Using the example from
http://article.gmane.org/gmane.emacs.orgmode/10274:
#+SEQ_TODO: NEXT WAITING | DONE
#+STARTUP: overview
* DONE Test1
CLOSED: [2009-01-07 Wed 12:26]
* NEXT Test2
DEADLINE: <2009-01-28 Wed>
* Test3
If I type
C-c \ +DEADLINE<="<2009-01-28>" <RET>
all three headlines are selected! I expected to match the second
headline only.
Indeed, this exposes an error in the time comparison functions
which would take a empty time stamp to mean 0. This commit does
fix the bug.
Matt Lundin writes:
I had one more question/request concerning archives. Would
it perhaps be possible to enable the file name
substitution (i.e., "%s") after the double semi-colon, so
that the file name can be used as a headline within the
archive file? My ideal setup would be to have a single
archive file for each year's work, with headlines named
according to the original files of the archived subtrees.
E.g.,
,----
| * finances.org
| ** archived item
| * notes.org
| ** archived item
| ** another archived item
`----
This commit does implement this request.
Matt Lundin writes:
When I have multiple org files archive to a single file, as in
,----
| (setq org-archive-location "~/2009.org_archive::")
`----
I find that including archive files in the agenda display (C-u v)
results in multiple identical entries in the agenda display (in my
case, when doing a word search).
In fact, the number of duplicate lines exactly matches the number of
agenda files that archive to that file (in my case 16). Is the agenda
function perhaps searching the archive file once for each of the
agenda files and then displaying the results as separate lines?
Indeed, when putting together the list o archive files to search,
Org did not check for duplicates. This commit implements
uniquification of the list.
Lines preceded by a colon are treated as fixed-width examples.
This commit improves the moment when the protection of these lines
happens during preprocessing. And it enforces that a space must
follow the colon for the line to be treated in this way.
Friedrich Delgado Friedrichs writes:
A while ago I had this problem:
org-infojs-handle-options: Wrong type argument: stringp, nil
I wonder if my patch ever reached the mailing list, or if it
was overlooked because it was too close to christmas:
Friedrich Delgado Friedrichs schrieb:
From 0fef25f56c837ae9f434449c6f30268e0474f7ab Mon Sep 17 00:00:00 2001
From: Friedrich Delgado Friedrichs <delgado@dfn-cert.de>
Date: Tue, 23 Dec 2008 12:10:42 +0100
Subject: [PATCH] fix string-match against nil when no in-file options are set for jsinfo
---
lisp/org-jsinfo.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lisp/org-jsinfo.el b/lisp/org-jsinfo.el
index 8f2d7e8..19faa9e 100644
--- a/lisp/org-jsinfo.el
+++ b/lisp/org-jsinfo.el
@@ -140,7 +140,8 @@ Option settings will replace the %MANAGER-OPTIONS cookie."
default (cdr (assoc opt org-infojs-options)))
(and (symbolp default) (not (memq default '(t nil)))
(setq default (plist-get exp-plist default)))
- (if (string-match (format " %s:\\(\\S-+\\)" opt) v)
+ (if (and v
+ (string-match (format " %s:\\(\\S-+\\)" opt) v))
(setq val (match-string 1 v))
(setq val default))
(cond
1. Export hangs during LaTeX export. That was a bug using an empty
regular expression that was defined only locally in Org files, but
not in the buffer used by the LaTeX exporter.
2. Underscores in links can get special treatment by the LaTeX
exporter. Now the link is protected from this.
When including s file in example or src markup, you can now also
specify the switches for code references and line numbering that work
also when directly adding SRC or EXAMPLE blocks.
Reported by Manish.
The relative timer is now shown in the mode-line while running.
There is a new command to pause and continue it.
Thanks to Alan Davis for driving this change.
The variable `org-blank-before-new-entry' regulates if Org should
insert a blank line before a new entry, when making a new headline or
plain list item. Up to now, the possible values in each case where t
or nil, i.e. unconditionally do or don't insert a blank line.
Now each setting can also be `auto'. If this is the case, Org will
look if the current entry, of which the command creates a sibling,
does have a blank line before it. If yes, it will also make a blank
line. If not, it will not. This seems so useful that I have made
this behavior the default.