Commit Graph

429 Commits

Author SHA1 Message Date
Carsten Dominik 2860252c9e Minor fixes, and release 6.19d 2009-01-27 09:11:34 +01:00
Carsten Dominik c848dae4be Release 6.19c 2009-01-27 09:02:13 +01:00
Carsten Dominik f88f3bb89f Shift-selection: More tweaking. 2009-01-27 09:01:23 +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 ea446a6ff7 Release 6.19b 2009-01-26 08:22:14 +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 5e965557b3 Release 6.19a 2009-01-25 16:08:16 +01:00
Carsten Dominik 41e51dfef4 Release 6.19 2009-01-25 13:41:09 +01:00
Carsten Dominik 4260aad09d Maintenance: Fix declarations and necessary require statements. 2009-01-25 13:07:23 +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 20dbb0c73f Footnotes: Fix some minor issues. 2009-01-24 12:25:36 +01:00
Carsten Dominik 19351e35c2 Version number: pushed to 6.18trans 2009-01-21 17:59:42 +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 5f814319eb Release 6.18c 2009-01-21 10:34:03 +01:00
Carsten Dominik d164a22da6 Release 6.18a 2009-01-21 10:24:46 +01:00
Carsten Dominik b76b28f2a7 Release 6.18 2009-01-20 10:23:26 +01:00
Carsten Dominik 0405dde8ef Footnotes: Avoid matches in links.
Reported by Ian Barton.
2009-01-19 16:15:12 +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 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 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
Bernt Hansen 6de54f877d Bugfix: Functions were renamed so rename the callers too
Rename functions missed in commit 1371205.

Changing timestamps for the currently clocked task generated the
following error:

org-clock-update-time-maybe: Symbol's function definition is void: org-update-mode-line
2009-01-13 07:41:43 -05: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 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 0782fbf785 Export: Try to do a better job with LaTeX math.
Fixes some issues reported by Rasmus Pank Roulund.
2009-01-08 21:36:01 +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 34867369df Push version number to 6.17trans 2009-01-07 13:27:02 +01:00
Carsten Dominik 6b686333fb Release 6.17c 2009-01-06 23:35:50 +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 d31eb4cce9 Agenda: Fix bug with column view
Column view could fail when the agenda contains entries from the Diary
which start with a *.  This commit fixes this problems by making
`org-entry-properties' check for an org-mode buffer.
2009-01-06 16:31:30 +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 621d11687d Update copyright notice to 2009 2009-01-06 10:47:36 +01:00
Carsten Dominik da36bd29ab Release 6.17b 2009-01-06 09:56:42 +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 35c0798d69 Release 6.17a 2009-01-05 13:25:58 +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 2f38ef0c60 Release 6.17 2009-01-04 09:00:34 +01:00
Carsten Dominik d79cc1aebf Footnotes: New startup keyowrd fnlocal
The fnlocal startup keyword sets `org-footnote-section' to nil.
2009-01-04 08:53:59 +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 317990dd8a Footnotes: Automatic label creation.
This patch implements fully automatic creation of unique labels for
footnotes, which is also turned on as the default setting.  The
automatic labels look like [fn:1], [fn:2], etc, using the first
available unused number.

The commit introduces a new variable, `org-footnote-auto-label' with a
number of different options ranging from no auto creation (prompting
the user for a label) to fully automatic creation.

Also, the commit introduces new #+STARTUP options that can be used to
select these settings on a per-file basis.
2009-01-02 15:54:34 +01:00
Carsten Dominik 75ca89400a Utilities: New perl program to extract hooks
A new perl program, list-hooks.pl, now extracts the full list of hook
and function variables in Org, for inclusion into Worg's org-hooks.org.

Also, add a docstring to a few hooks that did not have one.
2009-01-01 09:54:13 +01:00
Carsten Dominik d9c47b107f Bugfix: Indentation for converted headlines with `C-c -' 2008-12-31 01:22:57 +01:00
Carsten Dominik 70930f09ba Footnotes: Introduce STARTUP options for footnotes
New STARTUP options fninline and nofninline can be used to configure
the option `org-footnote-define-inline'.
2008-12-31 00:33:31 +01:00
Carsten Dominik f55fa707b5 Footnotes: Load the code and install keybindings for it.
This patch only adds the require for the footnote code, and adds the
key and menu bindings for it.
2008-12-31 00:33:31 +01:00