0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 08:10:43 +00:00
Commit graph

320 commits

Author SHA1 Message Date
Carsten Dominik 382eedaab4 Make sure the clocktable sees the first line of the buffer.
Org-mode still has a few operations that do not work well when the
first line of a buffer is a headline.  One was constructing the clock
table, but this one is eliminated by this patch.
2008-11-23 07:30:18 +01:00
Carsten Dominik ad62fc94e4 Fix mixup about interactive and non-interactive elisp links.
Patch by Christopher Suckling.
2008-11-23 00:35:20 +01:00
Carsten Dominik 33744b0de5 Allow one comment line before the first headline.
When the export skips the text before the first headline, we now
include the comment line before the first headline, if any.
This makes sure that we can specify an anchor for this headline.
2008-11-21 19:45:51 +01:00
Carsten Dominik a99a1814fa Enhance XEmacs compatibility by avoiding `indent-to' calls. 2008-11-21 17:44:05 +01:00
Carsten Dominik 6fbcc77e99 Fix customize definition so that it works also in XEmacs.
`org-refile-target' was using (const :tag), which can be confusing,
and XEmacs is actually confused by it.

So we now use (const :value :tag) instead.
2008-11-21 15:32:26 +01:00
Carsten Dominik db5c609be9 6.13pre04 2008-11-21 13:35:45 +01:00
Carsten Dominik 0a402deeb9 Fix bug with MEW case folder.
Reported by Harri Kiiskinen, fixed by Tokuya Kameshima.
2008-11-21 13:31:42 +01:00
Carsten Dominik 94e8fa7ca0 Remove "\\" during ASCII export.
"\\" at the end of a line marks forces line breaks for HTML and LaTeX
export.  ASCII export does preserve lines anyway, but these line break
indicators might still be present and need to be removed.

Reported by Rustom Mody.
2008-11-21 13:16:18 +01:00
Carsten Dominik 59f70c6ba6 Remove the "i:" prefix for ido-complete prompts. 2008-11-21 12:48:43 +01:00
Carsten Dominik 8a13a7704f Fix XEmacs compatibility problems. 2008-11-21 09:14:26 +01:00
Carsten Dominik 272a536080 Make it possible to have two spaces after some list bullets.
This patch introduces a new variable,
`org-list-two-spaces-after-bullet-regexp'.  It can be a regular
expression matching plain list bullets.  When it matches, changing the
bullet type will introduce two spaces instead of one after each
bullet.

For example,

   (setq org-list-two-spaces-after-bullet-regexp "[.)]")

will make two spaces after "1." and "1)".
2008-11-21 06:54:46 +01:00
Carsten Dominik da7b292ce9 More clean-up of the clock persistence code.
This patch compacts the persistence code.  It also make sure that no
variables outside Org's name space are created.  Finally, it makes
sure that the resumed clock is not hidden after a restart of Emacs.
2008-11-21 06:19:29 +01:00
Carsten Dominik ab20e602b1 Allow a second space after "1." bullet for line wrapping. 2008-11-21 06:00:42 +01:00
Carsten Dominik 0529c08e5b Do much more consistency checking when storing and resuming the clock.
Saving the clock history and the running clock could lead to pointers
to non-existing buffer, or to dired buffers of directories.  This
patch implements more consistency checks.

It also allows a new value for `org-clock-persist'.  When this is
`clock', only the running clock, but not the entire clock history
is saved.
2008-11-20 17:54:26 +01:00
Carsten Dominik 461c9df562 Adapt indentation when bullet width changes.
Commands that modify the bullet style of a plain list, or that
renumber such a list may lead to changes in the width of a bullet.
The indentation of the lines below such a bullet is now automatically
adapted.

Also fixes a bug in bullet style cycling.
2008-11-20 10:03:31 +01:00
Carsten Dominik 06ec0e46ad Describe new modules in various places. 2008-11-19 17:33:23 +01:00
Carsten Dominik fb22510c1c Use the new minor mode to exit remember buffers.
Since we have now a minor mode in remember buffers, we use its
keymap also to exit and to abort the remember process.
2008-11-19 11:49:17 +01:00
Carsten Dominik 545ffe93b4 Fix some typos. 2008-11-19 10:03:01 +01:00
Carsten Dominik e51d317a21 New minor org-remember-mode, for extra keybindings.
This patch defines a new minor mode, `org-remember-mode', which is
turned on when Org-mode is used to handle a remember buffer.  This
provides a safe way to modify keybindings (in
`org-remember-mode-map'), without overwriting keys in `org-mode-map'.
Since Org put remember buffers into Org-mode, remember-mode-map will
be entirely ignored.
2008-11-18 20:32:01 +01:00
Carsten Dominik c60cf93d15 No ido completion for free prompts in remember templates.
do completion does not work well with values including white space,
which means we cannot use it in completion of values in remember
templates.  This patch turns it off for this application.

Report by Richard Riley.
2008-11-18 09:48:34 +01:00
Carsten Dominik 9f1e6fa952 Avoid error when ID is created in buffer without a file.
When ID's are created, Org tries to remember in which file the id is
located.  However, if an ID is created in a remember buffer, no file
is known.  This patch makes sure that this condition does not lead to
an error.
2008-11-18 08:59:39 +01:00
Carsten Dominik 627cc45e71 Fix bug with allowed property values for remember templates.
When an org-remember template inserts a property, the template-creating
function tries to support the user by retrieving a list of allowed
values to facilitate completion.  So far this was done by getting the
property with inheritance, ignoring that the cursor in the target file
buffer may not be in an entry at all.  So now we just look at the global
and file lists of allowed values.

Reported by James TD Smith.
2008-11-18 08:27:26 +01:00
Carsten Dominik b52ba29529 Improve file link matching.
Michael Ekstrand wrote:

    I've been trying to work with links to man pages in
    Org (using org-man.el).  When I try to create a link to a
    Perl module in the File package namespace, however,
    `org-insert-link' tries to do its same-file link detection
    and winds up breaking the link.  The result is that the link

       man:File::MimeInfo

    gets rewritten to

       file::MimeInfo

    Naturally, this isn't what I want.  Looking at
    `org-insert-link', it seems that the problem may be that its
    same-file link detection is matching 'file:' at
    beginning-of-word, which it is in this case.  In the general
    case for which 'file:' detection is being used, is there a
    reason to match against `\<' rather than `^' or
    `^[[:space:]]*'?  Changing to one of the latter two
    expressions would, I believe, keep it From rewriting these
    links I am trying to create.

Michael is right, and I have made this change.
2008-11-18 07:53:54 +01:00
Carsten Dominik 4a46ec644a New face or agenda datelines during column view.
The face `org-agenda-column-dateline' can be used to make datelines
with summaries look different from other column view lines.

Requested by George Pearson.
2008-11-17 17:49:58 +01:00
Carsten Dominik 6c32d29bbc Use index title as page tile, not as section. 2008-11-17 14:44:10 +01:00
Carsten Dominik 0d36db1d39 Avoid HTML processing of image specifiers in link descriptions.
A link to an image can function as the description part of a link, to
create a clickable image.  The corresponding image tag was
erroneously processed like normal text.  This patch protects such
descriptions from processing.

Reported by Richard Riley.
2008-11-17 08:14:53 +01:00
Carsten Dominik f926b09e0d Allow using ido-completion all around Org.
If you set the variable `org-completion-use-ido' to t, and if you have
ido-mode turned on, most instanced of completion in Org-mode will use
ido-complete.

Thanks to Samuel Wales and Eric Schulte for patches to this effect.
2008-11-17 07:52:07 +01:00
Carsten Dominik c210ba6d90 Fix issues with property time tests.
There was a bug in the implementation of the "<today>" tag for time
comparison during property matching, and new tags "<yesterday>" and
"<tomorrow>" have been introduced.

Patch by Piotr Zielinski.
2008-11-17 07:21:55 +01:00
Carsten Dominik f84ce1cecf Fix bug in search for text property. 2008-11-17 05:54:15 +01:00
Carsten Dominik 7797fec4b7 Fix bug in require htmlize code.
Reported by Daniel Clemente.
2008-11-17 05:51:32 +01:00
Carsten Dominik a4f9f8c93b Make invisible targets anchors in the headlines or items.
Org allows to define invisible anchors in a document in comment lines
like

If such a line is directly before or after a headline, previously this
anchor was removed, and all references to it were replaced with
references to the anchor that the headline had anyway.

Matthew Lundin pointed out that this makes it impossible to have
permanent links to headlines that can also be used from outside the
current page.

This patch changes his situation by adding the additional targets as
empty anchors to the section heading.  If works by creating, during
preprocessing, an alist with targets that do have aliases.  During
publishing, these aliases are looked up and converted into anchors.
In LaTeX export, these additional targets become additional labels.
2008-11-16 22:18:33 +01:00
Carsten Dominik 423ce71439 Fix bug with creating a new picture area.
The was a faulty regular expression in this function which never
matched, causing creation of a new picture area to mess up and start
the new area at the end of the previous line instead of the beginning
of the current.

Reported by Bernt Hansen.
2008-11-16 20:09:03 +01:00
Carsten Dominik d5d445d908 Install local link abbreviations when following link from agenda. 2008-11-15 15:58:02 +01:00
Carsten Dominik ecd801ab19 Avoid line </div> if there is no headline.
This is a bugfix.  When the number of headline levels was set to zero,
or if there was no heading at all in the export, the final closing
</div> should not be present.
2008-11-15 15:40:18 +01:00
Carsten Dominik 4954225ce3 Implement link translation.
This patch implements the possibility to translate links.
It can be useful if use both planner and Org-mode, if you sometimes
copy text from one side to the other and you do not want to worry
about link syntax.  This patch allows links created with planner to
function correctly in Org-mode.  I would probably be simple to
implement the reverse conversion in planner as well.

This patch is a first shot at this functionality and very likely can
be improved.
2008-11-14 14:13:48 +01:00
Carsten Dominik 38970e875f Restore the old iCalendar quoting for the time being.
The attempt to implement RFC2455 does seem to lead to problems with
some applications.
2008-11-14 08:21:07 +01:00
Carsten Dominik f9f3c27b13 Make `yank-pop' work after an adjusting tree yank.
Org's `org-yank' now identifies itself as being `yank' by setting
`this-command', and by making sure that the mark is set correctly.  In
this way, `yank-pop' will work correctly after using `C-y' in an
Org-mode buffer.  Org-mode does not have its own implementation, to
`yank-pop' will insert content plainly, without adjusting tree levels,
and without folding.

Samuel Wales pointed out that `yank-pop' doe not work anymore.
2008-11-14 07:49:08 +01:00
Carsten Dominik a33679ee5d Improve RFC 2445 compliance
iCalendar export has now improved compliance with RFC 2445.
Now all occurrences in data fields of the double quotes are replaced
by two single quotes, and any fields containing comma, colon, or
semicolon are quoted by surrounding them with double quotes.
2008-11-13 17:19:39 +01:00
Carsten Dominik 597a1be6e2 Allow '%h' in link abbreviations to insert a url-encoded target value
Patch by Steve Purcell.
2008-11-13 14:55:42 +01:00
Carsten Dominik ba0eeea11b Require vm-search in the org-vm functions. 2008-11-13 14:44:42 +01:00
Carsten Dominik 74a2ea6ee8 Install a better error message for the "Before first heading" error.
Org sometimes hits a "Before first heading" error.  This error happens
when `outline-back-to-heading' is called before the first heading in a
buffer.  In normal use, this is something easy to fix, because of
course you know where you are and you can identify the problem.

However, when Org scans many different buffers, for example to collect
agenda entries, you may not be able to tell easily where this error
happened.  This patch introduces a wrapper around
`outline-back-to-heading', with improving the error message by
spelling out buffer and location.
2008-11-13 09:54:30 +01:00
Carsten Dominik 6291ef8b7f Make sure that each <img> tag has an `alt' attribute.
XHTML validation requires hat each <img> tag does provide an
`alt' attribute.  This patch, based on a draft by Sebastian Rose, does
fix this.
2008-11-13 09:15:01 +01:00
Carsten Dominik 0000d4c477 Allow publishing to overwrite files.
This important patch makes sure that `copy-file' is allowed to
overwrite at the target location.

Patch by Sebastian Rose.
2008-11-12 23:57:45 +01:00
Carsten Dominik ea258dbdb6 Make agenda leaders for time ranges configurable.
Georg C.F. Greve asked for configurable leaders strings for agenda
display of time ranges.  This patch implements these strings, in the
new option `org-agenda-timerange-leaders'.
2008-11-12 12:57:42 +01:00
Carsten Dominik 29c5bfd7b5 Untabify ASCII image before returning to Org-mode.
When an ASCII image is edited with C-c ', it will in the end be quoted
by prepending colons to each line.  If tabulators are used in the
image, this may mess up the alignment.  Since tabulators are not a
good idea in ASCII images anyway, this patch makes sure that any
tabulators are replaced by spaces.
2008-11-12 11:48:46 +01:00
Carsten Dominik f5e3c482a2 Fine-tuning the behavior of `org-yank'.
Org-mode's `org-yank' command is used as a replacement for the normal
`yank' command.  It differs by giving special treatment to subtrees or
sets of subtrees when yanking them, by adjusting the level to fit the
outline, and by folding the trees after the yank.

This patch does fine-tune this behavior.

First of all, if any prefix argument is given to the command, it
immediately hands over the action to the standard `yank' command.  In
particular, you can use `C-u C-y' to yank as-is, with the only minor
side effect that the cursor will end up at the beginning of the yanked
text.

Secondly, the folding of the yanked trees will only happen if there is
no text directly after the insertion point that would be swallowed by
the folding process.  This was confusing in the past and is much
better now, with a message announcing that folding has been
suppressed.
2008-11-11 09:25:10 +01:00
Carsten Dominik dc43885102 Treat no effort defined as 0 minutes.
Bernt Hanses writes:

This changes the default value for Effort during agenda filtering so
that an undefined Effort value is treated as 0 instead of nil.  Tasks
with no effort defined now return zero effort when selecting tasks for
the filter.

There was effectively no way to select 'tasks with no effort defined'
using the agenda effort filter.  The '<' operator is interpreted as
'<=' and the default effort selection defined in
org-agenda-filter-by-tag starts with zero ("0 0:10 ...") so this
change just treats tasks with no effort defined the same as tasks with
an effort of 0.

This allows fast selection of NEXT tasks with no effort defined.
Column view with follow-mode active in the agenda is great for quickly
filling in the agenda estimated effort values for tasks.  Just display
your Next tasks, then / 0 to select tasks with no effort and enter
column mode (C-c C-x C-c) and fill in your effort values with the
quick keys (0-9) for all of the tasks that have blanks in the effort
column.
2008-11-11 06:56:32 +01:00
Carsten Dominik 3b9a16af0b Add Catalan and Esperanto language entries for HTML export. 2008-11-11 06:46:01 +01:00
Carsten Dominik 9a46feebfc Implement refiling for regions.
The refile command allows to move a subtree to under some other
heading, in the current file or even in a different file.

Sometimes one has a number of sibling subtrees that should all be
refiled to the same location.  This patch implements a simplification
for this process.  You can mark the region of subtrees (using
transient-mark-mode in required for this) and then move them all with
a single command.
2008-11-10 22:17:57 +01:00
Carsten Dominik e41a0d9608 Implement table formulas for clocktables.
Org-mode produces summaries of clocked items in the form of Org-mode
tables.  This patch implements the possibility to define formulas that
should be applied to the clock tables, in order to do additional
analysis.

Formulas for clock tables are supported in two ways.

First, a formula can simply be added by hand to a table.  Part of this
patch makes sure that, when the previous version of the table contains
a #+TBLFM: line, it will be copied to the new version.

Secondly, the clocktable definition allows a new parameter
`:formula'.  The string value of this parameter will be installed as
the formula line for the table.  If a formula parameter is given, it
will overrule any previous formula line.

As a special case, using the symbol `%' as the formula will install a
formula that will compute the fraction of total time that was spent in
a subtree.

In both cases, the formulas will be immediately evaluated after the
table has been created.
2008-11-10 20:57:48 +01:00