Commit graph

1538 commits

Author SHA1 Message Date
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
Carsten Dominik cd6408d992 Fix bug with past preference in scheduled dates 2009-09-17 22:12:12 +01:00
Carsten Dominik 0fd5ebc3bc Fix archiving for MobileOrg 2009-09-17 21:54:54 +01:00
Carsten Dominik 5deffac8f6 Fix some bugs in MobileOrg support 2009-09-17 13:46:25 +01:00
Carsten Dominik c6b51ed889 Implement a new agenda view for finding and working on flagged entries 2009-09-17 07:35:34 +01:00
Carsten Dominik 21ee85d4b3 Implement exporting agenda views to Org files
This will be used for MobileOrg.
2009-09-17 07:35:34 +01:00
Carsten Dominik 8c9eee443d Reorganize the Agenda menu
I needed more space to add the MobileOrg commands, and I also think it
is more consistent now.
2009-09-17 07:35:33 +01:00
Carsten Dominik 4f58389074 Add menu commands for MobileOrg in the Org menu 2009-09-17 07:35:33 +01:00
Carsten Dominik 71d5620c0b Autoload org-mobile.el 2009-09-17 07:35:33 +01:00
Carsten Dominik 0ea7f02336 Fix bug when forcing an ID onto an item.
The bug happened when calling org-id-get from another buffer.
It is then important to switch to that buffer when the new ID is
created.
2009-09-17 07:35:33 +01:00
Carsten Dominik cbafbe5f08 Make default clocktable properties configurable
Jeff Kowalczyk writes:

> I frequently use clocktables, and always use scope: subtree. The
> default scope is file.
>
> If it doesn't exist already (I didn't find it with grep), an org
> customization variable for this preference would be very helpful.
2009-09-17 07:35:23 +01:00
Carsten Dominik 5e40b963cc Fix typo affecting iswitchb completion 2009-09-17 07:35:04 +01:00
Carsten Dominik 2690dcb4ab Install org-crypt.el by John Wiegley and Peter Jones 2009-09-16 14:05:40 +01:00
Carsten Dominik 1530e0eafe Fix bugs with TBLNAME
Francesco Pizzolante writes:

> I'm using orgmode 6.30c and I still have this problem: if
> the #+TBLNAME: tag is not located in column 0, the remote
> reference does not work.
>
> Here's my little test:
>
> #+TBLNAME: A
>    |   |     T |
>    |---+-------|
>    |   |  2.00 |
>    |   |  5.00 |
>    |---+-------|
>    | # |  9.00 |
>    | ^ | total |
>    #+TBLFM: $2=vsum(@-I..@-II);%.2f
>
>    #+TBLNAME: price
>       |    T |    PU | Total |
>       |------+-------+-------|
>       | 9.00 | 10.25 | 92.25 |
>       |------+-------+-------|
>    #+TBLFM: @2$1=remote(A,$total);%.2f::@2$3=$1*$2;%.2f
>
>
> Just add a few spaces at the first line and when you recompute
> the second table you get a "Can't find remote table A" message.
>
> Moreover, in a LaTeX environment, using the orgtbl minor mode,
> the highlighting (font locking) does not work on the #+TBLNAME:
> line, even if located in column 0.
2009-09-15 14:11:21 +01:00
Carsten Dominik c2a3a379a9 Make odd-level conversion work in outline-mode files 2009-09-15 07:44:53 +01:00
Carsten Dominik bf923fdb6f Remove space at eol in planning lines 2009-09-12 15:03:20 +02:00
Carsten Dominik 0054bf1105 Store link to referenced entries in agenda
Peter Westlake writes:

> Could I request this as a small feature enhancement, please?
> Commands like org-refile have an agenda equivalent so that
> the same keys work in the agenda, and it would be very nice
> to be able to store a link to an item that way as well.
2009-09-12 07:05:21 +02:00
Carsten Dominik 317ea8bf9d Amend Bastiens fix in 3bc997fe8f
This fix did create a new problem with exporting selected subtrees.
I hope it works now.
2009-09-10 22:37:49 +02:00
Carsten Dominik c1524ad9fa Fix arg handling for org-contents
When odd levels are being used, change the interpretation of a
numerical arg to S-TAB.

Michael Brand writes:

> I like the org-indent-mode with the soft-indentation but even more I
> like the hard-indentation with `#+STARTUP: odd hidestars' instead for
> which I have a question.
>
> This is the content of the example file oddeven:
> -*- mode: org -*-
> #+STARTUP: oddeven hidestars content
> * 1 Org Mode
> ** 1.1 Introduction
> *** 1.1.1 Installation
>
> This is the content of the example file odd:
> -*- mode: org -*-
> #+STARTUP: odd hidestars content
> * 1 Org Mode
> *** 1.1 Introduction
> ***** 1.1.1 Installation
>
> The different _Emacs-faces_ (colors) for the heading levels are the same
> when comparing the two files. This Emacs-internal adaptation I
> appreciate a lot.
>
> C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_ with
> the file odd. Is this how it is intended to work for the file odd?
2009-09-10 18:30:42 +02:00
Bastien Guerry 6c7f8790fb org.el (org-check-agenda-file): Use a more explicit message
Requested by Daniel Clemente.
2009-09-09 18:37:57 +08:00
Carsten Dominik 92520bed1b Fix bug in table export 2009-09-08 15:45:11 +02:00
Bastien Guerry 84c2435968 Minor visual improvements.
org.el (org-offer-links-in-entry): Don't use "Select link" as a prompt
in the temporary window.

org-agenda.el (org-agenda-bulk-mark): Use a slightly soberer prefix for
marked entries in the agenda view.
2009-09-08 11:10:13 +08:00
Bastien Guerry 3f640c191a outline-end-of-subtree: Bugfix.
Advise this function in a way that prevents any trailing character from
being displayed.  Patch by Andreas Burtzlaff <andy13@gmx.net>.
2009-09-08 06:38:20 +08:00
Carsten Dominik 1db9613478 Fix bugs in the agenda bulk action menu
The commands in the menu still reflected the old implementation which
had a single key for toggling the mark.

Reported by Giles Chamberlin
2009-09-07 14:54:32 +02:00
Carsten Dominik ecb3e99a46 Speedup table export which was slow 2009-09-07 14:49:43 +02:00
Carsten Dominik 97ecc2c180 LaTeX export: Fix bug with accidental multiline protection in comments 2009-09-06 07:54:31 +02:00
Carsten Dominik 25226d7d65 Minor fixes o the edit src code mechanism
Patch by Dan Davison
2009-09-06 07:53:21 +02:00
Carsten Dominik c5a26208a8 More user options to clean up entry text that will be shown in the agenda.
> > New mode to show some entry body text in the agenda
> > ----------------------------------------------------
> > There is now a new agenda sub-mode called
> > `org-agenda-entry-text-mode'.  It is toggled with the `E' key.
> > When active, all entries in the agenda will be accompanied by a
> > few lines from the outline entry.  The amount of text can be
> > customized with the variable `org-agenda-entry-text-maxlines'.
>
>
> this already avoids displaying drawer lines.
> I also see lines like:
>
>     - State "DONE"       from "WARTEN"     [2009-08-04 Di 16:19]
>     - State "DONE"       from "WARTEN"     [2009-07-02 Do 09:43]
> ...
>
> and in my remeber templates I always create lines like:
>
>      created: [2009-08-03 Mo 11:46]
>
> with the creation date of the entry.
> Would it be possible and make sense to set up a variable for a
> regexp to exclude lines like the ones above from showing?

This commit sets up such a variable, and also a hook.
2009-09-05 07:53:46 +02:00
Carsten Dominik 206660bc8c Store link: Don't error before the first heading in a file
Matt Lundin writes:

> When I call org-remember or org-store-link above the first headline in
> an org buffer, I receive the following error message:
>
>    Before first headline at position 1 in buffer index.org
>
> It seems that either org-remember or org-store-link (or both) calls
> org-back-to-heading in order to grab the relevant heading for
> annotation. As a result, if I try to store a link above the first
> heading, emacs spits out the error message above because there is no
> heading to return to.
>
> Is this the intended behavior? Sometimes I prefer to create a link to
> the file as a whole rather than to a particular headline. E.g., I might
> want to create a todo to organize notes.org, which is not an agenda
> file. In this instance, it does not matter whether org-remember creates
> a link to a particular headline. In fact, I would prefer a link to the
> file as a whole and thus expect to be able to store a link while on the
> first empty line of the file or on #+TITLE.
2009-09-04 13:11:18 +02:00
Carsten Dominik c125359a9b Stop iswitchb tag completion from including virtual files
Tassilo Horn writes:

> When I want to set a tag using `C-c C-q TAB' I get a iswitchb completion
> prompt, cause org-completion-use-iswitchb is t.  I also use iswitchb's
> virtual files feature (iswitchb-use-virtual-buffers set to t), which
> includes files that aren't opened in a buffer, but are in the recentf
> list.  This is a cool thing when switching buffers (I barely use C-x C-f
> anymore and switch to the virtual buffer instead), but totally useless
> and annoying for tab completion in org.
>
> So when completing anything (files/tags/...) in org with iswitchb,
> switchb-use-virtual-buffers should be let-bound to nil before.
2009-09-04 12:30:06 +02:00
Carsten Dominik 0c646a1b57 Fix bug with showing empty lines before header
PT writes:

> I tried this new setting with 6.30 and it works well, thanks for
> this.
>
> The only strange case is when a header line doesn't have any
> content, only empty lines.
>
> So if there are 2 empty lines between headers
>
> * header1
>
>
> * header2
>
>
> Then the first empty line after header1 is folded regardless of
> the -1 setting.  If I understand the feature correctly no folding
> should occur in this case either.
2009-09-04 10:59:36 +02:00
Carsten Dominik 9d5cc8e422 Agenda: Support for including a link in the category string
The category can contain a bracket link.  This commit makes sure that
the prefix in the agenda looks OK if there is a link, and that the
link is accessible with `C-c C-o 0'.
2009-09-04 08:24:38 +02:00
Carsten Dominik c7c2ec4bc7 Fix Emacs 22 bug in `org-agenda-quit' 2009-09-03 13:53:03 +02:00
Carsten Dominik 146faeeb96 Export: Remove footnote references from TOC lines 2009-09-03 08:14:45 +02:00
Carsten Dominik c855e4cbcc Restore the window configuration after editing table formulas
Karl Stump writes:

> Table Editing Cycle With Multiple Windows On One Buffer Does Not
> Return to Start State
>
> When I have two windows open on two buffers, one to a table in a
> file that I'm editing, the other to some other file of interest,
> the editing cycle of C-` ... C-c C-c works great, meaning that
> when the cycle is finished, the windows are restored to the start
> state.
>
> But when I have two windows open on the same buffer, one window
> on the table, and the other window somewhere else, the editing
> cycle does not restore to the beginning state.
2009-09-03 08:10:36 +02:00
Carsten Dominik d48465bf1c Export: Allow macro definitions to contain other macros
Patch by Daniel Clemente
2009-09-03 08:10:36 +02:00
Carsten Dominik 0f9ad773c0 Fix bug with invisible agenda items
Peter Westlake writes:

> This is quite obscure, and an odd corner case, but here it is.
>
> If you have an item which is:
>
> - a TODO
> - scheduled
> - ordered
> - blocked by a child TODO
>
> then it leaves an empty line in the agenda.
>
> Here's a test case:
> ,----
> | * Press t r on this line in the agenda
> |   SCHEDULED: <2009-09-02 Wed>
> |   :PROPERTIES:
> |   :ORDERED:  t
> |   :END:
> | *** TODO Report invisible scheduled items
> `----
>
> C-a a a will show an agenda with "Scheduled: Press t r ...".
> Press "t" on that line to add a TODO.
> Press "r" to redisplay, and see the line go blank.
>
> Peter.
2009-09-03 08:10:36 +02:00
Carsten Dominik e34f7fc202 Add autoloads in org-protocol.el 2009-09-02 14:40:25 +02:00
Carsten Dominik 1152565013 Avoid using time-to-seconds 2009-09-02 14:37:47 +02:00
Carsten Dominik c54a49b7cc Keep compiler happy and fix some ChangeLog issues
This is in preparation for the next sync with Emacs.
2009-09-02 11:29:59 +02:00
Carsten Dominik fa2a21c313 Fix bug with line protection while including source code files
There was an issue that lines starting with a space followed by #
would be protected when importing the file, but not unprotected when
formatting the example.  The reason for this issue is that we recently
changed to protect indented #+ lines.
2009-09-02 10:42:46 +02:00
Carsten Dominik 2daabacc29 Require cl in org-html.el 2009-09-02 10:39:55 +02:00
Carsten Dominik dcd1255762 Avoid using the variable `default-major-mode'. 2009-09-02 09:30:22 +02:00
Carsten Dominik 1d04b205e6 Release 6.30a 2009-09-02 09:00:23 +02:00
Carsten Dominik 24e7c62b84 Some small fixes 2009-09-02 08:53:06 +02:00
Carsten Dominik 49d54ab90f Fix bug with editing fixed width region 2009-08-31 18:41:06 +02:00
Carsten Dominik aedef8c804 LaTeX export: Protect ampersands in tables 2009-08-31 14:27:28 +02:00
Carsten Dominik e20a6e44b8 Fix regexp match issue when exporting large source code snippets 2009-08-31 12:17:58 +02:00
Carsten Dominik 522ef218db Links: Improve offering entry links when there are many an duplicate ones 2009-08-31 09:31:43 +02:00
Carsten Dominik 7792fb837a Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/ChangeLog
2009-08-31 08:53:35 +02:00
Carsten Dominik 4d7494d58b Agenda: Make `org-agenda-cycle-show' more consistent with normal cycling 2009-08-31 08:08:22 +02:00
Carsten Dominik d30e537868 Fix web linking in org-gnus.el
Reported by Matt Lundin, fixed by Leo.
2009-08-31 07:26:38 +02:00
Bastien Guerry 3bc997fe8f org-latex.el: bugfix about exporting first lines with no heading.
org-export-latex-first-lines was confused when there was no
heading after the first headlines.  This patch fixes this.
2009-08-30 19:10:06 +08:00
Carsten Dominik 6bddc14c20 New effort-setting commands
To set the effort property without going to column view.
2009-08-29 20:21:15 +02:00
Carsten Dominik 95d1e4e4f3 Agenda: Keep window setup when calling org-agenda from within agenda buffer 2009-08-29 20:16:28 +02:00
Carsten Dominik 8a0ae0d3e5 LaTeX export: Fix bug with longtable export.
Karl Stump writes:

> When exporting a table with a horizontal line the column count is wrong.
>
> Output from pdflatex run:
>
> ! Extra alignment tab has been changed to \cr.
> <template> \endtemplate
>
> l.32 ....\multicolumn{4}{r}{Continued on next page}
>                                                   \
> ?
>
> Here's the table in the tex file:
>
> \begin{longtable}{||lll||}
> \caption{This is a long table with lines around and between cells}\\
>  Heading1  &  Heading2  &  Heading3 \\
> \hline
> \endhead
> \hline\multicolumn{4}{r}{Continued on next page}\
> \endfoot
> \endlastfoot
> \hline
>  alpha     &  beta      &  gamma     \\
>            &            &            \\
> \end{longtable}
>
> Here's the org file:
>
> ** table export test
>
> #+CAPTION: This is a long table with lines around and between cells
> #+LATEX_HEADER: \usepackage[landscape]{geometry}
> #+LATEX_HEADER: \geometry{left=0.12in,right=0.12in,top=0.25in,bottom=0.25in}
> #+ATTR_LaTeX: longtable align=||lll||
>
>     | / | <30>     | <10>     | <10>     |
>     |   | Heading1 | Heading2 | Heading3 |
>     |---+----------+----------+----------|
>     |   | alpha    | beta     | gamma    |
>     |   |          |          |          |

Nick Dokos replies:

> I believe it's because of the dummy "calculation-mark" column,
> which is not exported. However, the variable org-table-last-alignment
> (a list, whose length becomes the value of the \multicolumn argument)
> ends up having the value (nil nil nil nil), i.e. it counts the dummy
> column as well. What the proper place to adjust the value is, I don't
> know, but it should be easy for Carsten to fix it. For the time being,
> you can either get rid of the dummy row and column (e.g. if you don't
> need the widths) or fix it by hand in the LaTeX file.

Indeed, and this commit pops `org-table-last-alignment' if the first
column has been removed by `org-table-clean-before-export'.  The same
problem must have caused a one-off error when setting the alignment in
LaTeX tables, bu it seems nobody has noticed this so far.  Anyway,
also this is fixed now.
2009-08-29 07:22:33 +02:00
Carsten Dominik 93ea7371bd Fix bug when removing scheduled/deadline times
Bernt Hansen writes:

> I ran into this a few weeks ago and it's been bugging me.
>
> I reorganized a project which had a deadline on the main task and moved
> it down to multiple subtasks in the project.
>
> ,----
> | * TODO Project task
> |   DEADLINE: <2009-08-28 Fri>
> | ** TODO Step 1
> | ** TODO Step 2
> | ...
> | ** TODO Step n
> `----
>
> I decided the DEADLINE really doesn't belong at the top -- since the
> deadline was for step 2 (and a few other tasks)... so I moved it the
> hard way.  Instead of cutting it out and pasting it back in the right
> tree I just used C-c C-d and entered the same date on step 2 (because I
> was moving the date a bit from the original date).
>
> ,----
> | * TODO Project task
> |   DEADLINE: <2009-08-28 Fri>
> | ** TODO Step 1
> | ** TODO Step 2
> |    DEADLINE: <2009-08-28 Fri>
> | ...
> | ** TODO Step n
> `----
>
> Now to remove the deadline from the Project task I just did C-u C-c C-d
> on the Project task but this removed all the deadlines in the subtree
> and my deadline in Step 2 (and others) is now gone.
>
> AFAICT SCHEDULED: works the same way.  This doesn't feel natural to me
> but I know it is documented this way.
>
> Does the way it works now really make sense or would just removing the
> deadline from the task you are working on be better.
>
> C-c C-d sets a deadline just for this task, so it felt natural to me
> that C-u C-c C-d would remove the deadline just for this task -- but
> that's what I get for not reading the manual (or forgetting since I read
> it ;)
2009-08-28 14:41:15 +02:00
Carsten Dominik 31b0deb4aa Add language abbreviation "elisp" for "emacs-lisp".
Patch by Eric Schulte.
2009-08-28 13:03:12 +02:00
Carsten Dominik 012eabc35f Links: Make C-c C-o on a headline offer all links in headline and entry text 2009-08-28 10:42:37 +02:00
Carsten Dominik 5f35facc1a Docstring fix, patch by Gregory J. Gubbs 2009-08-28 10:05:11 +02:00
Carsten Dominik 10d59f78bb Squash yet another bug due to outline-functions skipping invisible headings.
Bernt Hansen writes:

> I think I have something that is reproducible.
>
> ,----[ /tmp/x.org ]
> |
> | * Refile Targets
> | ** TODO One
> | ** TODO Two
> | ** TODO Three
> | ** TODO Four
> | ** TODO Five
> | ** TODO Six
> | *** TODO Six.one
> | *** TODO Six.two
> | **** TODO Clock me
> | ** TODO Seven
> | ** TODO Eight
> | ** TODO Nine
> | ** TODO Ten
> | * Refile Tasks
> | ** TODO Refile Me
> `----
>
> ,----[ /tmp/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)
> |
> | (setq org-log-done (quote time))
> | (setq org-log-into-drawer t)
> | (setq org-agenda-files '("/tmp/x.org"))
> | (setq user-init-file "/tmp/custom.el")
> |
> | (setq org-refile-allow-creating-parent-nodes nil)
> | (setq org-refile-targets (quote ((nil :maxlevel . 2) (org-agenda-files :maxlevel . 2))))
> | (setq org-refile-use-outline-path nil)
> | (setq org-todo-keywords (quote ((sequence "TODO(t!)" "STARTED(s!)" "|" "DONE(d!/!)") (sequence "WAITING(w@/!)" "SOMEDAY(S!)" "OPEN(O@)" "|" "CANCELLED(c@/!)") (sequence "QUOTE(q!)" "QUOTED(Q!)" "|" "APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)"))))
> `----
>
> Steps to reproduce:
>
>  1. Save the files /tmp/x.org and /tmp/minimal.emacs
>  2. emacs -q -l /tmp/minimal.emacs /tmp/x.org
>  3. Go to CONTENTS view with S-TAB twice
>  4. Put point on **** TODO Clock Me
>  5. Clock in the task with C-c C-x C-i
>
>     This adds a logbook drawer with the clock
>
>  6. Fold to OVERVIEW view with S-TAB
>
>     So it looks like this
>
>     ,----[ x.org folder ]
>     |
>     | * Refile Targets...
>     | * Refile Tasks...
>     `----
>
>  7. M-x org-clock-goto
>
>     This reveals the buffer like so:
>
>     ,----
>     |
>     | * Refile Targets...
>     | **** TODO Clock me
>     |      :LOGBOOK:...
>     | ...
>     | * Refile Tasks...
>     `----
>
>     I think this is the critical step.
>
>  8. Put point on Refile Tasks
>  9. Show task to refile with TAB
>  10. Put point on ** TODO Refile Me
>  11. Refile to Ten with C-c C-w Ten RET
>  12. Put point on Refile Me
>  13. Reveal with C-c C-r
>
>      Shows that we are under TODO Ten.  So far so good
>
>      ,----
>      |
>      | * Refile Targets...
>      | **** TODO Clock me
>      |      :LOGBOOK:...
>      | ...
>      | ** TODO Ten
>      | *** TODO Refile Me
>      | * Refile Tasks
>      `----
>
>  14. Now repeat steps 10-13 but refile to 'Two' instead of 'Ten'
>
>      This goes to the wrong place.  This files under Nine for me
>
>      ,----
>      |
>      | * Refile Targets...
>      | **** TODO Clock me
>      |      :LOGBOOK:...
>      | ...
>      | ** TODO Nine
>      | *** TODO Refile Me
>      | ** TODO Ten
>      | * Refile Tasks
>      `----
>
>  15. Repeat steps 10-13 with refiling to 'Two' each time
>
>      This moves Refile Me up one task at a time until it gets to Two
>      ie. it refiles to Eight, then Seven, then Six, then Five, then
>      Four then Three, then Two.
>
> If you show contents view with S-TAB and then refile it goes to the
> right place immediately.  So this definitely has something to do with
> the folded view of the org file.
>
2009-08-28 08:51:07 +02:00
Carsten Dominik bbc27c011a Agenda: When in separate frame, mark the frame dedicated.
Henry Atting writes:

> If org agenda is displayed in an other frame then windows aren*t
> restored when quitting, I have to kill the frame manually.  I
> really would like it to behave like e.g. gnus-other-frame which
> automatically kills his frame on quitting.
2009-08-27 18:18:28 +02:00
Carsten Dominik fa36f186b2 New keys for switching the agenda through time.
The new keys are b and f.  This used to be on the cursor keys, but
they do now again do cursor motion.

This is a significant change in the UI, I hope this will not cause too
many problems.
2009-08-27 16:08:55 +02:00
Carsten Dominik 8160044f2e Avoid problems with table alignment an overlays.
We now first insert a new aligned table, and then remove to old one,
this helps to keep overlays after the table from covering table text
as well.
2009-08-27 12:50:36 +02:00
Carsten Dominik 210251347c Better error message for parsing a bogus time string 2009-08-27 12:02:21 +02:00
Carsten Dominik 44bb3134d0 Revert "LaTeX export: Fix problem with emphasis in quotes"
This reverts commit 0ba7d3d2f9.

Conflicts:

	lisp/ChangeLog
2009-08-27 10:29:04 +02:00
Carsten Dominik 350691164b Avoid calling `goto-line' from lisp programs 2009-08-27 10:24:09 +02:00
Carsten Dominik dc0f321e94 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/ChangeLog
2009-08-27 09:57:51 +02:00
Carsten Dominik 632d7813ec Agenda: New submode to show entry text inline with the agenda entries.
The key access it `E'.
2009-08-27 09:56:46 +02:00
Carsten Dominik d0bee84a32 Force visual line motion off in the agenda 2009-08-27 07:42:12 +02:00
Bastien Guerry c34ca53f2f org-notify: bugfix by Bernt Hansen. 2009-08-26 11:28:25 +08:00
Carsten Dominik 8a72889e39 Agenda: Improve of the command `org-agenda-open-link'
It can now handle multiple links in the entry, as well as entry text
pulled in via `E'.
2009-08-25 22:45:58 +02:00
Carsten Dominik babb63a27f Simplify storing links from gnus
Patch by Leo, with Tassilo's and Bastien's blessing
2009-08-25 13:43:33 +02:00
Carsten Dominik c03d64ceb2 Merge branch 'fix-plain-links'
Conflicts:
	lisp/ChangeLog
2009-08-25 11:13:27 +02:00
Carsten Dominik 1c8b0c3b41 Do not add extra empty lines for display formulas
Longmin Wang writes:

> Hi,
>
> I am using org-mode integrated in emacs 23.1.1.  When I export
> the org file to html file, the enumerations will be interrupted
> by some displayed math formulae. For example, the codes
>
>  1. The first.
>
>  2. A displayed formula: \[ \int_0^{+\infty} \frac{c}{1+x^2}dx=1. \]
>
>  3. The third.
>
> will generate
>
>   1. The first.
>   2. A displayed formula:
>   <the formula>
>   1. The third.
>
> Is it a bug? Or I made some mistakes in the source file.
2009-08-25 11:05:36 +02:00
Carsten Dominik 0688613ca8 Test implementation for agenda showing some amount of entry text 2009-08-24 18:43:10 +02:00
Carsten Dominik 9eaab0b5cf Visibility Cycling: Allow to show all empty lines after a headline
`org-cycle-separator-lines' can now get a negative value, to indicate
that, if the number of empty lines before a visible entry is greater
than the specified number, then *all* empty lines should be shown.
2009-08-24 14:50:40 +02:00
Carsten Dominik 0b0460703a Fix plain link export 2009-08-24 11:13:00 +02:00
Carsten Dominik 0db9bf496c Remember: Allow to escape % 2009-08-24 07:16:27 +02:00
Bastien Guerry 754694dd4b Use org-notify to show a notification and possibly play a sound. 2009-08-24 02:44:29 +08:00
Bastien Guerry 486e807b1b org-gnus.el: Handle gnus-summary-mode' and gnus-article-mode' separately.
Use `gnus-summary-article-header' function when in gnus-summary-mode.
This way the article doesn't get displayed unnecessarily.  We don't use
this function in the gnus-article-mode because it is not reliable.

Thanks to Leo for this suggestion.
2009-08-24 02:28:53 +08:00
Carsten Dominik 5e9fc20394 Allow language names where the major mode name seems unrelated to the language
Eric Schulte writes:

> Attached is a small patch for a small issue.
>
> Sometimes a language uses a major mode which can't be guessed
> from it's name.  This patch introduces the `org-src-lang-modes'
> variable which can be used to map language names to major modes
> when this is the case.  This is used when editing a source-code
> block, or when exporting fontified source-code with htmlize.
>
> So far the only instance of this that I know of is ocaml and
> tuareg-mode, so that's the only thing that `org-src-lang-modes'
> is pre-populated with.  Maybe there are other instances as well?
2009-08-23 19:31:47 +02:00
Carsten Dominik 0a7e8ab221 LaTeX export: Modify the structure of the listings name option.
The variable `org-export-latex-listings-langs' is now an alist.
2009-08-23 19:11:12 +02:00
Carsten Dominik a48fe32c4c LaTeX export: Avoid footnote processing in LATEX_HEADER lines
Nick Dokos writes:

> I define a LaTeX macro at the top of my document, like so:
>
> ,----
> | ...
> | #+LATEX_HEADER: \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
> | #+LATEX_HEADER:   #1\ignorespaces
> | #+LATEX_HEADER: }
> | ...
> `----
>
> and export - I get the following inserted:
>
> ,----
> | ...
> | \begin{document}
> |
> |
> |
> |
> |
> | \$\^{}{1}\$ FOOTNOTE DEFINITION NOT FOUND: 1
> | ...
> `----
>
> Obviously, the macro argument spec is mistaken for a footnote.
2009-08-21 06:44:29 +01:00
Carsten Dominik eece1706ff Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/ChangeLog
2009-08-20 10:19:36 +01:00
Carsten Dominik 62b932c8d5 Make folded blocks searchable
Patch by Eric Schulte
2009-08-20 08:59:34 +01:00