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

359 commits

Author SHA1 Message Date
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
Carsten Dominik 37d2872508 Remove double let-bindings. 2008-12-05 16:10:25 +01:00
Carsten Dominik 94fa3dcffa Rename some ill-named function in org-table.el. 2008-12-05 13:19:36 +01:00
Carsten Dominik 575dcb3d3b Make table formulas error when a relative row reference tries to cross hline.
Tassilo Horn asked for this, because he finds the default behavior of
silently choosing a different row too confusing.  I actually do agree.

The main use of this feature was running averages, if you need this
feature, you can customize the variable
`org-table-error-on-row-ref-crossing-hline'.
2008-12-05 13:14:24 +01:00
Carsten Dominik 520ff98609 Fix problem with moving trees in XEmacs.
Moving trees up or down with XEmacs caused a problem when the tree is
at the beginning if the buffer or narrowed region.  This patch
protects the relevant calls to outline-flag-region so that they are
only executed if the range is valid.
2008-12-05 09:39:37 +01:00
Carsten Dominik 4298df987b Fix bug with radio targets.
The variable containing the regexp for radio target matches was not
buffer-local, causing all sorts of problems.
2008-12-05 08:16:55 +01:00
Carsten Dominik d996cbb312 Customizable faces for individual tags.
Samuel Wales writes:

> It would be really nice if you could set tags to different
> faces the way you can with todo keywords.
>
> For example, you could set :urgent: to a bright color.  Or
> set a face for all contexts.

This patch add a new customization variable `org-tag-faces' that can
be used to specify such faces.  The rest of the patch implements these
new faces in Org-mode buffers as well as in the agenda.
2008-12-04 14:24:21 +01:00
Carsten Dominik 760c3ec098 Implement new quoting for CDATA elements.
It seems that CSS and Java-script stuff should be quoted in a very
strange way in order to make sure that the resulting file functions
correct in current browsers *and* validates against various XHTML and
XML standards.  To be honest, the quoting technique seem really
strange, but Sebastian Rose argues, that this is the way to handle
this issue.
2008-12-03 23:55:10 +01:00
Carsten Dominik bac235cb67 Install w3m copying command in w3m-minor-mode-map.
Gnus uses w3m to wash HTML messages and installs w3m-minor-mode-map in
these buffers.  Therefore, this patch makes sure that the special copy
command that converts HTML links to Org-mode links also gets installed
into the minor mode map.

This is as yet untested.
2008-12-03 16:10:41 +01:00
Carsten Dominik 6e31b9eace Fix bug with multiple archiving to sibling.
Calling `org-archive-to-archive-sibling' caused problems when used
several times in a row.  The new killed subtree would be appended to
the current head of the kill-ring, instead of being pushed there.  The
reason for this is that the command `kill-region', which is called by
`org-cut-subtree' changes the variable `this-command', so that during
the next archive command, `kill-region' will think that the previous
command was also a kill and do the append.

Normally this is wanted, to make sure that several kill commands
create one big yank string.  But in this case it has to be avoided.
The patch fixes the problem by let-binding (and therefore protecting)
the value of `this-command' around the call to `org-cut-subtree'.

Reported by Bernt Hansen.
2008-12-03 15:00:10 +01:00
Carsten Dominik b266f5a90c Make LOCATION property inheritable for iCalendar export.
Harri Kiiskinen suggested that it might be useful to make the LOCATION
property an inherited property during iCalendar export.  In this way
you can have set the LOCATION for a whole set of items by setting it
only in the parent.

While this will slow down iCalendar export for large files, I think it
can be quite useful.  This patch does implement the basic code needed
for this functionality.  However, you still need to tell Org that
LOCATION should be inherited, by setting org-use-property-inheritance.
If you set it to t, beware that this may trigger a significant
slowdown when creating the match view in the agenda.  So it may be
better to set this variable to

(setq org-use-property-inheritance '("LOCATION"))

instead.
2008-12-03 08:28:26 +01:00
Carsten Dominik aa07f68c12 Better handling of export options.
This patch improves the internal handling of the large number of
export options that Org-mode has.  In particular, it now defines a
single constant, `org-export-plist-vars' that contains the full list
of options, and how these can be accessed through variables, and
through the #+OPTIONS line.  Before the patch, there used to be a
separate list or the OPTIONS handling, which has gotten out of sync.
This now no longer can happen.

Also, this patch adds two new variables, `org-export-with-priority',
and `org-export-with-todo-keywords', which can be used to turn the
export of TODO keywords and priority cookies on and off, so that these
can simply disappear and not be shown in the exported file.  In fact,
the default for the priority cookie is to remove it.
2008-12-03 07:33:05 +01:00
Carsten Dominik 4800fd8b7c Fix bugs in implementation and documentation of the mapping API.
There were bugs in the mapping API, pointed to by Samuel Wales:

    Manual says:

     The following example counts the number of entries with TODO keyword
     WAITING, in all agenda files.

        (length (org-map-entries t "/+WAITING" nil 'agenda))

    Org says invalid function for the string.

First of all, the example in the manual was wrong, the "nil" should be
gone.  Second, the mapping function did not return all results in a
list, so that `length' could not count them.

This patch fixes these issues.
2008-12-02 16:53:25 +01:00
Carsten Dominik 269c5a85bc New ways to specify time comparison values in property searches.
In addition to "<now>", "<today>", "<yesterday>", and
"<tomorrow>", there are more special values accepted now in
time comparisons in property searches:  You may use strings
like =<+3d>= or =<-2w>=, with units d, w, m, and y for day,
week, month, and year, respectively

Thanks to Linday Todd for this proposal.
2008-11-29 19:12:03 +01:00
Carsten Dominik 0bb7429c3d Fix org-gnus.el for XEmacs. 2008-11-29 07:53:22 +01:00
Carsten Dominik 733dfca36b Allow to exclude specific tags from inheritance.
So far, the only way to select tags for inheritance was to
allow it for all tags, or to do a positive selection using
one of the more complex settings for
`org-use-tag-inheritance'.  It may actually be better to
allow inheritance for all but a few tags, which was difficult
to achieve with this methodology.

This patch introduces a new option,
`org-tags-exclude-from-inheritance' which allows to specify an
exclusion list for inherited tags.
2008-11-27 13:15:29 +01:00
Carsten Dominik f6b9e77ded Show inherited tags in the agenda.
This patch does a lot of things.  First, it makes sure that the tags
transferred to the agenda as text properties on each line are do carry
information about there origin (in the form of an `inherited' text
property).  Then it modifies the function creating agenda lines so
that inherited tags will be listed and identified as such in the
agenda.

This new feature can be turned off with a new variable,
`org-agenda-show-inherited-tags'.
2008-11-27 09:25:50 +01:00
Carsten Dominik a196eaa15c New file org-w3m.el, by Andy Stewart.
This file implements a special function to copy text from a w3m buffer
in a way that when the text is yanked back into an Org-mode buffer,
the links will be translated to Org syntax.
2008-11-26 15:45:50 +01:00
Carsten Dominik 69ac82e1e6 Make `C-c |' work in orgtbl-mode.
This key needs special treatment, because it needs to work *outside*
tables.  The patch introduces a special command to call the
creation/conversion function if there is no conflicting binding to
`C-c |' outside of orgtbl-mode.
2008-11-26 09:14:09 +01:00
Carsten Dominik 07c77bc4dc Make S-SPC work in orgtbl-mode.
S-SPC did lead to an error in orgtbl-mode, because there is no binding
to this key.  Now orgtbl-self-insert-command falls back on calling
self-insert-command for such cases.
2008-11-26 08:30:21 +01:00
Carsten Dominik c0a779bd9d Fix bug with handling of targets in ASCII export.
Target text used to disappear, now it is kept as it should be.
2008-11-26 07:32:10 +01:00
Carsten Dominik 7e3aa26628 Finalize the relative-timer setup.
This cleans up the implementation of the timer.  Most important change
is that, after starting a time list with `C-c C-x -', you can then
simply use M-RET to add new items, which is addictive!
2008-11-25 20:20:52 +01:00
Carsten Dominik 4b2d3c6feb Implement timer for timed notes.
This patch implements a relative time for taking timed notes, useful
for example while watching a video, or during a meeting which is also
recorded.  Here are the new commands:

    - `C-c C-x .' ::
      Insert a relative time into the buffer.  The first time
      you use this, the timer will be started.  When called
      with a prefix argument, the timer is reset to 0.

    - `C-c C-x -' ::
      Insert a description list item with the current relative
      time.  With a prefix argument, first reset the timer to 0.

    - `C-c C-x 0' ::
      Reset the timer without inserting anything into the buffer.
      By default, the timer is reset to 0.  When called with a
      `C-u' prefix, reset the timer to specific starting
      offset.  The user is prompted for the offset, with a
      default taken from a timer string at point, if any, So this
      can be used to restart taking notes after a break in the
      process.  When called with a double prefix argument
      `C-c C-u', change all timer strings in the active
      region by a certain amount.  This can be used to fix timer
      strings if the timer was not started at exactly the right
      moment.
2008-11-25 12:07:23 +01:00
Carsten Dominik 8e31f6f99c Fix publishing of component files.
When starting the publishing process with
`org-publish-current-project' from a file that is located in a project
that is also a component of a parent project, this patch now makes
sure that the entire parent project is published instead.
2008-11-25 10:56:37 +01:00
Carsten Dominik 4e4bdf3646 Fix site-map creation in org-publish.
The creation of an automatic site map in org-publish with the
:auto-index and :index-filename parameter does exclude the index
file name from being added to the index.  There was a bug which would
exclude this file name also in all subdirectories in a project. This
patch switches the comparison from looking at file names only to
looking at the complete path.
2008-11-25 07:18:36 +01:00
Carsten Dominik aacbb2756c Fix RET in orgtbl-mode, when cursor is at the beginning of the buffer.
RET did fail in orgtbl-mode, if the cursor was at the beginning of the
buffer.  Now it opens a new line whenever the cursor is at the
beginning of a line, and that includes the beginning of the buffer.....
2008-11-24 22:45:56 +01:00
Carsten Dominik 663960af62 Improve removal of temporary buffers during publishing.
Report by Richard Riley.
2008-11-24 18:27:14 +01:00
Carsten Dominik 1ba1ac5045 Merge changes from downstream Emacs. 2008-11-24 12:21:40 +01:00
Carsten Dominik 74e7111a5f Implement outline-path-completion in one go. 2008-11-24 10:59:10 +01:00
Carsten Dominik 3bd0676370 Issue warning if the clock cannot be resumed.
If a clock-save file tries to restore the running clock, but the task
does not have an unfinished clock, warn the user with a message.
2008-11-23 08:07:56 +01:00
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