Commit Graph

1392 Commits

Author SHA1 Message Date
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