Commit graph

799 commits

Author SHA1 Message Date
Carsten Dominik 558abafab8 Column view: Improve line motion. 2009-03-10 17:45:22 +01:00
Carsten Dominik a2a7550591 Bugfix: Make sure TODO keyword is inserted at the right position
Wanrong Lin writes:

>  Suppose I have an org file with following lines:
>
>  * Test1
>  Test2
>
>  Now if I put the cursor at the beginning of the "Test2" line and
>  press "M-S-RET"  (Alt-Shift-Return on my machine), I got this:
>
>  * Test1
>  * Test2TODO
>
>  The "TODO" keyword was inserted at the end instead of the
>  beginning of the task text. This seems a bug to me.

Yes, this is a bug that occurs in the special case when the
heading stars are inserted in front of an existing line.  The
commit adds code to make sure the correct position is used.
2009-03-10 17:27:10 +01:00
Carsten Dominik 9382d960ca Publishing: New default for name of sitemap file: sitemap.org
The default for the sitemap file was "index.org" which is really
terrible because it will overwrite the index.html file.  Now the
default is "sitemap.org".
2009-03-10 08:18:30 +01:00
Carsten Dominik 792b9776d0 LaTeX export: Fix compatibility problem with Emacs 21. 2009-03-10 06:35:08 +01:00
Carsten Dominik 8d6d8dc2df Improve documentation 2009-03-09 08:44:36 +01:00
Carsten Dominik cd244078a0 Export: New in-buffer options to set content of meta tag data
New in-buffer options #+DESCRIPTION and #+KEYWORDS can be used to set
the corresponding meta tag entries in XHTML export.
2009-03-08 23:10:55 +01:00
Carsten Dominik 029fc74688 Agenda: Control how links are presented in added text.
Patch by Christopher Suckling.
2009-03-08 16:53:05 +01:00
Carsten Dominik 4f61af4445 Docbook export: More fixes. 2009-03-08 07:55:17 +01:00
Carsten Dominik 309d446968 Docbook export: Make changes to support docbook export 2009-03-08 07:49:51 +01:00
Carsten Dominik 7997cd7555 Export: Fix Safari/xml issues 2009-03-07 11:32:26 +01:00
Carsten Dominik 6d6a7cb916 HTML export: New option to turn off Javascript inclusion
It is now possible to turn off the inclusion of any javascript into
the HTML file.
2009-03-07 05:56:17 +01:00
Carsten Dominik a6d10bc848 Publishing: Copy attachment only if target directory is different 2009-03-06 17:43:11 +01:00
Carsten Dominik 0850b14c8f Clocktable: Use inactive time stamps for stepwise table
Adam Elliott writes:

>  When run in day-step mode, the clocktable header line for each day's
>  table contains an active timestamp.  I figure it should be an inactive
>  timestamp, since otherwise I get a junk entry in the agenda each day
>  (whatever heading was previous to the clocktable).
>
>  I'm talking about the output from a spec such as the following:
>
>  #+BEGIN: clocktable :block thisweek :step day

This commit is the patch Adam sent in.
2009-03-05 16:11:57 +01:00
Carsten Dominik 5faf13a071 Completion: Add missing #+ keywords for completion 2009-03-05 10:18:26 +01:00
Carsten Dominik 6ccc6b4652 Export: Fix problem with exporting message mode src regions
Message-mode assigns auto-safe file names to temporary buffers, in the
draft directory.  This causes problems when running message-mode in a
temporary buffer with with-temp-buffer.  When the form tries to kill
the buffer, is asks for saving it....

This commit turns off the buffer-modified flag and so avoids the
query.

Patch by Nick Dokos.
2009-03-05 00:01:50 +01:00
Carsten Dominik d685f0fc87 Mapping: Remove inheritance penalty when scanning for tags
Running a command that would use the tag scanner could suffer a large
slow-down when many entries match, because the tag list with
inheritance forces each matching entry to walk the hierarchy.

Now, it is possible to avoid this penalty by using the variable
`org-scanner-tags', or by binding the `org-trust-scanner-tags' to t
around calls to `org-get-tags-at' and `org-entry-properties' when
retrieving tags and properties for the current entry in the
scanner/mapper.
2009-03-04 11:38:02 +01:00
Carsten Dominik 3d02600149 Tags: Use internal tags list for agenda
An agenda item carries a full list of tags.  The list must normally be
made, but not during a tags scan.  So now the tags scan does pass on
its list instead, which should make things faster.
2009-03-04 09:46:19 +01:00
Carsten Dominik 7cd006b1d7 Tags: Make matches case-sensitive
Tags matches used to be case-insensitive.  But this causes too many
problems in the code, o from now on, tag matches will be
case-sensitive.
2009-03-04 09:21:45 +01:00
Carsten Dominik 3a959f9d30 Agenda: Fix bug with tag inheritance
Jeff Mickey writes:

>  Hey all,
>
>  To reproduce:
>
>  * TODO Make Bicycle :project:workshop:
>  ** TODO Buy stuff
>  ** TODO Build stuff
>  ** TODO Test stuff
>
>  (setq org-use-tag-inheritance t)
>  (setq org-tags-exclude-from-inheritance '("project"))
>
>  <C-a m> to type in a match string to search, I type in "project"
>
>  I expected to see:
>  TODO Make Bicycle
>
>  I saw:
>  TODO Make Bicycle
>  .TODO Buy stuff
>  .TODO Build stuff
>  .TODO Test stuff
>
>  I assume this isn't what is supposed to happen.  I'm currently at work
>  so I can't investigate and provide a diff, but it seems like there
>  needs to be a check in org.el:10144:org-get-tags-at to remove tags
>  that are explicitly excluded from inheritance.

This commit fixes the bug.
2009-03-04 09:11:39 +01:00
Carsten Dominik 3b396b0e77 Bugfix: Don't add CLOSED timestamp when repeating 2009-03-04 00:18:43 +01:00
Carsten Dominik 8c412ca71f Agenda: Allow custom commands to specify a filter preset.
Custom commands can now bind `org-agenda-filter-preset'.  This filter
will then be present in the agenda view and persist through refresh
and further filtering.  Only a new agenda command will remove the
filter again.
2009-03-03 15:41:15 +01:00
Carsten Dominik d8e4a35974 HTML Export: Make IDs valid
uuidgen ids may start with a number and therefore are not valid names
in HTML.  Therefore we now use and "ID-" prefix for such IDs when
exporting to HTML.
2009-03-03 14:06:11 +01:00
Carsten Dominik d3d2b3e835 Priorities: Allow specific faces for priority cookies
The variable org-priority-faces can now be used to set special faces
for different priority cookies.

Also, in the agenda, the default is now to fontify only the priority
cookie, not the entire task.  See the variable
`org-agenda-fontify-priorities'.
2009-03-03 12:44:53 +01:00
Carsten Dominik 23d9c79654 HTML export: Add validation link to page
An exported document can now have a link for XHTML validation
included.

Patch by Sebastian Rose
2009-03-03 10:57:33 +01:00
Carsten Dominik e688c534a8 HTML export: Find bibliography and move to to after the last section.
Before, the bibliography will exist inside the outline structure, as
part of the last section.  This commit adds code to find it, cut it
out, and move it to a better location.
2009-03-03 10:46:55 +01:00
Carsten Dominik a68eb4b1e6 HTML export: Add <div id="content"> around everything in <body> 2009-03-03 10:26:31 +01:00
Carsten Dominik a5b2a0c759 Documentation: Improve and collect documentation about the match view 2009-03-03 10:20:23 +01:00
Carsten Dominik f33787b7a8 Archiving: Fix new bug with archiving when heading is not given.
Reported by Ed Hirgelt.
2009-03-02 21:52:00 +01:00
Carsten Dominik 721dae7dd5 Bugfix: Better indentation for new clock/logbook drawers 2009-03-02 06:41:29 +01:00
Peter Jones 8b38105040 Conditionally delete windows in agenda quit
Before this patch, org-agenda-quit would delete the agenda window if
the frame had more than one window.  This patch changes that behavior
slightly so that if org-agenda-window-setup is 'current-window, the
agenda window won't be deleted.
2009-03-01 17:18:35 +01:00
Carsten Dominik 89e0d3608d Tags: Fix implementation of line breaks in fast tag interface
Patch by Christopher Suckling
2009-03-01 13:56:48 +01:00
Carsten Dominik 2b4788ae9d ASCII export: Fix issues with new link export 2009-02-28 21:56:55 +01:00
Carsten Dominik 7c92da7ba8 Archive: Fix bug when archiving to top-level
Org erroneously filed top-level headings as level 2, because it
assumes that if should file below some heading.  However, if there is
no heading to file under, this should be turned off.

Patch by igrekster.
2009-02-27 16:48:43 +01:00
Carsten Dominik 75ba44f877 Docs: Improve documentation for BBDB anniversaries 2009-02-27 08:27:44 +01:00
Carsten Dominik 06c40a9ad7 Lists: No automatic empty lines if empty lines terminate the list
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.
2009-02-26 22:30:23 +01:00
Carsten Dominik b4455950e3 Publishing: Fix bug with finding project for a file.
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.
2009-02-26 22:18:16 +01:00
Carsten Dominik f4d1d56046 Agenda export: Implement PDF export
The agenda can ow also be written to a pdf file.  This requires the
ps2pdf utility to be present on the system.
2009-02-26 21:19:11 +01:00
Carsten Dominik aadcc50e00 Agenda export: Allow entry text to be inlined for export.
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'.
2009-02-26 20:56:26 +01:00
Carsten Dominik 7455d5aaf8 Improve some docstrings 2009-02-26 13:39:30 +01:00
Carsten Dominik fe03884553 ASCII export: Better link export.
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.
2009-02-26 12:59:10 +01:00
Carsten Dominik 3dba115548 Agenda: New option to stop searching headline for a time.
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.
2009-02-25 13:01:28 +01:00
Carsten Dominik f44631e70f Agenda: Make prefix argument to `org-agenda' optional.
This is to make it easier to call this function from lisp.

Patch by Eric Schulte.
2009-02-25 12:51:00 +01:00
Carsten Dominik 8b0d614702 Undo: Cluster self-insert characters for undo
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.
2009-02-25 12:46:09 +01:00
Carsten Dominik 21221dd564 Export: Fix bug with ending colon example
There was a bug that would not close a colon example properly if the
line after the example would not have the required space after the
colon.
2009-02-24 05:23:55 +01:00
Carsten Dominik 2512bc972d LaTeX Export: Better error message for emphasis alist conflicts 2009-02-22 20:51:19 +01:00
Carsten Dominik a93c5d2e2e Bugfix: Avoid raising buffer-modified flag during LaTeX export
This had, as usually, to do with changing text properties.

Report by Russel Adams.
2009-02-22 20:50:12 +01:00
Carsten Dominik 405186a16a Editing: Allow separate special settings for C-a and C-e
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.
2009-02-22 15:08:33 +01:00
Carsten Dominik 4138be27ba Bugfix: Avoid unnecessary empty line inserted by changing TODO entry.
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.
2009-02-22 13:44:01 +01:00
Carsten Dominik 9989e5f030 orgstruct++-mode: Make more visible in docs, parse item body
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.
2009-02-22 12:42:20 +01:00
Carsten Dominik 825efa1ef9 Better way to load uncompiled code for backtrace production
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.
2009-02-21 08:09:47 +01:00
Carsten Dominik 4be7e8e9b3 HTML export: Also wrap tags into classes.
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.
2009-02-21 08:02:46 +01:00
Carsten Dominik 8bd874cd30 LaTeX export: More tuning for the options import
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.
2009-02-20 23:04:29 +01:00
Carsten Dominik 081eabb3f6 Agenda: Fix bug with state change matching for log display
Reported by Matt Lundin.
2009-02-20 22:55:50 +01:00
Carsten Dominik 01a061c2fa Lists: Make promotion and demotion work on regions. 2009-02-20 17:20:46 +01:00
Carsten Dominik 40a38050fd Agenda: Fix remote editing of priorities from agenda.
There was a bug when the entry to be edited was invisible.
2009-02-20 09:30:31 +01:00
Carsten Dominik be7d0c4a6c Column view: Fix bug when editing TODO field.
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.
2009-02-20 09:12:10 +01:00
Carsten Dominik 3c121459b4 Completion: Allow spaces in some fields
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.
2009-02-20 08:12:47 +01:00
Carsten Dominik 933d88ef3e LaTeX Export: Define TeX macros for in-buffer settings
This commit implements the possibility to import the in-buffer export
options as TeX macros, like \orgTITLE, \orgAUTHOR etc.

Requested by Russel Adams.
2009-02-20 07:55:05 +01:00
Carsten Dominik 08788604e7 Agenda: Fix bug with dimming blocked tasks when subtree is hidden.
Reported by Paul Mead.
2009-02-19 15:47:26 +01:00
Carsten Dominik 06056781fe Agenda: Do not make tasks invisible if they are blocked by checkboxes.
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.
2009-02-19 11:12:52 +01:00
Carsten Dominik fa54d8104a Agenda: Fix problems with follow mode. 2009-02-19 10:40:08 +01:00
Carsten Dominik 6ab17902aa Bugfix: Protect line indentation in orgstruct-mode
(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.
2009-02-19 09:46:34 +01:00
Carsten Dominik 8b31b5e798 Tags: Implement newlines for fast tag interface
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
2009-02-19 09:43:51 +01:00
Carsten Dominik e6e3d97797 Checkboxes: Enforce sequential processing with ORDERED property
When the ORDERED property of an entry is set, checkboxes must be
completed in sequence.
2009-02-19 09:13:08 +01:00
Carsten Dominik c0cc9181db Added org-R.el to contrib/lisp/ 2009-02-18 17:23:47 +01:00
Carsten Dominik a55dd5a9e6 Docs: Mention more variables in the manual.
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.
2009-02-18 15:51:51 +01:00
Carsten Dominik 113bec9eeb Completion: Fix some issues with ido 2009-02-18 08:10:17 +01:00
Carsten Dominik 18a07a276d Deadlines: Deal with "incorrect" positioning of warning period 2009-02-18 01:13:11 +01:00
Carsten Dominik 950334edb3 Completion: Turn off ido.el for completing outline paths in steps. 2009-02-17 22:36:48 +01:00
Carsten Dominik 538a536d0d Quoting: Make =http:a.b.com= work as a quoted string. 2009-02-17 22:23:50 +01:00
Carsten Dominik b013bea1c9 Agenda: Prefix args can specify context to `org-agenda-show'.
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.
2009-02-17 21:46:41 +01:00
Carsten Dominik 8e8ad424b6 Export: Add forgotten space after section number. 2009-02-17 21:26:08 +01:00
Carsten Dominik bc74aecd8d Agenda: Improve window fitting while making a series of blocks
The agenda window was fitted after each partial command, which makes
no sense.  Now it is only fitted after the final block.
2009-02-16 19:13:20 +01:00
Carsten Dominik b44e3d05ee Agenda: Fix sorting by TODO state in block agendas
Christopher Suckling reports that todo state sorting doe not work in
block agenda.  The reason for this that the variable
`org-todo-keywords-for-agenda' which is supposed to be a lost of all
keywords of all buffers contributing to the agenda, is not correct
during the construction of a block agenda.

Therefore, this commit instructs the todo state comparison function to
refer back to the original buffer for a list of todo keywords.
2009-02-16 19:01:52 +01:00
Carsten Dominik a6c8fac4f9 Agenda: Make sure all entries have a todo-state property
This is needed for sorting, and I had forgotten to add this property
to tag scans, and to sexps.

Reported by Christopher Suckling.
2009-02-16 07:52:41 +01:00
Carsten Dominik 0dae1ba349 Agenda: Make overriding header one of the default option variables 2009-02-16 05:37:58 +01:00
Carsten Dominik 626e47ce7c Docs: Improve consistency of checkbox command description. 2009-02-15 22:34:19 +01:00
Carsten Dominik 43f9c50665 Bugfix: Make prefix arg with C-a, C-n work correctly.
The special implementation did not look at prefix arguments.

Reported by Ken Harris.
2009-02-15 22:07:59 +01:00
Carsten Dominik 6f2a247611 Bugfix: Make cycling work in plain list item at end of file
Reported by Wanrong Lin.
2009-02-15 21:32:54 +01:00
Carsten Dominik 1a488f9136 Lists: Fix renumbering lists where the first item is not a numbered bullet 2009-02-15 19:59:11 +01:00
Carsten Dominik fdf8ffc4f1 Lists: Avoid unnecessary buffer-modified
When fixing bullet types, bullets are now only replaced if they would
change, so if nothing changes, the buffer will remain unmodified.
2009-02-15 19:50:56 +01:00
Carsten Dominik ae5b0f5c44 Checkboxes: Make C-u C-c C-c C-c set the box to "[-]"
Requested by Chris Randle.
2009-02-15 10:00:44 +01:00
Carsten Dominik cac8788f35 Clocking: Capture clock in LOGBOOK drawer, abandon CLOCK drawer
Clock lines are now by default captured into the drawer LOGBOOK.  This
means that, if state notes are also captured into a drawer, they will
be mixed with notes.
2009-02-15 09:22:14 +01:00
Carsten Dominik b40671f31b Agenda: Fix incomplete docstring of `org-agenda'.
Reported by Jonathan Moore.
2009-02-13 23:21:10 +01:00
Carsten Dominik 1f1574c9a2 Hooks: New system to tap into context-sensitive keys
Org-mode has many context-sensitive keys.  A new hook system now
allows add-ons to add functionality to these keys for contexts that
are special for the add-on.

For example, if an add-on wants to use C-c C-c in a special context,
if must add a function to `org-ctrl-c-ctrl-c-hook' that will check for
the context and run its command when the context is present.
2009-02-13 22:59:37 +01:00
Carsten Dominik 2ba674092e Make autoloading of org-plot.el more stable 2009-02-13 17:34:34 +01:00
Carsten Dominik 304cb36530 Reverting: also handle id locations.
Saving all buffers will now also safe the id locations.
Reverting all buffers will now also reload the id locations.
2009-02-13 07:45:36 +01:00
Carsten Dominik edd2aab5ee Document the special meaning of LEVEL when `org-odd-levels-only' is used. 2009-02-12 21:22:26 +01:00
Carsten Dominik f939957dc1 State Notes: Allow capturing state notes in a drawer, LOGBOOK
Wanrong Lin writes:

     2. Can we put all of those state change history logging messages
        into a drawer like "STATE-HIST" (when the drawer is defined in
        org-drawers), so it is less intrusive in the file?

Yes we can.  This commit provides this functionality.  It introduces a
new drawer, LOGBOOK.  When the variable
`org-log-state-notes-into-drawer' is set, state change time stamps and
notes will go into this drawer, or another one specified by that
variable.
2009-02-12 18:29:56 +01:00
Carsten Dominik a625558f07 State Notes: Fix indentation when adding to end
When the variable org-log-states-order-reversed was nil, so that notes
would be appended to the list of notes, the indentation of the item
was wrong.  This commit fixes the problem.
2009-02-12 18:29:56 +01:00
Carsten Dominik d8780dbbee HTML export: Allow special colors for each TODO keyword
Wanrong Lin writes:

    Right now in the HTML export the TODO keywords have either
    class="todo", or class="done". That loses all the face properties
    in the original TODO keywords. I think the TODO keywords faces are
    important visual aids to differentiate different types of TODO
    items, so I just wonder whether it is possible to keep the faces
    in the HTML.

This makes sense.  This commit adds, to each TODO keyword, an
additional class named after the keyword.  For example:

  <span class="todo WAITING">WAITING</span>

So each todo keyword gets class "todo" or "done" depending on which
general type it is.  And in addition it gets itself as class.

So go to your CSS file and configure like this:

.todo { font-weight:bold; }
.done { font-weight:bold; }
.TODO { color:red; }
.WAITING { color:orange; }
.DONE { color:green; }

Thanks to Sebastian Rose for the multiple-classes trick.
2009-02-12 18:29:06 +01:00
Carsten Dominik c32de18ae0 Allow previous state to be shown in state change log notes.
Wanrong Lin writes:

     My TODO sequence is set up as following:

     (setq org-todo-keywords '((sequence "TODO(t)" "STARTED(s!)"
     "WAITING(w@/!)"      "MAYBE(m/!)" "DELEGATED(g@/!)"
     "DEFERRED(d!/!)" "HOLD(h!/!)" "|" "DONE(x)"      "CANCELED(c)")))

     The state change logging is great, but I wonder whether we can
     further improve it:

     1. Can we also include the original state in the log message?
     i.e.: instead of having      - State "DEFERRED"   [2009-02-11 Wed 11:38]
     we can have
     - State "DEFERRED"  from "HOLD" [2009-02-11 Wed 11:38]

     The message will be clearer, and useful even when somebody edited
     the TODO keyword in place without using the "org-todo" command
     (in that case, simply looking at all the "destination states" in
     the log message does not give us the right information).

This strikes me like a good idea, so I have implemented it with this
commit.
2009-02-12 09:48:07 +01:00
Carsten Dominik 651d2e7a14 Bugfix: Allow org-clock-into-drawer to be 1. 2009-02-11 16:17:38 +01:00
Carsten Dominik f993ecd67d Daniel Clemente writes:
Consider a file with 2 lines:

     ------------------
     **** heading

     ------------------

      Place the cursor at line 2 (where you can type). Then use C-c C-x C-i
      to start a clock.

      You have now 3 lines:

     ------------------
     **** heading
         CLOCK: [2009-02-07 sb 01:06]

     ------------------

      However, the cursor is still placed at line 2, like before. I think
      it would be more useful if it were moved to line 3 so that you can
      start writing right away, just as before.  This saves you the C-n
      needed to move again to a blank line.

This commit implements exactly this request.
2009-02-11 15:01:13 +01:00
Carsten Dominik 621bafc1b5 Clocking: Make insertion of the CLOCK drawer safer
Daniel Clemente noticed that the clock drawer, when it is created for
the second clock entry, will swallow a plain list item after it,
because it thinks it might be a clock note.

This commit makes this function check for indentation.  If the plain
list item is indented less than the last clock line, it will be
assumed that it does not belong to the clocking line, and the drawer
will not swallow the item.
2009-02-11 14:41:22 +01:00
Carsten Dominik c9e266b0ec HTML Export: Add CSS classes for section numbers 2009-02-11 10:25:06 +01:00
Carsten Dominik a599bca287 Agenda: Add new skip conditions to choose menu. 2009-02-10 20:21:33 +01:00
Carsten Dominik ce42b4be86 Agenda: New command to revert all Org-mode buffers from files 2009-02-10 20:21:27 +01:00
Carsten Dominik b00df4025e Label `org-tab-follows-link' as deprecated. 2009-02-09 12:46:31 +01:00
Carsten Dominik 2d795f8ae0 TODO: Make in-buffer keyword setting more general
Now any line like

  #+XYZ_TODO:

will be assumed to define some kind of TODO chain.  If the handlers in
`org-todo-setup-filter-hook' do not do anything with this sequence, it
will be treated as `sequence'.
2009-02-09 12:36:06 +01:00
Carsten Dominik aeba61e640 Implement org-return-follows-link directly in `org-return'.
This used to depend on the mouse map, but I no longer think this is a
good idea.  So the function org-return now directly handles this case.
2009-02-09 12:15:19 +01:00
Carsten Dominik 8be2c90ead Export: Fix problem with => in clock lines triggering verbatim text.
Reported by Daniel Clemente.
2009-02-07 12:33:37 +01:00
Carsten Dominik 521281bf3d Export: Count levels relative when doing subtree export.
William Henney writes:

    Consider a structure like this:

    * first
    ** second
    *** third
    **** fourth

    Currently, if I export the "third" sub-tree to html (via "C-c @
    C-x C-e h"), then "third" becomes an <h1> heading, but "fourth"
    becomes an <h5> heading. I would rather it were <h2>, i.e. that
    all heading levels be relative to the root of the sub-tree. Is
    there any way to achieve this?

This was not possible so far, but this commit measures the first
headline of the subtree and applies an offset to all level values.
2009-02-06 18:15:42 +01:00
Carsten Dominik 6eed51c304 Export: Fix regular expression for extracting drawers
Reported by Rainer Stengele.
2009-02-06 17:14:34 +01:00
Carsten Dominik 5f68200625 Tables: Allow sorting inactive time stamps.
Hsui-Khuern Tang writes:

   I have a table where one column consists of inactive dates, such as
   this:

     | Date             | OK? |
     |------------------+-----|
     | [2009-01-30 Fri] | x   |
     | [2009-01-27 Tue] | x   |
     | [2009-01-28 Wed] | x   |

   I can't sort the table by that column.  If I change the dates to
   active, then sorting (by time) works fine.  Is this behavior
   intentional?

Yes, intentional, because the same routine also does sorting of
entries and should prefer active time stamps.  However, I realize that
we can still look for an inactive time stamp when no active one can be
found.   This is what this commit implements.
2009-02-06 16:50:35 +01:00
Carsten Dominik 717c7b22f5 Column View: Fix bug with capturing column view. 2009-02-06 15:01:36 +01:00
Carsten Dominik 477141d43c Export: Fix bug with exporting text before first heading
Skipping text before the first heading was broken, now it works again.
2009-02-06 12:44:52 +01:00
Carsten Dominik 44ed0394c4 Export: Stop LaTeX fragment processing in protected examples
LaTeX fragments like math environments were still matched inside
protected code examples.  Fixed now.
2009-02-06 08:24:18 +01:00
Carsten Dominik 5e9d37949b Export: Use color values in CSS for validation. 2009-02-04 23:54:46 +01:00
Carsten Dominik 723ac9ab57 Pullback: org-return-follows-link back to nil.
Setting this to t causes some issues which I need to think more
carefully about.
2009-02-04 23:48:36 +01:00
Carsten Dominik be9557bf44 Allow chaining sibling's scheduled time.
Patch by Andrew Hyatt

Andrew Hyatt writes:

    I like to schedule items I'm supposed to be working on, so I like
    when I complete a task that the next sibling task gets the
    schedule from the previous one.  This implements that kind of
    workflow with the org-depend contrib package.

    I've also added a few methods to org.el to make working with
    schedules & deadlines easier.
2009-02-04 15:37:58 +01:00
Carsten Dominik 4e973c6b82 Agenda: New skipping conditions timestamp and nottimestamp.
The org-agenda-skip-xxx-if functions can now also handle a `timestamp'
and a `nottimestamp' condition.
2009-02-04 15:19:21 +01:00
Carsten Dominik 0edabb9408 TODO statistics: Fix bug with counting and hook calling
When there were multiple cookies in a headline, the counting would be
double.  Also the hook got called always, even if no cookie was
present.
Fixed now.
2009-02-02 21:40:29 +01:00
Carsten Dominik c11a0b2de9 Dependencies: Make them work reliably even if variables are set too late.
Turns out a number of people set their variables too late so that
activating dependencies does not work correctly.  We now double-check
in the mode hook that everything is in order.....
2009-02-02 13:47:18 +01:00
Carsten Dominik 2d2359741a LaTeX export: Do not use "|" as verbatim delimiter
This causes problems in tables.

You have now two ways to make verbatim things.  Use ~xyz~ or =xyz=
depending on whether ~ or = might occur in the string......
2009-02-02 12:17:16 +01:00
Carsten Dominik a9618e4e45 Export: Fix XHTML validity problem with figure divs 2009-02-02 12:08:23 +01:00
Carsten Dominik 2949012f0f Change default values of some variables. 2009-02-01 23:49:03 +01:00
Carsten Dominik bb95b83162 Agenda: Keep org-depend from setting its tag when only checking for blocking.
When org-depend.el is loaded, running the blocker hook will already
toggle a tag.  However, when dimming the agenda, we do not want that.

Reported by Dan Griswold.
2009-02-01 00:15:29 +01:00
Carsten Dominik febdb2df76 HTML Export: Use better id for the footnotes div.
The id for the footnotes div is now called "text-footnotes", not
"footnotes-text", to be more consistent with other divs used in
Org-mode.

Requested by Sebastian Rose.
2009-01-31 22:43:39 +01:00
Carsten Dominik dc6658d9ed Blocking: Make it possible that checkboxes block TODO state changes
See the documentation for details.
2009-01-30 18:31:31 +01:00
Carsten Dominik f99b00f61c Release 6.20g 2009-01-30 09:20:41 +01:00
Carsten Dominik 99221708a3 Agenda: Fix bug with calling `org-agenda-todo' in a non-interactive way. 2009-01-30 07:38:02 +01:00
Carsten Dominik 19bda1c361 Export: LaTeX fragment images are inlined again. 2009-01-29 14:12:51 +01:00
Carsten Dominik c5a596bee7 Export: Do not remove drawers in protected examples.
Export used to remove drawers in examples.  This is fixed now.
2009-01-29 10:37:40 +01:00
Carsten Dominik e793fd8831 Dependencies: Key bindings and Menu entries
This commit adds a key (`C-c C-x o') to toggle the ORDERED property of
a tree.  And it adds menu entries for doing this, which also reflect
the current state of the tree.
2009-01-29 10:23:09 +01:00
Carsten Dominik 80514f743e Dependencies: Add completion support for ORDERED. 2009-01-28 17:22:59 +01:00
Carsten Dominik a79d36f2aa Statistics: Update more than one statistics cookie
When a line now contains several statistics cookies, all of them will
be updated.

Jari Aalto submitted a patch to this effect which I did end up not
using.  Thanks anyway!
2009-01-28 17:21:15 +01:00
Carsten Dominik ef020f221e Bugfix: Ignore again scheduled tasks. 2009-01-28 14:35:07 +01:00
Carsten Dominik 10ea33b5bc Bugfix: Make sure TODO selection does not move point. 2009-01-28 14:03:45 +01:00
Carsten Dominik bc7007b893 Checkboxes: New command to add and remove them easily from items
See documentation changes for details.
2009-01-28 12:28:21 +01:00
Carsten Dominik b81f597de0 Release 6.20 2009-01-28 09:30:12 +01:00
Carsten Dominik a89bbe5cab Clocktables: Fix display of ISO week.
David Bremner writes:

    I have a clocktable that begins like this.

    #+BEGIN: clocktable :maxlevel 2 :block 2009-W05 :scope agenda-with-archives
    Clock summary at [2009-01-27 Tue 17:15], for week 2009-W04.

    [contents snipped]

    #+END:

    Whatever week I put in :block, it puts one less in the title.  It
    seems actually gather the clock data from the right week, but the
    title is wrong?  Or I misunderstand something as usual :-).

There was a problem wit the week starting date.
2009-01-28 09:24:51 +01:00
Carsten Dominik 5ce21d77df Bugfix: Make option completion work in indirect buffers
Reported by Shaun Johnson.
2009-01-28 09:11:21 +01:00
Carsten Dominik 49e8ee37a8 Dependencies: Integrate John Wiegley's TODO dependency code.
See the documentation for details.
2009-01-28 09:02:37 +01:00
Carsten Dominik 452f7352f6 Maintenance: Cleanup and minor fixed. 2009-01-27 11:42:32 +01:00
Carsten Dominik 7a202e6100 Bugfix: Fix property-driven startup visibility
A user setting of

  (setq org-show-entry-below t)

could overrule a visibility property with value FOLDED.  This commit
fixes this by turning off the above setting for the context of setting
startup visibility.
2009-01-27 07:36:01 +01:00
Carsten Dominik f0899954a3 Shift-selection: More tweaking
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.
2009-01-27 07:24:23 +01:00
Carsten Dominik 773a3c624e Support for Shift Selection
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.
2009-01-26 16:23:44 +01:00
Carsten Dominik f31255c8f3 Maintenance: Remove unused variables. 2009-01-26 11:04:45 +01:00
Carsten Dominik d438d616b7 Export: Fix timestamp processing
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.
2009-01-26 07:36:01 +01:00
Carsten Dominik 2ccea84c96 Compatibility: Make new face compatible with XEmacs 2009-01-25 22:09:06 +01:00
Carsten Dominik 41db8545a8 Maintenance: Support delete-selection-mode' also for org-yank'.
Patch by Steven E. Harris
2009-01-25 18:36:56 +01:00
Carsten Dominik 866176e0ee Export: Don't interpret \par when it is protected 2009-01-25 14:17:59 +01:00
Carsten Dominik 3667772d15 Export: Interpret \par for HTML export.
"\par" will now be translated into "</p ><p >", so that this can be
used inside a footnote.
2009-01-25 13:31:37 +01:00
Carsten Dominik 4260aad09d Maintenance: Fix declarations and necessary require statements. 2009-01-25 13:07:23 +01:00
Carsten Dominik 2ad63638b5 Export: Remove extra space before colon examples. 2009-01-25 07:43:52 +01:00
Carsten Dominik 3fed83614e Agenda: A tags-todo search can now ignore timestamped items
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=.
2009-01-25 07:39:26 +01:00
Carsten Dominik da11423d21 Export: Escape HTML characters in examples. 2009-01-24 16:41:34 +01:00
Carsten Dominik 0cc3cfd680 Maintenance: Fix copyright notice in org-rmail.el 2009-01-24 12:27:05 +01:00
Carsten Dominik 20dbb0c73f Footnotes: Fix some minor issues. 2009-01-24 12:25:36 +01:00
Carsten Dominik e793158bc8 Tables: Support for references to remote tables
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".
2009-01-24 10:51:21 +01:00
Carsten Dominik a167da89d1 Bugfix: Fix an incorrect face definition. 2009-01-22 10:24:09 +01:00
Carsten Dominik 7d05ba72c8 Clock: Independent face for clock overlay display.
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.
2009-01-22 07:27:36 +01:00
Carsten Dominik 19351e35c2 Version number: pushed to 6.18trans 2009-01-21 17:59:42 +01:00
Carsten Dominik ae34f0beb3 Export: Include "<" in the options template.
`C-c C-e t' inserts a template with options.  Ian Barton reported that
this template was not complete, the timestamp switch "<" was missing.
2009-01-21 17:56:48 +01:00
Carsten Dominik ac2347589e Structure editing: Improved item/headline conversion
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.
2009-01-21 17:45:07 +01:00
Carsten Dominik c5338b69d7 LaTeX export: Properly protect entire LaTeX environments
LaTeX environments should be left as they are, fully protected.
There was a regular expression error in the code doing this.
2009-01-21 10:23:49 +01:00
Carsten Dominik 0e46dc3f9c LaTeX Export: Allow class definition in property
When exporting a region starting with a headline, a LaTeX_CLASS
property in that entry will be honored.

Requested by Robert Goldman.
2009-01-20 09:07:35 +01:00
Carsten Dominik 0ce821c5c4 LaTeX export: Make quotes exported right before a footnote reference.
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.
2009-01-20 08:26:44 +01:00
Carsten Dominik ff85ca95db Export: Optionally use <textarea> for example export.
Examples and src block can now be exported as <textarea> elements to
HTML if this is desired.  See the documentation for more details.
2009-01-19 23:13:58 +01:00
Carsten Dominik 0405dde8ef Footnotes: Avoid matches in links.
Reported by Ian Barton.
2009-01-19 16:15:12 +01:00
Carsten Dominik bc530157aa Export: Keep relative path to image relative also after LaTeX export.
Reported by Manish.
2009-01-19 15:59:03 +01:00
Carsten Dominik e76dd96fce Bugfix: No "language" attribute in <script> tag.
Reported by Sebastian Rose.
2009-01-19 14:30:42 +01:00
Carsten Dominik 9aa72230a2 Agenda: Allow typing a question mark in an agenda query string
Reported by Paul R.
2009-01-19 10:40:38 +01:00
Carsten Dominik be6c0959bb Attachments: Allow user-chosen directory and inheritance
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.
2009-01-19 08:42:38 +01:00
Carsten Dominik 33897c104b Bugfix: Use `window-full-width-p' correctly. 2009-01-18 21:21:29 +01:00
Carsten Dominik 03d324ac2b Export: Better detection of images that can be inlined.
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.
2009-01-18 19:14:10 +01:00
Carsten Dominik 19421c2513 Agenda: Make block separator configurable.
The new option `org-agenda-block-separator' can be used for this.
2009-01-18 08:22:18 +01:00
Carsten Dominik fee4492f57 Export: Fix bug with LaTeX export of tables.
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.
2009-01-17 15:07:10 +01:00
Carsten Dominik 1edd9d0cc6 Plotting: Fix histogram plotting.
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.
2009-01-16 19:43:33 +01:00
Carsten Dominik b95178f38e Column View: Catch it when a date property does not have allowed values defined.
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.
2009-01-16 12:50:09 +01:00
Carsten Dominik 8cb1d66f86 Mapping: Restore point and restriction in current buffer.
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.
2009-01-14 21:22:37 +01:00
Carsten Dominik bc8a90da1d Bugfix: Make sure property time comparison works correctly.
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.
2009-01-13 10:33:50 +01:00
Carsten Dominik 74a4244db1 Archiving: Allow file name interpolation in target headline
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.
2009-01-11 21:51:53 +01:00
Carsten Dominik 5a8f775d79 Archive: Avoid problems when multiple files use the same archive.
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.
2009-01-10 21:51:08 +01:00
Carsten Dominik 703be2056c Maintenance: Better implementation of `fit-window-to-buffer'.
This function now uses `window-full-width-p' to check if the window
has the full width.
2009-01-09 09:09:42 +01:00
Carsten Dominik b3d6d903bc Export: Better handling of colon examples.
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.
2009-01-09 08:28:43 +01:00
Carsten Dominik 907d548353 Utilities: New function `org-heading-components'.
This is a new function that returns the contents of the current
heading, already analyzed.
2009-01-08 23:19:50 +01:00
Carsten Dominik 32ba462be1 Export: Make id: links work after export.
id: links to entries in other files will now work after export to
HTML, provided that the published target file is on the same relative
path.
2009-01-08 22:35:57 +01:00
Carsten Dominik 41bd25b724 Bugfix: Protect string-match against nil string.
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
2009-01-08 15:35:32 +01:00
Carsten Dominik e3eac575bf Export: Fix bugs with LaTeX export.
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.
2009-01-08 14:25:26 +01:00
Carsten Dominik c170516b5f Export: Make switches for literal examples work in include files.
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.
2009-01-08 12:10:47 +01:00
Carsten Dominik 1371205fc2 Maintenance: Rename some ill-named functions. 2009-01-08 11:19:37 +01:00
Carsten Dominik b0f848e873 Timer: Pause and continue, and mode-line display.
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.
2009-01-08 11:07:27 +01:00
Carsten Dominik 15ad97ac3c Editing: Automatic empty lines before new entries.
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.
2009-01-08 09:30:55 +01:00
Carsten Dominik d31ebe2c98 Export: Do not HTML process URLs when they are also used as descriptions. 2009-01-07 13:25:46 +01:00
Carsten Dominik e0bc2c7528 Bugfix: Deadlines with yearly repeat.
Bernt Hansen writes:

    I've been bad and let a couple of my overhead tasks slip past
    their deadline dates.

    *** TODO Q1 Accounting: October
       DEADLINE: <2008-11-30 Mon +1y>
       - CLOSING NOTE [2008-01-30 Wed 12:18]

    This task does not show up on my agenda anymore (probably because
    the year changed).  If I change the deadline entry to this:

       DEADLINE: <2008-11-30 Mon>

    then it shows up as 37 days late.  I'm bringing this up as soon as
    I noticed it just so people are aware of this.  I have a few of
    these tasks that just dropped off my agenda (probably at the
    beginning of the year).

This interesting bug seems only to happen when the repeat is yearly,
and after crossing the December 31st year boundary.  It was a sorting
issue - Org-mode (in the function `org-closest-date') computes two
dates that are consistent with the repeater, one before and one after
the target date.  When the computation is done with a preference for
the past date (as it happens for deadlines), it should use the earlier
date.  In fact, it did choose "n1", assuming that it was the earlier
one.  This assumption does hold for daily, weekly and monthly
repeaters, but not for yearly ones.

This commits make sure that "n1" always holds the earlier date, so
that the logic at the end of the function works again.
2009-01-06 23:32:16 +01:00
Carsten Dominik 9dc65e4811 LaTeX Export: More standardization
This commit removes some of the stuff that was specific for the LaTeX
exporter, and falls back to the default configuration that works for
all backends.

Here is what the commit does:

- The variable `org-export-latex-remove-from-headlines' is now
  obsolete.  Instead, also LaTeX export now responds to the settings
  in the variables org-export-with-todo-keywords',
  `org-export-with-priority', and `org-export-with-tags' and in the
  corresponding OPTION settings.

- Removal of time stamps and related keywords now already happens in
  the preprocessor, so that it will be perfectly the same for all
  backends.

- The list functions have been extended to accept an additional
  parameter list, to overrule the default setting for a particular
  list function.  This is used to make the checkbox appearance in
  LaTeX configurable, through the new variable
  `org-export-latex-list-parameters'.
2009-01-06 17:31:44 +01:00
Carsten Dominik 3bfed1ed35 LaTeX export: Better analysis of math environments
We now use the export preprocessor to identify all math snippets in
advance, this is superior to calling org-inside-LaTeX-fragment-p from
the inside.
2009-01-06 12:56:30 +01:00
Carsten Dominik c52ec32582 org-w3m.el: Always deactivate the mark after copying.
Patch from Andy Steward.
2009-01-06 09:54:17 +01:00
Carsten Dominik 52ee4c0bd2 Agenda: Have series options available when finalizing agenda.
An agenda series can have a set of global options.  Matt Lundin
reported that these options to not work completely.  There reason was
that, when calling `org-finalize-agenda' for a series, the dynamic
binding of those options was already off again.  This commit makes
sure that these bindings are available also during this final step.
2009-01-06 09:47:45 +01:00
Carsten Dominik 389419334d Export: Protect examples from headline processing
Lines that looked like headlines in examples could still be processes
as headings.  This commit make sure all converted examples are
protected.
2009-01-06 09:37:34 +01:00
Carsten Dominik e30bf26061 Bugfix: Fix regexp
The regular expression org-complex-heading-regexp had an error,
it would also match lines where there is no space after the stars.
2009-01-06 09:37:34 +01:00
Carsten Dominik 1a3abc8018 Coderefs: Revamp label syntax.
This commit revamps the syntax used for code line references in
literal examples.  See the documentation for details about the new
format.
2009-01-05 13:25:21 +01:00
Carsten Dominik f6fa33eceb Remember: Show context when jumping to previous storage location
When using "C-u C-u M-x org-remember RET" in order to jump to the last
storage location, the code failed to show the matching entry.  This
commit makes sure that at least the headline of the last remember note
is made visible.
2009-01-05 13:18:28 +01:00
Carsten Dominik c0100ad2b1 Footnotes: Fix bug with insertion at end of buffer
With the "* Footnotes" heading as last line in the buffer, footnote
insertion did not position new definitions correctly.  This commit
fixes the problem.

Reported by Matt Lundin.
2009-01-05 13:15:12 +01:00
Carsten Dominik feef4db6d3 org-w3m.el: Minor updates and fixes.
This commit adds an option to org-w3m, to decide whether the mark
should be deactivated after copying the region.

New version from author Andy Steward.
2009-01-04 08:36:38 +01:00
Carsten Dominik 3559b2dc93 Footnotes: Activate labels as links
This commit add a new face for footnote labels, and activates footnote
labels for mouse clicks and for `C-c C-o', to jump to the
corresponding reference or definition.
2009-01-02 16:28:35 +01:00
Carsten Dominik 9255522b91 Footnotes: Allow "-" and "_" in footnote names.
These characters are now allowed in addition to word constituents.
2009-01-01 10:59:11 +01:00
Carsten Dominik 1ed9c50457 Export: Fix some problems with protection.
The previous changes had created problems with lines stating with a
colon, there where no longer protected.  They are now again.
2009-01-01 09:55:54 +01:00
Carsten Dominik df07e0a4f3 Export: New hooks for preprocessing
This patch introduces more hooks for preprocessing the export buffer,
at various strategic moments.  See the Changes.org file for a
description of the hooks.
2008-12-31 18:37:33 +01:00
Carsten Dominik d9c47b107f Bugfix: Indentation for converted headlines with `C-c -' 2008-12-31 01:22:57 +01:00
Carsten Dominik 71aeeec70a Footnotes: Add ChangeLog entries. 2008-12-31 01:21:48 +01:00
Carsten Dominik 3018b775e2 Coderefs: Add ChangeLog entries. 2008-12-26 23:23:39 +01:00
Carsten Dominik 28c6318dba Remember: Safer way to access new buffer.
The remember handler was creating a buffer with `find-file-noselect',
and then trying to find it back using `get-file-buffer'.  Apparently
there are situations where this can fail, to we now use directly the
buffer returned by `find-file-noselect'.
2008-12-23 07:16:10 +01:00
Carsten Dominik 76e18b30e9 Remember: Fix bug cause by expand-file-name on nil file. 2008-12-23 06:15:04 +01:00
Carsten Dominik 951d117a47 Spreadsheet: Don't assume every last row filed has a formula
In a recent patch we have introduced names for all fields in the last
row.  This has lead to a bug, that Org thinks there might be a field
formula associated with those fields.  Now we check if there really is
one, and only in this case ask to overwrite it with a column formula.

Report by Henry Atting.
2008-12-22 23:10:32 +01:00
Carsten Dominik 2deee3e6e4 Column view: Capture also from locations in other files.
The dynamic block capturing column view has an :id parameter that does
select from where the column view should be captured.  The routine
searching for this entry so far only searched the current file, now it
uses the full ID API to find the entry also in another file.

Furthermore, a value "file:path/to/file.org" will capture the global
column view of that file.

Report by Francois Lagarde.
2008-12-22 08:56:42 +01:00
Carsten Dominik 23856be044 Completion: Improve docstring of option `org-completion-use-ido'. 2008-12-21 11:23:06 +01:00
Carsten Dominik 9f0060acc2 LaTeX export: Fix two bugs.
1.  When LaTeX export was done with a time-stamped file, a format
    error in the timestamp format caused the output file to not
    have the % comment in front of the time string.  As this line
    is early in the file, a LaTeX error would result.

2.  Replacement of some special characters could fail.  Strangely
    this shows up only in XEmacs, but it still is a bug.

Both bugs were reported by Hugh Daschbach.
2008-12-21 11:00:05 +01:00
Carsten Dominik fcad0fbc4e Refile: Compare expanded file names
When refiling to the current file, the completion commands do not show
the file name.  This was broken because I had switched from comparing
truenames to normal names. Now I am using expanded names, this is fast
and works well.
2008-12-20 11:10:12 +01:00
Carsten Dominik e092a5ba91 Integrate changes from downstream Emacs. 2008-12-20 09:56:52 +01:00
Carsten Dominik 9c042e68e8 Faces: Force initialization of the tags-faces-regexp.
When `org-tag-faces' is set too late, the regexp
is not initialized properly.  This patch makes sure it is
initializes anyway.
2008-12-19 21:36:06 +01:00
Carsten Dominik 9ac252830d Agenda view: Make sure tags have the correct case.
Reported by Wanrong Lin.
2008-12-19 18:46:25 +01:00
Carsten Dominik 9011bd9303 Fix some small bugs. 2008-12-19 18:36:53 +01:00
Carsten Dominik dadc9a1af1 Tables: Implement last-row references.
After the failed implementation of `@0' as a reference for the last
line, this is a second attempt to provide such references.  I would
have liked to allow `@last' as the reference, that would have been
beautiful.  However, too many regular expressions directly search for
`@' followed by a number, so this is too hard to implement.

Therefore, I am now turning the last row into a row of implicitly
named fields.  From now on, $LR1, $LR2,... can be used to refer to
fields in the last row.  These names may also appear on the left hand
side of formulas.
2008-12-19 18:28:58 +01:00
Carsten Dominik 14ef6932e4 Store link: Capture description for ID links.
Creating links with org-store-link in org files did not capture the
link description (the headline).  Fixed with this patch.  Report by
F.D. Friedrichs.
2008-12-19 16:40:12 +01:00
Carsten Dominik c668817bf3 Revert "HTML export: Remove the name attribute from anchors that do not need it."
This reverts commit 642620ebb3.
2008-12-19 15:06:47 +01:00
Carsten Dominik 642620ebb3 HTML export: Remove the name attribute from anchors that do not need it. 2008-12-19 12:50:36 +01:00
Carsten Dominik 1b655ff4af Fix problem with <pre> of source code inside a paragraph. 2008-12-19 12:46:46 +01:00
Carsten Dominik db2485cb41 Fix invalid <img> tag. 2008-12-19 12:38:17 +01:00
Carsten Dominik a53ea4e72b New command org-ido-iswitchb.
Patch by Chris Leyon.
2008-12-19 06:14:55 +01:00
Carsten Dominik 9cd1518bad Allow to view full entry from agenda.
A prefix argument to the `org-agenda-show' command is now interpreted
to make sure the entire entry is made visible in the other window, not
only the headline.
2008-12-18 09:22:21 +01:00
Carsten Dominik f796043bf1 Add a COMPARE-FUNC argument to the internal sorting routine.
Patch by John Wiegley.
2008-12-18 09:14:13 +01:00
Carsten Dominik ff8ef0aa14 Fix bug with updating agenda lines with correct tags.
Updating agenda lines did display tags incorrectly, because it used
the list of tags available as a property to remake the list.  However,
that list contains down-cased versions of the tags, because all the
filtering in the agenda does ignore case in tags.

This patch implements a fresh scan for the tags each time a line is
updated, and in this way fixes the problem.  It also reverses a
previous attempt to fix a similar problem.
2008-12-18 09:03:06 +01:00
Carsten Dominik 821c4304c6 Fix bug in menu, for tags-setting command. 2008-12-18 00:34:11 +01:00
Carsten Dominik ec702aa4ba Release 6.15d. 2008-12-17 11:52:55 +01:00
Carsten Dominik d41340b1a0 Fix typo with variable name.
The variable `org-agenda-overriding-columns-format' was, in one place,
called `org-overriding-columns-format'.
2008-12-17 09:52:46 +01:00
Carsten Dominik 1eef2abe15 Mark last sync with Emacs in ChangeLog. 2008-12-16 14:09:51 +01:00
Carsten Dominik e967f71794 Avoid refining of entries into themselves.
Reported by Samuel Wales.
2008-12-16 10:16:16 +01:00
Carsten Dominik e4ed09207d Quote special characters in tables for LaTeX export.
Text inside tables did not receive the full treatment of handling sub-
and superscripts, and of special character quoting like %, &, and {}.
This patch does fix this, but I am worried that I am overlooking the
true reason why Bastien did switch off these conversions.  We'll see
if and what this will break.
2008-12-16 07:44:13 +01:00
Carsten Dominik 0ea9fb46c5 Implement longtable support for LaTeX export.
Exporting tables to LaTeX suffered from the problem that Org tables
are often long, but that the tabular environment in LaTeX cannot
handle long tables.  This patch fixes this issue.

LaTeX export can now deal with very long tables, by setting an option
in the "ATTR_LaTeX:" line.  Also, you can specify the alignment by
hand.  Here is an example:

Also, table export now correctly deals with tables that start with a
hline.  In such a case, also the LaTeX version will have this extra
hline before the first line.
2008-12-16 07:04:05 +01:00
Carsten Dominik 45cc93478d Fix LaTeX export bug with regions and initial content.
This re-implements and fixes the commit
b786f4da93, which we had reverted
earlier today.  The new version seems to work OK.
2008-12-16 07:04:05 +01:00
Carsten Dominik 2b49ebc8fc Fix bug with tags setting from agenda.
Setting tags from the agenda no longer updated the agenda display
correctly.  Now this works again.

Report by John Wiegley.
2008-12-16 05:50:46 +01:00
Carsten Dominik 411f9d174f Switch to \verb in LaTeX export for code-like snippets.
Emphasis expressions ~...~ and =...= are not typeset using \verb.
You cannot include the vertical bar in these snippets as this is the
delimiter.
2008-12-15 13:01:50 +01:00
Carsten Dominik b786f4da93 Revert "Fix LaTeX export bug with regions and initial content."
This reverts commit 73ab743a6f.
2008-12-15 12:58:40 +01:00
Carsten Dominik 33675c3b0c Introduce maxlevel for org-goto using refile interface.
This is just a new option, `org-goto-max-level'.  The smaller this
number is, the faster the org-goto interface will become.
2008-12-15 10:34:55 +01:00
Carsten Dominik 552ededaae Speed up refile target collection.
This patch introduces three improvements to refile target construction,
which should speed these functions up significantly.

1. A faster way to move up a level in the outline hierarchy
2. A better way to construct the outline path, in the case
   that the command is scanning the entire hierarchy anyway
3. Avoid comparing the true-names of files.
2008-12-15 10:23:56 +01:00
Tassilo Horn ddcdaa7f87 Changelog entry for org-gnus patch. 2008-12-13 00:57:49 +01:00
Carsten Dominik 73ab743a6f Fix LaTeX export bug with regions and initial content.
This is an old and nagging bug, see

  http://thread.gmane.org/gmane.emacs.orgmode/8809/focus=8838

for more information.  This fixes the bug, hopefully.
2008-12-13 00:18:35 +01:00
Carsten Dominik 7f08a00779 Improve docstring of `org-table-recalculate'. 2008-12-12 14:50:43 +01:00
Carsten Dominik 5ff646fc90 Make @0 reference the last data line in a table.
The last data line in a table is often a line with important data, for
example sums of a column.  In tables with varying length, the row
number of this line is constantly changing, which makes it hard to
write programs creating tables and then installing formulas.

This patch introduces @0 as a special reference to the last row, so
that @0$3 would be the field in the last row, 3rd column.
2008-12-12 08:53:43 +01:00
Carsten Dominik 8e6239b867 Update docstring of org-log-done.
Patch by Danie Clemente.
2008-12-11 06:05:30 +01:00
Carsten Dominik cf75cdb7f3 Fix bugs with new figure <div>. 2008-12-10 23:43:24 +01:00
Carsten Dominik ac83bc01d7 Better implementation of unique entry IDs.
Unique identifiers for entries can now be used more efficiently.
Internally, a hash array has replaced the alist used so far to
keep track of the files in which an ID is defined.  This makes it
quite fast to find an entry by ID.

There is now a new link type which looks like this:

id:GLOBALLY-UNIQUE-IDENTIFIER

This link points to a specific entry.  When you move the entry to
a different file, for example if you move it to an archive
file, this link will continue to work.

The file /org-id.el/ contains an API that can be used to write
code using these identifiers, including creating IDs and finding
them wherever they are.

Org has its own method to create unique identifiers, but if the
system has /uuidgen/ command installed (Mac's and Linux systems
generally do), it will be used by default.  You an also select
the method by hand, using the variable =org-id-method=.

If the ID system ever gets confused about where a certain ID is,
it initiates a global scan of all agenda files with associated
archives, all files previously known containing any IDs, and all
currently visited Org-mode files to rebuild the hash.  You can
also initiate this by hand: =M-x org-id-update-id-locations=.
Running this command will also dump into the =*Messages*= buffer
information about any duplicate IDs.  These should not exist, but
if you /copy/ an entry with its properties, duplicate IDs will
inevitably be produced.  This is unavoidable in a plain text
system that allows you to edit the text in arbitrary ways, and a
portion of care on your side is needed to keep this system clean.

The hash is stored in the file =~/.emacs.d/.org-id-locations=.
This is also a change from previous versions where the file was
=~/.org=id-locations=.  Therefore, you can remove this old file
if you have it.  I am not sure what will happen if the =.emacs.d=
directory does not exists in your setup, but in modern Emacsen, I
believe it should exist.  If you do not want to use IDs across
files, you can avoid the overhead with tracking IDs by
customizing the variable =org-id-track-globally=.  IDs can then
still be used for links inside a single file.

IDs will also be used when you create a new link to an Org-mode
buffer.  If you use =org-store-link= (normally at =C-c l=) inside
en entry in an Org-mode buffer, and ID property will be created
if it does not exist, and the stored link will be an =id:= link.
If you prefer the much less secure linking to headline text, you
can configure the variable =org-link-to-org-use-id=.  The default
setting for this variable is =create-if-interactive=, meaning
that an ID will be created when you store a link interactively,
but not if you happen to be in an Org-mode file while you create
a remember note (which usually has a link to the place where you
were when starting remember).
2008-12-10 23:32:37 +01:00
Carsten Dominik b2ad719f51 Implement a new link type "id:" to link to entry ids. 2008-12-10 14:31:18 +01:00
Carsten Dominik 45102b68ce Captions and attributes for images and tables during export
Tables, and Hyperlinks that represent inlined images, can now be
equipped with additional information that will be used during
export.  The information will be taken from the following special
lines in the buffer and apply to the first following table or
link.

  - #+CAPTION: :: The caption of the image or table.  This string
       should be processed according to the export backend, but
       this is not yet done.
  - #+LABEL: :: A label to identify the figure/table for cross
       references.  For HTML export, this string will become the
       ID for the `<div class="figure">' element that encapsulates
       the image tag and the caption.  For LaTeX export, this
       string will be used as the argument of a `\label{...}'
       macro.  These lables will be available for internal links
       like `[[label][Table] ]'.
  - #+ATTR_HTML: :: Attributes for HTML export of image, to be
       added as attributes into the `<img...>' tag.  This string
       will not be processed, so it should have immediately the
       right format.
  - #+ATTR_LaTeX: :: Attributes for LaTeX export of images, to
       be inserted into the optional argument of the
       `\includegraphics[...]{file}' command, to specify scaling,
       clipping and other options.  This string will not be
       processed, so it should have immediately the right
       format, like `width=5cm,angle=90'

For LaTeX export, if either a caption or a label is given, the
element will be exported as a float, i.e. wrapped into a figure
or table environment.
2008-12-10 12:50:07 +01:00
Carsten Dominik a64bf8f599 Fix bug in XEmacs compatibility code.
Calling `org-substring-no-properties' with a nil value for FROM would
cause XEmacs to throw an error.

Thanks to Thomas Fuchs for the fix.
2008-12-08 21:57:46 +01:00
Carsten Dominik acfdd25581 Move the org-before-first-heading-p function to org.el.
This function was defined in org-registry.el, but it is generally useful.
2008-12-08 17:34:16 +01:00
Carsten Dominik 0216c9a27c Fix minor problems with blockquote and verse HTML export.
Xerxes Folupa writes:

> I spotted a little inconsistency in the way Org strips tags when
> processing #+begin_verse ... #+end_verse, and #+begin_quote
> ... #+end_quote blocks, compared with other literal blocks that strip
> superfluous <p> tags correctly (e.g. #+html)

[...]

> Additional question: is the space before the <br/> in verse blocks a
> design decision?

This patch fixes these issues.
2008-12-07 21:16:14 +01:00