Commit Graph

1523 Commits

Author SHA1 Message Date
Carsten Dominik d5230f0ec7 Allow LaTeX_CLASS_OPTIONS to set options, also from a property 2009-11-27 14:48:03 +01:00
Carsten Dominik 069ebce286 Fix motion bug in org-forward-same-level 2009-11-27 14:37:00 +01:00
Carsten Dominik 364054fa77 Stop generating superfluous clock entries
Avoid closing the currently clocking entry when clocking in the same task
again.  Leave the clock entry open until some other task is clocked in.

This allows us to clock in tasks with hooks that are called frequently without
generating lots of short sequential clock entries for the same task.

Patch by Bernt Hansen.

Modified by Carsten
2009-11-27 08:09:10 +01:00
Carsten Dominik fe96737e6d Cleanup old merge infor in ChangeLog file 2009-11-27 00:37:16 +01:00
Carsten Dominik 88cf58802c Fix footnote problem with optional arguments to citation commands
Scot Beker writes:

> I cite my references in org like
> this.\autocite[231]{bibtexkey_2009}, where '231' is the
> relevant page number.  When exporting to LaTeX, Org thinks
> that the value in square brackets is a footnote number and
> produces a document with a "footnote definition not found:
> 231" error message at the bottom of the document.  My
> settings are below, and I've searched pretty hard through
> them to look for anything that might have caused it.  Any
> ideas?
2009-11-26 12:44:05 +01:00
Carsten Dominik 541f675aa6 Fix minor issue with customization group 2009-11-26 10:13:47 +01:00
Carsten Dominik 3efe6f29a8 Agenda: Show time-of-day in block also after day 1
Lukas Stelmach writes:

> Isn't it wrong when a note like this:
>
> * A very interesting meeting 11:15-12:00
>  <2009-11-30 Mon>--<2009-12-01 Tue>
>
> Shows up in the agenda time gird only on monday while being untimed on
> tuesday? To make it right I do
>
> * A very interesting meeting
>  <2009-11-30 Mon 11:15>--<2009-11-30 Mon 12:00>
>  <2009-12-01 Tue 11:15>--<2009-12-01 Tue 12:00>
>
> or simply
>
> * A very interesting meeting 11:15-12:00
>  <2009-11-30 Mon>
>  <2009-12-01 Tue>
>
> Which works but doesn't show the recurrence counter.
2009-11-26 09:04:53 +01:00
Carsten Dominik 8acb7a3d59 Fix issue with M-RET not inserting an item before the first headline
Ian Barton writes:

> I am not sure if this is intended behaviour or not.
> If I start a new document with no headings and type:
>
> - item 1
>
> then press M_Ret, I get:
>
> - item 1
> *
>
> If my document is like:
>
> * Heading
> - item 1
>
> M-Ret works as expected.
2009-11-26 08:38:40 +01:00
Carsten Dominik 68cf2588b4 Fix customization type of new variable 2009-11-26 07:34:56 +01:00
Carsten Dominik 683749072f Make the LaTeX/PDF logfiles to be removed a configurable list
Patch by Lukasz Stelmach
2009-11-26 07:33:06 +01:00
Carsten Dominik 6a5af81a99 Fix typo 2009-11-26 07:27:55 +01:00
Carsten Dominik a50243cdc4 Better error message when selecting empty link 2009-11-26 07:14:49 +01:00
Carsten Dominik c98716af61 Fix bug 2009-11-26 07:05:19 +01:00
Carsten Dominik 3efede0ddf PDF export: Remove log files produced by XeTeX 2009-11-25 15:05:11 +01:00
Carsten Dominik f80694f89c Merge commit 'james/bugfixes'
Conflicts:
	lisp/ChangeLog
2009-11-25 13:24:47 +01:00
Carsten Dominik f759cc17a7 Allow Org-mode source code examples in LaTeX export
This did not work because the parser would still match headlines that
are really part of the examples.
2009-11-25 11:32:39 +01:00
James TD Smith b0eaeaa0bd Fix a problem with summaries in the agenda column view.
If there was a title set for a column, org-agenda-colview-summarize would look
for the title instead of the property, resulting in empty summaries. This is now
fixed.
2009-11-25 01:41:20 +00:00
Carsten Dominik 7c59da0767 org-mobile: Make the agendas to be pushed configurable
New variable `org-mobile-agendas'.
2009-11-25 00:53:03 +01:00
Carsten Dominik 4bfb32bb75 LaTeX export: Allow centered images in plain lists 2009-11-24 20:41:53 +01:00
Carsten Dominik 50645b5699 Fix bug when old clock task list contains bad pointers 2009-11-23 21:04:31 +01:00
Carsten Dominik d980be6d8b PDF export: Don't explicitly remove the old PDF file, just overwrite
Patch by Francesco Pizzolante
2009-11-23 15:38:03 +01:00
Carsten Dominik fdd40ea46f Remove also the .idx file when cleaning up after PDF export 2009-11-23 14:49:49 +01:00
Carsten Dominik db5c9d73ec Introduce compatibility code for looking-back 2009-11-23 12:44:49 +01:00
Carsten Dominik d60d003980 Catch before-first-headline when inserting a headline
Reported by David Maus.
2009-11-23 09:34:22 +01:00
Carsten Dominik d92b46f6e5 LaTeX export: Allow figure placement in plain lists 2009-11-22 23:51:45 +01:00
Carsten Dominik 29e646318f Allow link descriptions to span two lines 2009-11-22 23:32:14 +01:00
Carsten Dominik 178acdac94 HTML export: Avoid empty lines at the beginning
This was a request by Ian Barton, to get Jekyll blogging working.
2009-11-21 20:50:37 +01:00
Carsten Dominik da2a88c3ae Cater for empty region, link, title in org-protocol.el 2009-11-20 23:23:29 +01:00
Carsten Dominik c6186f49b3 Check all represented tags in agenda for auto-exclusion 2009-11-20 23:17:55 +01:00
Carsten Dominik e80f24641c Rebuild agenda after adding new diary entries 2009-11-20 20:35:34 +01:00
Carsten Dominik 7668306fca Fix bug with message and headlines containing `%'
Report by Bernt Hansen
2009-11-20 20:19:40 +01:00
Carsten Dominik 04c901354c Agenda: Selectively remove some tags from agenda display
Patch by Martin Pohlack, with modifications by Carsten Dominik.
2009-11-20 17:55:12 +01:00
Carsten Dominik 3f64f8ec73 LaTeX export: Protect secondary footnote references
Francesco Pizzolante writes:

> Exporting multiple references to the same footnote to LaTeX lead to a wrong
> generated code.
>
> The following example:
>
> --8<---------------cut here---------------start------------->8---
> * Title
>   This is my text[fn:1:This is my footnote.]. And another one[fn:1].
> --8<---------------cut here---------------end--------------->8---
>
> Will produce the following LaTeX code:
>
> --8<---------------cut here---------------start------------->8---
> \section{Title}
> \label{sec-1}
>
>   This is my text\footnote{This is my footnote. }. And another one\$$^{1}$\$.
> --8<---------------cut here---------------end--------------->8---
>
> The correct code should be:
>
> --8<---------------cut here---------------start------------->8---
> \section{Title}
> \label{sec-1}
>
>   This is my text\footnote{This is my footnote. }. And another one$^{1}$.
> --8<---------------cut here---------------end--------------->8---
2009-11-20 15:05:42 +01:00
Carsten Dominik a2e0d000c8 org-indent-mode: Fix problem with empty string as line-prefix 2009-11-20 14:56:45 +01:00
Carsten Dominik 858dfb51f6 Agenda: Still safer diary insertion
Bernt Hansen reported a bug when the cursor is on the first line in
the agenda.
2009-11-20 13:56:23 +01:00
Carsten Dominik d7ef0bbd72 Agenda: Catch error when no mark is set
Bernt Hansen writes:

> When org-agenda-diary-file is set to a special org file for diary
> entries and transient mark mode is enabled 'i' in the agenda fails
> with 'mark is not active now'
>
> My workaround for this is C-SPC to set the mark anywhere legal in the
> agenda display (ie not on the first or last line) and then hit 'i'
> to insert my diary entries.
2009-11-20 12:29:03 +01:00
Carsten Dominik ee3e435843 Make sure sorting also works in files without final newline 2009-11-20 11:05:35 +01:00
Carsten Dominik 8085c9030f Agenda: Make inserting diary entries also at end of line 2009-11-20 09:06:35 +01:00
Carsten Dominik 4824387e1c Do not allow a link description that is entirely white 2009-11-20 06:47:39 +01:00
Carsten Dominik 1bb0df0511 Allow diary entry insertion at top-level
Matt Lundin writes:

> The new org-agenda-diary-entry looks quite convenient.
>
> Would it be possible to add an option to bypass the date tree so as to
> add each new appointment as a simple first level heading? I prefer to
> keep my appointments organized by project and/or category and have no
> real use for the date tree. Ideally, new appointments would appear as
> first level headlines in the org-agenda-diary-file (i.e., my inbox),
> ready to be refiled.
2009-11-19 15:34:43 +01:00
Carsten Dominik a8397d62c5 Do not fontify a "file" tag as a link 2009-11-19 14:43:41 +01:00
Carsten Dominik 9bc97e6f16 Widen buffers for multi-occur
Bernt Hansen writes:

> The org-agenda multi-occur search command (C-c a /) does not return
> results on buffers that are currently narrowed if the search would
> normally match outside the narrowed region.  This prevents possible
> matches from being displayed.
2009-11-19 14:25:02 +01:00
Carsten Dominik 2d511abb73 Add doc string to a function 2009-11-19 14:19:20 +01:00
Carsten Dominik 34cde857eb Autoload the new archiving commands 2009-11-18 18:32:51 +01:00
Carsten Dominik bab57bbfb4 Fix emphasis bug at the end of a line 2009-11-18 11:33:39 +01:00
Carsten Dominik 8f3c4096a0 Add faces customization to quote and verse blocks
Patch by Julien Barnier, with modifications by Carsten.
2009-11-18 10:58:00 +01:00
Carsten Dominik 3cdff230dd Minor fixes
Patch by Noorul Islam.
2009-11-18 10:37:16 +01:00
Carsten Dominik 54889df12d org-freemind.el: Encode multibyte characters to unicode
Patch by Tokuya Kameshima.
2009-11-17 20:36:09 +01:00
Carsten Dominik 21e06fd161 Tag ditaa and dot files with hash, to avoid remaking them
Patch by Eric Schulte
2009-11-17 16:35:08 +01:00
Carsten Dominik 9714678f30 HTML export: Move home/up link div into the content div
Patch by Sebastian Rose
2009-11-17 15:11:28 +01:00
Eric Schulte 8e30cbca79 Sha1 hash of latex fragments to avoid regeneration
Patch by Eric Schulte, with amends by Carsten
2009-11-17 14:13:38 +01:00
Carsten Dominik 11679eb824 Add an ID to the div surrounding up/home links 2009-11-16 18:08:42 +01:00
Carsten Dominik 570878b7e5 Improve wanderlust link handling in the case that wl-use-petname is set
Patch by David Maus
2009-11-15 12:07:06 +01:00
Carsten Dominik c6a2f2deae Remove unused function `org-compact-display-after-subtree-move' 2009-11-15 10:01:23 +01:00
Carsten Dominik 2129ea6494 Make sure outline path display uses full path, even in a narrowed buffer
When a buffer was narrowed, the path was truncated.
2009-11-15 09:59:33 +01:00
Carsten Dominik 1497c94c11 Improve prompt for Effort
Patch by Gregory J. Grubbs.
2009-11-15 09:55:03 +01:00
Carsten Dominik 8f0ec1a03d Fix drawer export to LaTeX 2009-11-15 07:54:34 +01:00
Carsten Dominik 69c86a1df8 Cleanup and document the speed key feature 2009-11-14 16:24:21 +01:00
Carsten Dominik 63fb485e24 Implement showing the outline path in the echo area while in the agenda 2009-11-13 22:50:45 +01:00
Carsten Dominik 6bf3010061 Improvements to speed commands
- Never leave headlines
   - Add a working key for org-agenda (v)
   - Allow org-use-speed-commands to be a predicate
2009-11-13 22:29:17 +01:00
John Wiegley 1affd3bbb6 Check whether org-clock-into-string is a string 2009-11-13 05:08:55 -05:00
Carsten Dominik eea7bf8d3f Make cloning entries work at the end of the buffer
David Maus writes:

> By accident I noticed that if you clone a subtree using C-c C-x c who
> or whose content is the last line of the file orgmode inserts the
> clone without the desired newline.
>
> example.org
> ,----
> | * Just a test
> `----
>
> If you move the point behind test and press C-c C-x c 1 <RET> <RET>
> the clone is inserted right behind "test".
>
> example.org
> ,----
> | * Just a test*Just a test
> `----
>
> Instead orgmode should insert a newline before inserting the clone
> when the file misses an empty line at the end.
2009-11-13 00:28:15 +01:00
Carsten Dominik 0f826be931 MobileOrg: Do not insert timestamp before mode/local variable line
Patch by Charles Sebold.
2009-11-13 00:22:18 +01:00
Carsten Dominik f21a4e7274 Use fixed coding system for the checksum file 2009-11-12 23:52:41 +01:00
Carsten Dominik 33d28f47bf LaTeX export: Fix regular expression error, problem with case-fold-search 2009-11-12 09:38:39 +01:00
Carsten Dominik 71ed40b3be Blocking: Do not block transition to a nil TODO state
Samuel Wales writes:

> I find that changing a task from a todoish state to blank
> causes blocking to occur.  I normally want all todo state
> changes except those to doneish states to be non-blocked.
>
> I think the issue might be that blank is special-cased, as
> if it were a doneish state.  I would prefer blank to be a
> todoish state just like any other.
2009-11-12 08:39:54 +01:00
Carsten Dominik a89ecb0916 Merge commit 'james/bugfixes' 2009-11-12 07:04:51 +01:00
James TD Smith aeb35b7995 Improve error reporting in org-habit.
Include the entry in the error messages in org-habit-parse-todo. This makes it
much easier to find the heading you need to fix.
2009-11-12 01:46:18 +00:00
James TD Smith b81fae4c3f More bugfixes for agenda column view
Make org-agenda-columns-summarize work properly with the new summary types.
It was assuming the values should be summarised by adding them together. It's
now updated to use the summary functions in org-columns-compile-map, and also
handles summary types with calculated values properly.

Leave calculated columns blank if there is no underlying value.

Don't return zero if a property is missing.

Changes are also applied to xemacs colview.
2009-11-12 01:00:04 +00:00
James TD Smith de588512d3 Fix a bug in org-link-display-format.
It would break if there was a '\' in the link description.
2009-11-12 00:55:30 +00:00
Carsten Dominik 49690e49ca Fix the export of drawers
Exporting drawers was not really supported, now it is.
Drawers that are selected for export are formatted using the function
specified in the variable `org-export-format-drawer-function'.  If
that is nil, the default `org-export-format-drawer' will publish the
drawer as a colon example, i.e. verbatim and in fixed-width.
2009-11-11 19:14:43 +01:00
Carsten Dominik a417a36bd2 Fix character translation in org-protocol.el 2009-11-11 11:25:02 +01:00
Carsten Dominik e8fbed7bc1 Better error message when creating block diary entry but no mark exists 2009-11-10 10:44:25 +01:00
Carsten Dominik 204a263116 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/ChangeLog
2009-11-10 09:05:53 +01:00
Carsten Dominik 80b81a168e LaTeX export: Fix protection bug
Sebastian Rose writes:

> The following code does not work as expected, when exported to PDF:
>
> => --->8----------------------------->8----------------------------->8---
> * Image basics
>
>  Images are inserted into an Org file in a fashion similar to links:
>  : [[file:///home/sebastian/develop/org/org-mode-unicorn.png]]
>
> <= ---8<-----------------------------8<-----------------------------8<---
>
> Result:
>
>  The last line is exported as:
>
>  \href{file:///home/sebastian/develop/org/org-mode-unicorn.png}{nil}
>
>
> Expected result:
>
>  I expect the last line to be exported as fixed width text.
>
2009-11-10 08:48:40 +01:00
Carsten Dominik dd9a94b844 New command to clean up an exiting date tree.
If the dates of some entries have changed, the new command will move
them to the correct date in the tree.
2009-11-10 08:22:36 +01:00
Dan Davison 081ff1ebe3 Avoid altering window configuration when saving edit buffer.
Saving the edit buffer is achieved by calling org-edit-src-exit,
saving the org buffer and returning to the edit buffer with
org-edit-src-code. When those two functions are used in this context,
they should not attempt to restore the saved window configuration, nor
alter the saved window configuration.
2009-11-09 17:05:07 -05:00
Carsten Dominik 9f6102f9e7 Fix clock issues related to with-current-buffer
Patch by Bernt Hansen
2009-11-09 22:58:34 +01:00
Carsten Dominik 1d6570928a Fix bug with diary-display-date-form 2009-11-09 22:44:18 +01:00
Carsten Dominik 45191cd220 Merge branch 'log-rescedule'
Conflicts:
	doc/ChangeLog
2009-11-09 17:34:02 +01:00
Carsten Dominik a8ea078c33 Make it possible to record logbook entries when scheduling/deadlines change
Rick Moynihan writes:

> I'm wondering if anyone logs rescheduled tasks with org-mode...  As I
> find myself sometimes scheduling tasks for a future date, but then on
> the day not having the capacity to do them.  In these situations I
> just reschedule them, but it'd be nice to record the dates for which
> an item was originally scheduled in the LOGBOOK.
>
> Has anyone configured org-mode to do this? lognotedone only appears to
> log state changes (rather than schedule/deadline changes).
2009-11-09 17:22:58 +01:00
Carsten Dominik 453f8ef626 Make `i' key in agenda and calendar add new entries to an org file 2009-11-09 15:28:59 +01:00
Carsten Dominik 5c83f73df0 Allow remember to file to a date-based outline tree 2009-11-08 16:03:40 +01:00
Carsten Dominik ec73493ada Add code to create outline trees representing dates 2009-11-08 16:00:39 +01:00
Carsten Dominik 2ab5c21f61 Protect target-like strings in verbatim emphasis
Martin G. Skjaeveland writes:

> Then I write
>
> some text some text ~<<some_scr_block_name>>~.
>
> because I want "<<some_scr_block_name>>" written as verbatim in my latex
> export, I get, in latex,
>
> \texttt{\textbackslash{}label\{some\_src\_block\_name\}some\_src\_block\_name}.
>
> which gives me the text
>
> \label{some_src_block_name}some_src_block_name
>
> in verbatim.
2009-11-08 11:24:01 +01:00
Carsten Dominik 471c244866 Handle notifications with percent characters
`message' accepts a printf format string, and that can go wrong if you
want to show a string, but the string contains a percent character!
2009-11-07 00:43:27 +01:00
Carsten Dominik 8c94a4c070 Turn off partial completion for remember prompts 2009-11-06 18:01:08 +01:00
Carsten Dominik 9916ae2b33 New hook to preprocess captured data from MobileOrg. 2009-11-06 17:44:02 +01:00
Carsten Dominik ff6ff85966 Remove line/wrap-prefix properties only if org-indent-mode is on 2009-11-06 07:22:14 +01:00
Carsten Dominik b49a735533 Fix icalendar export bug with verification function. 2009-11-05 23:46:39 +01:00
Carsten Dominik 0cb9bf9222 Remove unnecessary save-restriction forms in speedbar support 2009-11-05 22:59:33 +01:00
Carsten Dominik d3db42d3a6 Keep byte compiler happy 2009-11-05 19:53:14 +01:00
Carsten Dominik 1962a53c80 Set variables org-timer-timer[123] correctly.
Patch by Stephan Schmitt
2009-11-05 16:11:57 +01:00
Carsten Dominik eb30362c8a Restore agenda after mobile push 2009-11-05 15:44:17 +01:00
Carsten Dominik d02cde236c Fix bug with mobile files
Pushing failed when `agenda-file' is in `org-agenda-text-search-extra-files'.
2009-11-05 12:10:32 +01:00
James TD Smith e139fa1662 Apply the changes made to org-colview.el to org-colview-xemacs.el 2009-11-05 09:19:01 +00:00
James TD Smith e1e27d66cf Fix org-columns-new.
The extra elements in org-columns-compile-map broke the existing code.
2009-11-05 09:15:19 +00:00
James TD Smith 2c983f0929 Add min/max/mean age operators to column view.
This lets you see how long has passed since the specified timestamp property
each entry. The three operators (@min, @max, @mean) show either the age of the
youngest or oldest entry or the average age of the children.
2009-11-05 09:15:19 +00:00
Carsten Dominik f013fa51df Merge commit 'johnw/master' 2009-11-05 08:19:14 +01:00
Carsten Dominik 3e84540bfa Use org-icalendar-verify-function only if non-nil
Patch by Andrew Lawson.
2009-11-05 08:08:46 +01:00
John Wiegley cec499dc6f Fix to idle-time notice in the minibuffer 2009-11-05 02:07:41 -05:00
Carsten Dominik e946c7d239 Fix TODO statistics bug
Alessandro Paccacio writes:

> I've an outline like this:
>
> * Project A
> ** TODO Task A-1 [0/3]
> *** TODO Subtask A-1-a
> *** TODO Subtask A-1-b
> *** TODO Subtask A-1-c
>
> where level 1 heading is the name of a project, level 2 heading is a
> generic task broken into three level 3 headings.  As suggested in
> section 5.5 of the manual, I've hooked the org-summary-todo function
> to org-after-todo-statistics-hook, in order to automatically change
> the level 2 TODO to DONE when all the subtasks are DONE.
> Unfortunately, when I change to DONE the first subtask, an unexpected
> TODO is added to level 1 heading:
>
> * TODO Project A
> ** TODO Task A-1 [1/3]
> *** DONE Subtask A-1-a
> *** TODO Subtask A-1-b
> *** TODO Subtask A-1-c
>
> From now on, the switch TODO->DONE or DONE/TODO applies to level 1
> heading, even if the [/] cookie in level 2 is correctly updated:
>
> * DONE Project A
> ** TODO Task A-1 [3/3]
> *** DONE Subtask A-1-a
> *** DONE Subtask A-1-b
> *** DONE Subtask A-1-c
>
> Is there a way to apply the automatic change of TODO to the parent
> heading only, as below?
>
> * Project A
> ** DONE Task A-1 [3/3]
> *** DONE Subtask A-1-a
> *** DONE Subtask A-1-b
> *** DONE Subtask A-1-c
2009-11-05 08:04:57 +01:00
Carsten Dominik fce076d3cb Fix docstring of `org-sparse-tree'
Patch by Bernt Hansen
2009-11-05 07:51:09 +01:00
Carsten Dominik 36b8aaac5a Fix refile bug which would always refile to the clock
This bug resulted from a recent patch which made a prefix arg of 2 to
mean refile to the clock.  However, I forgot to actually test the
value of the prefix arg...
2009-11-05 07:20:03 +01:00
Carsten Dominik 8cde7ed412 Remember: Make sure the buffer to check for completion stuff exist 2009-11-04 14:10:18 +01:00
Carsten Dominik a1fea8b3d1 Make `org-set-effort' access effort values by index 2009-11-03 17:48:37 +01:00
Carsten Dominik 15eb6dba42 Fix bug with sparse trees and ARCHIVE tag
Chris Randle writes:

> I've just noticed that creating a sparse tree with `C-c / r' is
> not displaying matches in my org file. It hasn't always been this
> way, I *think* things were working OK around 6.29, but it's hard
> to be sure.
>
> I've managed to pare my org file down to a few lines that
> demonstrate the problem
>
> ===============================
>
> * Customers
> ** Customer A
> *** Billing
> **** Support during September			    :ARCHIVE:
> ** Customer B
>   07964-xxxxxx
>
> *** Problem with Laptop
> ** Customer C
> *** Current Details
>
> *** Test of 07968 showing up
> ** Customer D
>   01673-xxxxxx
>   07968-xxxxxx
>
> *** Laptop slowdown fix
>    spoolsv.exe at 99%
>
> ===================================
>
> Setting a sparse tree by regexp 0796[48] returns "3 match(es) for
> regexp 0796[48]", but the tree doesn't expand at the hit
> locations. If I manually expand the tree at the locations of the
> hits, the results are highlighted. It makes no difference if the
> hits are in a headline or in notes beneath a headline.
>
> Remove the ARCHIVE tag from the "Support during September"
> headline with `C-c C-x a' and redo the sparse tree. Everything
> now appears expanded as I'd expect.

Hmm, maybe the outline behavior of hide-subtree has changed???
Anyway, we now just use our own function for this.
2009-11-03 15:36:06 +01:00
Carsten Dominik e1d0f342a1 Add level/indentation cycling for empty entries/items 2009-11-03 10:29:01 +01:00
Carsten Dominik 72b520ed27 Make `org-priority' accept an action argument `remove'
When given, the priority cookie will be removed.
2009-11-03 08:29:06 +01:00
Carsten Dominik 0b156b94a7 Make `C-2 C-c C-w' refile to the current clock 2009-11-03 08:27:29 +01:00
Carsten Dominik 2ab3ed4c2f Fix bug in org-remember.el
Adam Spiers writes:

> The code for handling %^{PROP}p in org-remember templates seems to
> have a bug:
>
> 	     ((equal char "p")
>              (edebug)
> 	      (let*
> 		  ((prop (org-substring-no-properties prompt))
> 		   (pall (concat prop "_ALL"))
> 		   (allowed
> 		    (with-current-buffer
> 			(get-buffer (file-name-nondirectory file))
>
> Here get-buffer can return nil, in which case `org-remember' fails
> with the error:
>
>  Wrong type argument: stringp, nil
>
> It seems to be assuming that the non-directory part of the filename
> corresponds to the buffer name, but this is not guaranteed.  Perhaps I
> noticed it because I am using uniquify.el ?
2009-11-03 06:44:10 +01:00
Carsten Dominik 5b65dc2bdf Expand file name in org-clock-sound before using it 2009-11-02 22:07:08 +01:00
Carsten Dominik bfa5ec12d3 Fixed bug with remember to non-org files 2009-11-02 11:00:29 +01:00
Carsten Dominik ba1e90893d Agenda: Make `C-c C-o' and RET opening links in clocktables in the agenda
RET will only do this if the cursor is on the link and
`org-return-follows-link' is set.  `C-c C-o' will work anywhere in the
line.

Requested by Chris Leyon.
2009-11-02 08:23:30 +01:00
Dan Davison bb8f063368 Avoid empty strings when splitting header line in org-exp-blocks. 2009-11-01 14:57:42 -05:00
Carsten Dominik fd54dd9c66 Add ChangeLog entries for Dan's block indentation commits 2009-11-01 08:43:50 +01:00
Carsten Dominik 5cdc5e3246 Reorganize key bindings for archiving
The following keys now do archiving

C-c C-x C-a    archive using the command specified in
               `org-archive-default-command'

This variable is by default set to `org-archive-subtree', which means
arching to the archive file.

The three specific archiving commands are available through

C-c C-x C-s    archive to archive file
C-c C-x a      toggle the archive tag
C-c C-x A      move to archive sibling

These bindings work the same in an Org file, and in the agenda.

In addition:

- In the agenda you can also use `a' to call the default archiving
  command, but you need to confirm the command with `y' so that this
  cannot easily happen by accident.

- For backward compatibility, `C-c $' in an org-mode file, and `$' in
  the agenda buffer continue to archive to archive file.
2009-10-31 10:03:11 +01:00
Carsten Dominik 535ca7a6b9 Fix bug in CSV table import
Dan Davison writes:

> If a file contains "-1" followed by a newline and nothing else,
> org-table-import on that file fails. The first commit with this
> property is a commit (below) to do with CVS tables made a few
> days ago. I have given up trying to work out a good solution to
> this :) In case it is useful, the failure occurs when
> org-table-align is called at the end of
> org-table-convert-region. I think it is long-standing behaviour
> that hitting tab inside of
>
> |-1|
>
> doesn't make a table containing "-1", so presumably there is
> something different about the context in which org-table-align is
> now being called.
2009-10-31 09:24:32 +01:00
Carsten Dominik 10249d98d1 Make C-c C-o open the attachment directory is there are no links 2009-10-30 09:10:11 +01:00
Carsten Dominik ca3d96d98d Evaluate the MATCH parameter in org-agenda-custom-commands 2009-10-30 08:16:00 +01:00
Carsten Dominik fbe1b2ccf7 Work with abbrev tables only if abbrev.el is loaded 2009-10-29 15:21:48 +01:00
Carsten Dominik 655c5eaeee Fix bug in radio list export
Daniel Hackney writes:

> When attempting to use radio lists for exporting in LaTeX, I
> found that they didn't work. I am using the example file shown
> below:
>
> ---BEGIN_EXAMPLE---
>
> #+LaTeX: % BEGIN RECEIVE ORGLST programs
> #+LaTeX: % END RECEIVE ORGLST programs
>
> #+ORGLST: SEND programs org-list-to-latex
>   - Emacs text editor
>   - Ubuntu Linux
>   - Git version control system
>   - Firefox web browser
>   - Drupal content management system
>   - Subversion version control system
>   - Eclipse integrated development environment
>
> ---END_EXAMPLE---
>
> I eventually ran `org-list-send-list' manually on the list, and
> got the following error:
>
>  funcall: Wrong type argument: number-or-marker-p, (unordered
> #("Emacs text editor" [snip...]
>
> I started debugging `org-list-send-list' and found that the error
> occurred when calling (funcall transform list). Looking back, I
> saw that `transform' was assigned (in the let*) after
> `item-beginning'. Stepping through the execution, I saw that
> `transform' was being assigned a value of `-'. It turns out when
> assigning to `item-beginning', (org-list-item-beginning) is
> called, which runs a regular expression with a capture group,
> overwriting the previously matched capture group.
>
> Luckily, the fix is simple; all that needs be done is to switch
> the assignment to `transform' with `item-beginning' so the regex
> in (org-list-item-beginning) doesn't override the match-string
> data. I tried this fix out and it worked perfectly.
2009-10-29 14:47:22 +01:00
Carsten Dominik 8715928953 LaTeX export: Preserve line breaks if requested by the user 2009-10-29 09:15:28 +01:00
Carsten Dominik 7507bdd922 Allow footnote markers like [1] to occur in verbatim emphasis 2009-10-29 09:05:34 +01:00
Carsten Dominik 1029daee03 iCalendar export: Honor user request to skip plain time stamps 2009-10-28 16:21:09 +01:00
Carsten Dominik caea94a408 LaTeX export: Allow bracket before opening quote
Brenton Kenkel writes:

> I found an apparent minor bug with links containing quotation marks in
> LaTeX export. If the first character in the name of a link is a
> quotation mark, it is converted to a closing mark rather than an
> opening mark. For example:
>
> ,----
> | * test
> |
> | [[http://www.google.com]["hello"]]
> | [[http://www.google.com]["two" "quotes"]]
> `----
>
> This produces:
>
> ,----
> | \href{http://www.google.com}{''hello''}
> | \href{http://www.google.com}{''two'' ``quotes''}
> `----
2009-10-28 10:30:07 +01:00
Carsten Dominik 343f3c4782 Keep archive buffer after archiving something to it 2009-10-28 10:25:25 +01:00
Carsten Dominik c2d7c2f982 Fix bug with id files to be scanned
John Wiegley writes:

> In `org-id-update-id-locations', it uses the value of
> org-id-extra-files and calls file-truename on all its members,
> assuming them to be filenames.
>
> However, my `org-id-extra-files' is the symbol
> `org-agenda-text-search-extra-files', which contains the symbol
> `agenda-archives'.  I get an error because Org is calling
> file-truename on that symbol.  This stops me from doing "id"
> based link lookups within archive files.
2009-10-28 10:06:08 +01:00
Carsten Dominik 089b5b2ff1 Add ChangeLog for Dan's patch and reformat a docstring 2009-10-27 20:36:24 +01:00
Carsten Dominik 2bb27d05ae Add SETUPFILE to the lit of completion keywords 2009-10-27 18:24:27 +01:00
Carsten Dominik 4fd182b936 Fix bug with access to agenda files when resolving clocks 2009-10-27 16:29:26 +01:00
Carsten Dominik 79bcdbe736 Add STYLE to default properties 2009-10-27 09:29:49 +01:00
Carsten Dominik 59c9c4cdd4 Correctly interpret CVS tables with quoted fields
The csv parser was very primitive, ignoring quoted fields.  This is
now fixed.
2009-10-26 12:31:16 +01:00
Carsten Dominik 1da2e348c4 Fix bug in iswitchb completion when the table is already a list
Reported by John Wiegley
2009-10-26 09:37:15 +01:00
Carsten Dominik cca8003c4d Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/ChangeLog
2009-10-26 08:55:38 +01:00
Carsten Dominik 2fa2cbaa2c Keep compiler happy and fix issue with musing the mobile agenda
Richard Moreland writes:

> (setq org-agenda-custom-commands
>      '(("X" agenda "" nil ("agenda.html"))))
> ;; This seems to break org-mobile-push?
> ;;(setq org-agenda-exporter-settings
> ;;      '((org-agenda-add-entry-text-maxlines 5)
> ;;       (htmlize-output-type 'font)))
>
> I have the lines above in my .emacs file.  When I uncomment the 3
> commented lines, org-mobile-push just hangs after OVERVIEW.
>
> I don't understand exactly what is going on, but if I hit C-g or
> C-c enough I can regain control, but the sync never finishes.
2009-10-26 07:59:53 +01:00
Bastien Guerry 1949d82193 *** empty log message *** 2009-10-26 08:28:48 +08:00
John Wiegley 511bcc9e81 org-clock-auto-clock-resolution is now a tri-state 2009-10-25 18:19:04 -04:00
Carsten Dominik 4c3bc6482d Only save clock stuff if it has been loaded as well
Kai Tetzlaff writes:

> i noticed that when using the org-mode clock persistence, the
> stored clock data gets deleted when i start emacs and exit again
> without turning on org-mode in between.
>
> When looking at org-clock-persistence-insinuate it looks like
> org-clock load will only run after org-mode gets started whereas
> org-clock-save will always be called when exiting emacs:
>
> (defun org-clock-persistence-insinuate ()
>  "Set up hooks for clock persistence"
>  (add-hook 'org-mode-hook 'org-clock-load)
>  (add-hook 'kill-emacs-hook 'org-clock-save))
>
> Not running org-mode-hook (i.e. not starting org-mode) thus does
> not load clock data but org-clock-save overwrites any prviously
> saved data when exiting emacs.
>
> An easy fix for that would be to just add org-clock-load to e.g.
> emacs-startup-hook. But this will only work if the code in
> org-clock-load does not depend on any org-mode initialization
> code (or would require loading org-mode).
>
> So org-clock-save should probably check if org-clock-load has
> been running during the current emacs session (or if clock
> persistence was just enabled) and only then save clock data when
> exiting emacs. I tried to add this to the code in org-clock-save:
2009-10-25 07:48:05 +01:00
Carsten Dominik f74f8ca2ab Fix problems in the interaction of John's and James' clock restore code
Now the recommendation is to use clock persistence only for the
history, and to use John's code for resolving a clock that has been
idle (either because the user stopped working or exited Emacs).
2009-10-24 15:02:01 +02:00
John Wiegley d3a779b748 Allow display of fractional times with C-c C-x C-d 2009-10-23 22:23:32 -04:00
John Wiegley 5749409441 Further simplifications to org-habit.el 2009-10-23 20:43:55 -04:00
John Wiegley 41e7ee3173 Several improvements and fixes to org-habit.el 2009-10-23 20:43:54 -04:00
John Wiegley 14ac7bef8b Fix to the habit consistency graph builder 2009-10-23 20:43:28 -04:00
Carsten Dominik 6e9fce5869 Add option to keep vertical lines in ASCII tables 2009-10-23 12:35:24 +02:00
Carsten Dominik 7e44d762e9 Fix customization type of `org-tag-alist', to match James' patch. 2009-10-23 08:41:12 +02:00
Carsten Dominik b0834e5df2 Save mobile inbox buffer after applying the changes 2009-10-22 17:50:29 +02:00
Carsten Dominik 9072f54582 Make updating the mibileorg.org checksum safe 2009-10-22 16:30:00 +02:00
James TD Smith 0410d6460c Add an X11 equivalent to org-mac-idle-seconds.
This needs a small C program (in UTILITIES/x11idle.c) to work.
2009-10-22 15:09:34 +02:00
John Wiegley c248cc69b2 Fix to the way idle time is reported in prompts 2009-10-22 06:22:36 -04:00
John Wiegley c2caedcf53 Use `org-scheduled-string' to find the scheduled date 2009-10-22 06:18:15 -04:00
John Wiegley a0acb478a9 Changed when clock auto-resolution comes into play
Clocking in on another task while an active clock is running no longer
invokes the auto-resolution logic.
2009-10-22 05:00:13 -04:00
John Wiegley be2806d281 Fixes to the consistency graph in org-habit 2009-10-22 03:22:03 -04:00
John Wiegley 156cfd92ae Made the definition of org-modules more consistent 2009-10-22 01:33:23 -04:00
James TD Smith ba46d37032 org-repeat-re was no longer matching simple +2d type repeaters. Fix. 2009-10-21 12:21:56 +02:00
James TD Smith 781eb9379f Add a way to display names for tag groups in fast tag selection.
If the nil term in the start or end group cells are replaced by strings, these
are displayed before or after the brackets for the group.
2009-10-21 10:41:41 +02:00
James TD Smith 91646b1442 Add a missing entry, and fix some formatting in the changelog. 2009-10-21 10:41:24 +02:00
Carsten Dominik 1632951b97 LaTeX export: Protect \vspace macro in verse environment 2009-10-21 10:36:42 +02:00
John Wiegley 09b1564bb4 Added custom priorities to the habit code
org-habit.el (org-habit-get-priority): A new function that determines
the relative priority of a habit, based on how long past its scheduled
date it is, and how near the deadline is.

org-agenda.el (org-agenda-get-scheduled): Set habit priority using
`org-habit-get-priority'.
2009-10-20 17:19:01 -04:00
John Wiegley 2f4aeae8f6 Start displaying colors from the first scheduled date 2009-10-20 17:19:00 -04:00
John Wiegley f82986173e Changed "color" variables to light/dark faces 2009-10-20 17:19:00 -04:00
John Wiegley f93ace5368 Use the new syntax .+1d/3d for habit repeaters 2009-10-20 17:19:00 -04:00
John Wiegley 9b36ab0ca9 Fixed an incorrect variable reference 2009-10-20 17:19:00 -04:00
John Wiegley d6a2768b48 Show "Habit" in modeline when habits are displayed 2009-10-20 17:19:00 -04:00
Carsten Dominik 3784cb18f6 Make space and backspace scroll he show window in the agenda
Requested by Eric Fraga.
2009-10-20 19:56:11 +02:00
Carsten Dominik e8e296128e Turn off partial-completion-mode for special org completion
Report and patch by Levin Du.
2009-10-20 14:29:58 +02:00
Carsten Dominik f376feb5fb Protect LaTeX macros in AUTHOR lines 2009-10-20 14:06:23 +02:00
Carsten Dominik b16a086460 Show context after ECB jumps to a location in Org-mode
Patch by Eric Fraga
2009-10-20 12:27:49 +02:00
Carsten Dominik 4edf012b1f Offer file tags for completion 2009-10-20 10:27:30 +02:00
John Wiegley 063cb58fab Added support for habit consistency tracking
org-habit.el: New file, which implements code to build a "habit
consistency graph".

org-agenda.el (org-agenda-get-deadlines)
(org-agenda-get-scheduled): Display consistency graphs when outputting
habits into the agenda.  The graphs are always relative to the current
time.

(org-format-agenda-item): Added new parameter `habitp', which indicates
whether we are formatting a habit or not.  Do not display "extra"
leading information if habitp is true.
2009-10-20 01:17:54 -04:00
John Wiegley b40c4eed8f Improvements to `org-repeat-re' and `org-get-repeat'
(org-repeat-re): Improved regexp to include .+ and ++ leaders for repeat
strings.

(org-get-repeat): Now takes a string parameter `tagline', so the caller
can obtain the SCHEDULED repeat, or the DEADLINE repeat.
2009-10-19 17:17:45 -04:00
John Wiegley 4d3960cd11 Add var to disable clock resolution on clock in
(org-clock-disable-clock-resolution): New customization variable that
disable automatic clock resolution on clock in.

(org-clock-in): If `org-clock-disable-clock-resolution' is set, do not
automatically resolve anything.  This is does not affect idle-time
resolution, however, if `org-clock-idle-time' is set.
2009-10-19 17:07:48 -04:00
Carsten Dominik 4300198902 Fix some minor quibble with mobile support 2009-10-19 12:50:47 +02:00
John Wiegley 85878aadbf Added context-aware, tag auto-exclusion (/ RET)
(org-agenda-auto-exclude-function): New customization variable for
allowing the user to create an "auto exclusion" filter for doing
context-aware auto tag filtering.

(org-agenda-filter-by-tag): Changes to support the use of
`org-agenda-auto-exclude-function'.  See the new manual addition,.
2009-10-18 23:43:44 -04:00
John Wiegley abfc6babca Added feature for resolving clocks due to idleness
See the new manual section on "Resolving idle time".

(org-clock-resolve-clock): If keeping or subtracting time results in a
clock out at a time in the past, and if the resolution occurred due to
idleness or invoking `M-x org-resolve-clocks', remember that past moment
in time.  On the next clock in, the user will be prompted to see if they
want to back-date their new clock to then.

(org-clock-resolve): Do not jump the user to the location of a dangling
clock if the resolution is occuring due to an idle timeout.  In that
case there is typically only one dangling clock, the active one, and
there is no value gained by shuffling their windows around to show it to
them.  Being prompted to resolve an idle clock should be as inobtrusive
as possible.

(org-resolve-clocks-if-idle): New function that resolves only the
currently active clock if the user has exceeded the time returned by
`org-user-idle-seconds', based on the value of `org-clock-idle-time'.

(org-clock-in): If, after resolving clocks,

(org-clock-out): Cancel the `org-clock-idle-timer' on clock out.
2009-10-18 23:43:43 -04:00
John Wiegley 57a7a4c15b Make sure `org-files-list' returns real files
(org-files-list): Don't attempt to return a file name for Org buffers
which have no associated file.
2009-10-18 23:43:38 -04:00
John Wiegley 4e184a530e Fixed a typo in an error message 2009-10-18 23:43:25 -04:00
Carsten Dominik f253a8280b Sort files for MobileOrg 2009-10-18 16:57:09 +02:00
Carsten Dominik d096fac7f7 Safeguard the setting for `org-mobile-inbox-for-pull'
This file should be with the other org files, and not in the staging
area.  Also, when file names in mobileorg.org are interpreted, this
should be relative to org-directory.  So we also require now that the
user set this variable.
2009-10-18 02:53:51 +02:00
Carsten Dominik a45e7d88c7 Use `org-float-time' instead of `time-to-seconds' in John's patch 2009-10-17 17:55:59 +02:00
Carsten Dominik dd01f724a6 Merge commit 'johnw/master'
Conflicts:
	lisp/ChangeLog
	lisp/org-clock.el
2009-10-17 17:52:49 +02:00
Carsten Dominik a752a22e25 Fix customization type for `org-agenda-sorting-strategy'
Patch by Mikael Fornius.
2009-10-17 17:43:48 +02:00
John Wiegley 8490a6c1d5 Added `M-x org-resolve-clocks' command
(org-clock-resolve-clock): New function that resolves a clock to a
specific time, closing or resuming as need be, and possibly even
starting a new clock.

(org-clock-resolve): New function used by `org-resolve-clocks' that sets
up for the call to `org-clock-resolve-clock'.  It determines the time to
resolve to based on a single-character selection from the user to either
keep time, subtract away time or cancel the clock.

(org-resolve-clocks): New user command which resolves dangling clocks --
that is, open but not active -- anywhere in the file list returned by
`org-files-list'.

(org-clock-in): Automatically resolve dangling clocks whenever a user
clocks in.

(org-clock-cancel): If the user cancels the solely clock in a LOGBOOK,
remove the empty drawer.
2009-10-17 05:09:40 -04:00
John Wiegley d3f994e01b Added functions for determining the user's idle time
(org-clock-idle-time): New user customizable option for detecting
whether the user has left a clock idle.  Note: it is only used in this
commit to test whether it's worthwhile to check OS X to get the Mac
user's current idle time.  If the Emacs idle time is less than the
value, the user hasn't been away long enough to be worth checking (a
more expensive test than just getting Emacs idle time).

(org-user-idle-seconds, org-mac-idle-seconds)
(org-emacs-idle-seconds): This three functions, in conjunction
with the user customization variable `org-clock-idle-time', return
the number of seconds (as a floating point) that the user has been
away from their Emacs (or, if running on OS X, their computer).
2009-10-17 03:51:32 -04:00
John Wiegley defe6c3838 Added several new utility functions to org-clock
(org-find-open-clocks): New function that returns a list of all open
clocks in the given FILE.  Note that each clock it returns is a cons
cell of the format (MARKER . START-TIME).  This "clock" value is used by
several of the new clock module utility functions.

(org-is-active-clock): New inline function which tests whether the given
clock value is the same as the currently active clock.  Returns non-nil
if this is the case.

(org-with-clock-position): New macro that evaluates FORMS with point in
the buffer and at the position of the given clock.  Changes to the
current clock are global.

(org-with-clock): New macro that evaluates FORMS with point in the
buffer and at the position of the given clock.  However, changes to the
current clock are local and have no effect on the user's active clock.
This allows, for example, far any clock to be cancelled without
cancelling the active clock.

(org-clock-clock-in): New inline function that switches the active clock
to the given clock.  If either the argument RESUME, or the global
`org-clock-in-resume', are non-nil, it will resume a clock that was
previously left open.

(org-clock-clock-out): New inline function that clocks out the given
clock value without affecting the currently active clock.

(org-clock-clock-cancel): New inline function that cancels the given
clock value without affecting the currently active clock.
2009-10-17 03:51:32 -04:00
John Wiegley cc039d9016 Add new parameter to the `org-clock-out' command
(org-clock-out): Accept new third parameter `at-time', which permits a
clock to be clocked out at a specific time.  Note that no attempt is
made to verify that the clock out time is later than the clock in time.
2009-10-17 03:51:32 -04:00
John Wiegley b6594a03df Prevent mode-line timers from being duplicated
(org-clock-in): Before creating `org-clock-mode-line-timer', check to
make sure an older timer is not currently running.
2009-10-17 03:51:32 -04:00
John Wiegley e673507f69 Added three new utility functions to org.el
(org-files-list): New utility function for returning a list of all open
org-mode buffers, plus all files used to build the agenda buffer.  Note
that not all the files will necessarily be visited by a buffer at time
of call.

(org-entry-beginning-position): Like the function
`line-beginning-position', this inline function returns the beginning
position of the current heading/entry.

(org-entry-end-position): Like the function `line-end-position', this
inline function returns the end position of the current heading/entry.
2009-10-17 03:51:31 -04:00
John Wiegley 6f9b983f94 Added functions for determining the user's idle time
(org-clock-idle-time): New user customizable option for detecting
whether the user has left a clock idle.  Note: it is only used in this
commit to test whether it's worthwhile to check OS X to get the Mac
user's current idle time.  If the Emacs idle time is less than the
value, the user hasn't been away long enough to be worth checking (a
more expensive test than just getting Emacs idle time).

(org-user-idle-seconds, org-mac-idle-seconds)
(org-emacs-idle-seconds): This three functions, in conjunction
with the user customization variable `org-clock-idle-time', return
the number of seconds (as a floating point) that the user has been
away from their Emacs (or, if running on OS X, their computer).
2009-10-16 22:28:15 -04:00
John Wiegley 384d3ebc65 Added several new utility functions to org-clock
(org-find-open-clocks): New function that returns a list of all open
clocks in the given FILE.  Note that each clock it returns is a cons
cell of the format (MARKER . START-TIME).  This "clock" value is used by
several of the new clock module utility functions.

(org-is-active-clock): New inline function which tests whether the given
clock value is the same as the currently active clock.  Returns non-nil
if this is the case.

(org-with-clock-position): New macro that evaluates FORMS with point in
the buffer and at the position of the given clock.  Changes to the
current clock are global.

(org-with-clock): New macro that evaluates FORMS with point in the
buffer and at the position of the given clock.  However, changes to the
current clock are local and have no effect on the user's active clock.
This allows, for example, far any clock to be cancelled without
cancelling the active clock.

(org-clock-clock-in): New inline function that switches the active clock
to the given clock.  If either the argument RESUME, or the global
`org-clock-in-resume', are non-nil, it will resume a clock that was
previously left open.

(org-clock-clock-out): New inline function that clocks out the given
clock value without affecting the currently active clock.

(org-clock-clock-cancel): New inline function that cancels the given
clock value without affecting the currently active clock.
2009-10-16 22:21:13 -04:00
John Wiegley 63fbf2aab8 Add new parameter to the `org-clock-out' command
(org-clock-out): Accept new third parameter `at-time', which permits a
clock to be clocked out at a specific time.  Note that no attempt is
made to verify that the clock out time is later than the clock in time.
2009-10-16 22:08:01 -04:00
John Wiegley a5150cca5d Prevent mode-line timers from being duplicated
(org-clock-in): Before creating `org-clock-mode-line-timer', check to
make sure an older timer is not currently running.
2009-10-16 22:06:09 -04:00
John Wiegley 080babb885 Added three new utility functions to org.el
(org-files-list): New utility function for returning a list of all open
org-mode buffers, plus all files used to build the agenda buffer.  Note
that not all the files will necessarily be visited by a buffer at time
of call.

(org-entry-beginning-position): Like the function
`line-beginning-position', this inline function returns the beginning
position of the current heading/entry.

(org-entry-end-position): Like the function `line-end-position', this
inline function returns the end position of the current heading/entry.
2009-10-16 22:00:50 -04:00
Carsten Dominik c0c56217ff Fix all todo line bug in org-mobile.el 2009-10-16 17:07:38 +02:00
Carsten Dominik 77a9f4ecf1 Minor fixes 2009-10-15 07:59:15 +02:00
Carsten Dominik 4fe057f4aa Search view: Search for substrings rather than boolen workd lists
The default in search view is not that the search expression is
searched for as a substring, i.e. the different words must occur in
direct sequence.  The old way is only used it the first word in
the search string is preceded by a plus or a minus.

This was, more-or-less, requested by John Wiegley.
2009-10-14 13:36:36 +02:00
Carsten Dominik 33c75c6e29 Agenda filtering: Make `- SPC' a filter that selects entries without tags
Request by John Wiegley.
2009-10-14 12:45:04 +02:00
Carsten Dominik 680e17848e Document the function `org-outline-level' 2009-10-13 09:48:35 +02:00
Carsten Dominik cc0a819186 Re-introduce the variable `org-inlinetask-export' 2009-10-12 09:28:02 +02:00
Carsten Dominik 0a7e68575f Remove inlinetask END line when excluded from export 2009-10-10 16:54:13 +02:00
Carsten Dominik 523ab0baee LaTeX export: Don't format tables in protected regions 2009-10-07 08:10:05 +02:00
Carsten Dominik e59e619a8f Make "C-c '" also edit #+MACRO definitions, including multiline 2009-10-06 18:42:24 +02:00
Carsten Dominik f042ee7ce5 Allow limited length prefix format specifier %n.mc 2009-10-06 12:02:30 +02:00
Carsten Dominik a7c670ad47 Better tags and todo keyword lists for MobileOrg 2009-10-03 08:52:54 +02:00
Carsten Dominik e8ef16306c Improve figure placement in LaTeX export.
Text can now be wrapped around figures.  See the manual for details.
2009-10-03 08:50:09 +02:00
Carsten Dominik 82d6a786bc Fix bugs with inline task export 2009-10-02 13:00:22 +02:00
Carsten Dominik 93552da5be Remove backend-specific markers after selecting text
When a backend selects its #+begin_backend ... #+end_backend
code, the markers need to be removed so that a package like
org-special-blocks.el does not try to work on the block again.
2009-10-02 12:02:56 +02:00
Carsten Dominik b86c061228 Fix inline task export
Tasks without content caused did cause an error.
2009-10-02 10:34:06 +02:00
Carsten Dominik 3ce0a4a9e2 Fix position error when clocking in while buffer is narrowed
Bernt Hansen writes:

> If you narrow to subtree when there is a following task the narrowed
> buffer has a blank line at the end.  If you are on this line and
> clock-in it starts the clock for the _following_ task (outside the
> narrowed subtree) and not the task you are looking at.
>
> I stumbled across this today because the following task was already
> over the estimated limit when I clocked it in - which triggered my
> alarm sound.
>
> ,----[ test.org ]
> | #+STARTUP:
> | * TODO One
> | * TODO Two
> `----
>
> ,----[ minimal.emacs ]
> | (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
> | (add-to-list 'auto-mode-alist
> |              '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
> | (require 'org-install)
> |
> | (global-set-key "\C-cl" 'org-store-link)
> | (global-set-key "\C-ca" 'org-agenda)
> | (global-set-key "\C-cb" 'org-iswitchb)
> `----
>
> Key sequence to reproduce:
>
> $ emacs -q -l minimal.emacs test.org
>
> | Key                           | Notes                         |
> |-------------------------------+-------------------------------|
> | C-n                           | Go to first task '* TODO One' |
> | M-x org-narrow-to-subtree RET | Narrow to subtree             |
> | C-n                           | Move to last blank line       |
> | C-c C-x C-i                   | Clock in (next) task          |
> |-------------------------------+-------------------------------|
>
> -Bernt
>
> Emacs  : GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
> of 2008-11-09 on raven, modified by Debian
> Package: Org-mode version 6.31trans (release_6.31.8.g7485)
2009-10-02 08:40:02 +02:00
Carsten Dominik f026e3a6b8 Don't wrap figures without captions
This is to allow better figure placement.
2009-10-02 08:29:21 +02:00
Carsten Dominik cd7d2eb68e Don't mark items DONE when archiving them
The default value of `org-archive-mark-done' is now nil.
2009-10-02 06:47:30 +02:00
Carsten Dominik 8c4b3564df Fix bug in org-context at beginning-of-buffer
Patch by Michael Sperber
2009-10-01 20:03:29 +02:00
Carsten Dominik 4020e2a8c4 Fix bug in canceling clocks
Peter Frings writes:

> Clocking in on any task (C-c C-x C-i) and cancelling afterwards (C-c C-x
> C-x) results in the following backtrace:
> ,----
> | Debugger entered--Lisp error: (wrong-type-argument markerp org-clock-marker)
> |   move-marker(org-clock-marker nil)
> |   org-clock-cancel()
> |   call-interactively(org-clock-cancel nil nil)
> `----
> Culprit are two erroneous quotes in front of org-clock-marker in org-clock-el. The patch (output
> of git diff -u on a clean checkout) fixes the problem:
>
> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index e279898..91a4bcb 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -818,8 +818,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
>     (set-buffer (marker-buffer org-clock-marker))
>     (goto-char org-clock-marker)
>     (delete-region (1- (point-at-bol)) (point-at-eol)))
> -  (move-marker 'org-clock-marker nil)
> -  (move-marker 'org-clock-hd-marker nil)
> +  (move-marker org-clock-marker nil)
> +  (move-marker org-clock-hd-marker nil)
>   (setq global-mode-string
> 	(delq 'org-mode-line-string global-mode-string))
>   (force-mode-line-update)
2009-10-01 20:01:01 +02:00
Carsten Dominik 0b8457c835 Allow date to be shifted into the future if time is earlier than now
PT writes:

> Currently, I'm using Google Calendar and it's quick add syntax is very
> convenient:
>
> http://www.google.com/support/calendar/bin/answer.py?hl=en&answer=36604#text
>
>
> Of course, Org has similar capabilites, but I found one thing which
> google calendar does better: if it's 4pm and I add an event for 8am
> then GCal schedules it for 8am tomorrow.
>
> Org, on the the other hand, schedules it for 8am today even if that
> time is already passed.
>
> I never add past events and I think it's quite atypical. Shouldn't be
> an option similar to org-read-date-prefer-future for times too, so
> that timestamps also prefer the future when no date given?

This is now possible, but it is not the default.  You need to set

(setq org-read-date-prefer-future 'time)
2009-10-01 12:53:16 +02:00
Carsten Dominik ec302d2a7a Add new capabilities to org-mobile.el
- Allow to set any TODO keyword
- Allow to replace the local tags
2009-09-30 14:14:57 +02:00
Carsten Dominik f99fa74db1 Make LaTeX_CLASS also work in a setup file 2009-09-30 10:08:25 +02:00
Carsten Dominik 3988491291 Improve formatting of Inline tasks during export 2009-09-29 13:12:47 +02:00
Carsten Dominik f1e70d00d7 Document new hooks. 2009-09-29 08:05:15 +02:00
Carsten Dominik 0a3bc55b97 Keep compiler happy 2009-09-29 07:39:07 +02:00
Carsten Dominik a81e918325 New hook `org-export-latex-final-hook'. 2009-09-29 05:01:56 +02:00
Carsten Dominik 7d5408a717 LaTeX export: Fix superscript bug
Thomas S. Dye writes:

> I'm trying to generate $^{14}$C, or an equivalent, from org-mode
> to represent the isotope of carbon important in archaeological
> dating.
>
> Reading the manual, I tried this:
>
> ** A Brief History of Attempts to Interpret the ^{14}C Dates
> *** The ^{14}C Dates
>
> Which, in my #+LaTeX_CLASS: beamer export, yields
>
> \subsection{A Brief History of Attempts to Interpret the \^{}{14}C Dates}
> ...
> \begin{frame}\frametitle{The \^{}{14}C Dates}
>
> The problem seems to be the space before the ^.
>
> This input:
>
> ** A Brief History of Attempts to Interpret the x^{14}C Dates
> *** The x^{14}C Dates
>
> yields the correct LaTeX:
>
> \subsection{A Brief History of Attempts to Interpret the x$^{\mathrm{14}}$C Dates}
> ...
> \begin{frame}\frametitle{The x$^{\mathrm{14}}$C Dates}
>
> Am I missing something?  Or, is the LaTeX export thrown off by
> the space before ^?

Indeed, a space before the caret was not allowed in LaTeX export
2009-09-29 04:40:01 +02:00
Carsten Dominik 6c147f0b1e Minor docstring fix 2009-09-28 20:35:49 +01:00
Carsten Dominik 0a0a9e5366 Agenda: Fix bug when changing lines with invisible text in prefix
Peter Westlake writes:

> One small thing, though - in the agenda TODO view, pressing "t"
> to mark the task as Done messes up the layout:
>
>  [[http://orgmode.org][Org-Mode]]:   TODO Demonstrate problem with link
>  in category
>
> (which appears as:
>
>  Org-Mode:   TODO Demonstrate problem with link in category)
>
>
> Press T on that line:
>
>  [[http://orgmode.org][Org-Mode]]: TODO Demonstrate problemDONE
>  Demonstrate problem with link in category
>
> (which appears as:
>
>  Org-Mode: TODO Demonstrate problemDONE Demonstrate problem with
>  link in category)
2009-09-28 20:30:16 +01:00
Carsten Dominik 201517106c LaTeX export: Fix bug with empty lines in VERSE environment 2009-09-28 20:08:34 +01:00
Carsten Dominik 40940daad2 Remove dependency on LaTeX style file fullpage.sty
Patch by Tim Burt.
2009-09-28 19:45:12 +01:00
Carsten Dominik 452b8e0554 Reveal context to add footnote definition
Matt Lundin writes:

> I have org-footnote-section set to "Footnotes." If I insert a new
> footnote while...
>
> 1. the "* Footnotes" tree already exists and
>
> 2. the "* Footnotes" tree is folded
>
> ...the footnote definition label is inserted, but the "* Footnotes"
> subtree remains folded and the cursor jumps to the "* Footnotes"
> headline rather than the definition line.
>
> I've tried using org-reveal (C-c C-r) to open the "Footnotes" section,
> but nothing happens. I've tried typing C-c C-c to go back to the
> footnote, but since the cursor is on a headline, the result is a tag
> prompt. When I hit TAB to cycle, the cursor remains on the headline.
2009-09-28 19:38:09 +01:00
Carsten Dominik d90df8b147 org-mobile.el: More flexibility to add files
The new variable org-mobile-files can now be configured to include
non-agenda files into the staging area for MobileOrg.  Furthermore,
files that are located in a subdirectory of `org-directory' will also
end up in a sub-directory in the staging area.
2009-09-28 19:25:50 +01:00
Carsten Dominik 7baa702f65 org-mobile.el: Add list of tags in index file 2009-09-28 19:18:31 +01:00
Carsten Dominik cdc5054835 Iterate table with `C-c C-u C-c C-c' in #+TBLFM line 2009-09-28 07:47:18 +01:00
Carsten Dominik 44259b3231 Fix cursor position when bullet length has changed
Dan Davison writes:

> If you start a numbered list with
>
> 1.
>
> and hit M-RET then you get
>
> 2.
>  ^
> with a space, i.e. '2. '
>
> However, when creating the 10th list item, there is no space after
> '10.'. Same for 99 -> 100. This isn't entirely trivial, because if you
> start typing blindly after hitting M-RET, then the line you have created
> (lacking the space) will not be recognised as a list item and so
> e.g. the next M-RET will create a new heading, not a list item. [Has
> this changed recently? This seems like something obvious that others
> would have noticed.]
>
> Here's my patch.
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/org-list.el b/lisp/org-list.el
> index 2fea57b..8ece3ea 100644
> --- a/lisp/org-list.el
> +++ b/lisp/org-list.el
> @@ -813,7 +813,7 @@ with something like \"1.\" or \"2)\"."
> 	      (buffer-substring (point-at-bol) (match-beginning 3))))
> 	;; (term (substring (match-string 3) -1))
> 	ind1 (n (1- arg))
> -	fmt bobp old new)
> +	fmt bobp old new delta)
>     ;; find where this list begins
>     (org-beginning-of-item-list)
>     (setq bobp (bobp))
> @@ -835,7 +835,9 @@ with something like \"1.\" or \"2)\"."
> 	  (delete-region (match-beginning 2) (match-end 2))
> 	  (goto-char (match-beginning 2))
> 	  (insert (setq new (format fmt (setq n (1+ n)))))
> -	  (org-shift-item-indentation (- (length new) (length old))))))
> +	  (setq delta (- (length new) (length old)))
> +	  (org-shift-item-indentation delta)
> +	  (if (= (org-current-line) line) (setq col (+ col delta))))))
>     (org-goto-line line)
>     (org-move-to-column col)))
> --8<---------------cut here---------------end--------------->8---
>
> Dan
2009-09-28 07:37:50 +01:00
Carsten Dominik dbd63e9723 Better documentation of the variable `org-format-latex-options' 2009-09-26 08:30:00 +01:00
Carsten Dominik 3ca813aff8 Remove cursor position restriction in the agenda
The cursor may now also be at the end of the line.
2009-09-26 08:23:15 +01:00
Carsten Dominik 668e28f4d0 Bind <home> and <end> to the org-specific commands 2009-09-25 08:03:23 +01:00
Carsten Dominik e9196279f4 Make C-e not jump after the ellipsis of a folded headline 2009-09-25 07:58:54 +01:00
Carsten Dominik f24f2ea410 Run `org-follow-link-hook' after following any link types 2009-09-24 21:49:08 +01:00
Carsten Dominik 6867751efe All indented lines starting with "#+" to be comments 2009-09-24 10:27:30 +01:00
Carsten Dominik c950e4b3ac Fix backslash and other special characters in verbatim snippets
Jeff Kowalczyk writes:

> Is there a way to escape backslashes (\) in code and verbatim that
> will export to LaTeX correctly?
>
> When writing =\\host\share= or =C:\path\to=, pdftolatex output is
> incorrect.
2009-09-24 10:02:00 +01:00
Carsten Dominik 24be3cda29 Better mechanism cor copying faces
This works much better to additional frames.
2009-09-22 12:41:10 +01:00
Carsten Dominik 9d322790d4 Fix bug with dedicated agenda window
George Pearson writes:

> I have been getting the following message in the minibuffer
> area when marking tasks done in the daily agenda:
>
> Error in post-command-hook: (error Cannot switch buffers in a dedicated
> window)
>
> The item in the underlying org file IS marked DONE, and items with
> repeaters appear to be rescheduled properly.  HOWEVER, the log lines,
> like
>
>    - State "DONE"       from "TODO"       [2009-09-07 Mon 10:36]
>
> do NOT appear.
>
> Note I have been using:
>
> org-agenda-window-setup 'other-frame
>
> for some time now, but I notice there has been a recent change
> related to this variable.  Could this be the source of the
> problem?
>
> I believe the error message appears on other operations in the
> daily agenda as well, but have not yet studied this in detail.

Many agenda commands split the current window, which is not allowed on
a frame containing a dedicated window.

Therefore, we now just kill the frame by hand when exiting the agenda.
2009-09-22 12:11:29 +01:00
Carsten Dominik 9cccb68eb8 Mark time stamp change with ">" command in agenda 2009-09-21 17:55:48 +01:00
Carsten Dominik 32b1aebb37 Add drawer and keyword lists to index file for MobileOrg
MobileOrg needs to know the possible TODO keywords and DRAWERS that
can appear in Org files it receives.
2009-09-19 10:46:05 +01:00
Carsten Dominik 9491fc8d5d Find headings for remember also if they have a TODO keyword or a
priority

So far the headline had to match the one specified in the template
exactly, except for tags.  Now a TODO keyword and a priority can be
added, and the headline will still be found.

Reported by Samuel Wales and Bernt Hansen.
2009-09-19 08:06:11 +01:00
Carsten Dominik e3cdd782f8 Fix text property problem in char after TODO in agenda
This character did not have text properties and therefore many
commands did not work at that position.

Reported by Bernt Hansen.
2009-09-18 22:03:08 +01:00
Carsten Dominik 3492407250 Rename the Mobileorg capture file
It is now fixed to mobileorg.org, and not configurable.
2009-09-18 18:00:24 +01:00
Carsten Dominik a70cf873c3 Fix bug when creating a link from the agenda 2009-09-18 16:05:20 +01:00
Carsten Dominik 525b0148c5 Make testing for headline independent of visibility 2009-09-18 13:53:23 +01:00
Carsten Dominik 762136b25c Fix problem with insertion of statistics cookies at visibility boundaries 2009-09-18 13:52:18 +01:00
Carsten Dominik 2e8ece9219 New STARTUP keyword `showeverything'
This will make even drawer contents visible upon startup.
2009-09-18 09:31:16 +01:00
Carsten Dominik 74a59c0c00 Allow indented dynamic blocks 2009-09-18 09:12:26 +01:00
Carsten Dominik 60bf447608 Include the final newline when narrowing to a subtree 2009-09-18 07:17:24 +01:00