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

1536 commits

Author SHA1 Message Date
Bernt Hansen de62618009 Fix before first heading check
* lisp/org.el (org-before-first-heading-p): If point is on an org-mode heading line then we are not before the first heading

If point is anywhere on the first line of the first heading then we
are not before the first heading.  This makes
org-before-first-heading-p returns t instead of nil when on the '*' or
blank of the first level 1 heading in an org file.

This was noticed when the first heading has an encryption
tag :crypt:. C-c C-r would not decrypt this entry if point is at the
beginning of the line since it was considered before the first
heading.
2010-12-20 13:22:05 +01:00
Julien Danjou ce837d0e8f org: rework `org-set-property'
* org-capture.el (org-capture-fill-template): Use `org-set-property'
directly.

* org.el (org-set-property): Split property and values reading.
(org-read-property-name, org-read-property-value)
(org-set-property-function): New functions.
(org-property-set-functions-alist): New variable.

The goal of this patch is to introduce a special variable
`org-property-set-functions-alist'. This variable allows to read
properties values in a more intelligent way from `org-set-property' or
from `org-capture'.

For that, it simplifies the `org-set-property' code and remove
duplication between `org-capture' and `org-set-property'.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-17 18:37:30 +01:00
Julien Danjou 073391f5a7 Allow to retrieve email link date
* org.el (org-email-link-description): Allow to retrieve email link date.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-16 14:17:54 +01:00
Lawrence Mitchell 32be74e098 Quote any special characters in org-make-target-link-regexp
* lisp/org.el (org-make-target-link-regexp): regexp-quote target
before replacing whitespace.

Previously a radio link <<<...>>> would match all three-letter words
in the buffer.  The manual indicates the radio links are meant to
match literally (modulo whitespace differences), so we should
regexp-quote all the targets to avoid over-eager matching.
2010-12-16 14:12:28 +01:00
Bastien Guerry eb0d35dd18 Fix typo (which broke lisp/org.el).
Thanks to Matt Lundin for a warning about this.
2010-12-14 21:48:43 +01:00
John Wiegley 14350cac34 Added FILE meta-property 2010-12-14 02:02:40 -05:00
Matt Lundin 4760c3b948 Make timestamp search in org-entry-properties more efficient.
* lisp/org.el: (org-entry-properties) Stop scanning for timestamps if
a specific timestamp property (e.g., DEADLINE, SCHEDULED, etc.) is
requested and a match is found. Also, if a specific timestamp property
is requested, do not push non-relevant timestamps onto property list.

This change only effects org-entry-properties when a specific
timestamp is requested with the special flag, as in:

(org-entry-properties nil 'special "SCHEDULED")

Previously, even if only the SCHEDULED timestamp was requested,
org-entry-properties would parse all the timestamps in an entry. This
extra parsing could slow down the construction of agenda views,
especially with entries that contained a large number of log
items (CLOCK, state changes, etc.). The function org-entry-get,
however, is only interested in the first occurrence of the item. When
looking for a specific type of timestamp, org-entry-properties now
stops searching for timestamps after the match is found, unless the
property is "CLOCK".

Here are the relevant ELP results:

Before:

org-entry-get	     296         0.4724579999  0.0015961418
org-entry-properties 31          0.3438769999  0.0110928064

After:

org-entry-get        296         0.1447729999  0.0004890979
org-entry-properties 31          0.015765      0.0005085483
2010-12-13 15:13:36 +01:00
Carsten Dominik 651e137c50 Make sure windows are created correctly on full-screen sessions
Patch by Leo
2010-12-12 08:36:49 +01:00
Carsten Dominik 7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik 76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
Carsten Dominik 1330048ba0 Keep byte compiler happy 2010-12-10 14:13:05 +01:00
Carsten Dominik 9df61b6c3e Fix typos 2010-12-10 11:12:56 +01:00
Julien Danjou 330721f406 org: remove useless computed value in org-make-tags-matcher
* org.el (org-make-tags-matcher): Remove useless cat-p value.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-10 07:30:24 +01:00
Julien Danjou 8c2f37270d org-entry-properties: enhance docstring
* org.el (org-entry-properties): Enhance docstring.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-10 07:29:14 +01:00
Nicolas Goaziou aa9fbbb323 Fix cycling indentation with inline tasks
* org.el (org-current-level): ignore inline tasks when getting current
  level of entry
2010-12-06 19:13:09 +01:00
Nicolas Goaziou 5bbce0473d Fix indentation after an inline task with drawers
* org.el (org-indent-line-function): ignore drawers inside inline
  tasks  if the line to indent isn't inside an inline task itself.
2010-12-06 19:13:09 +01:00
Nicolas Goaziou 9be9f727f8 Fix LaTeX export of subtrees and inline tasks 2010-12-06 19:13:09 +01:00
Nicolas Goaziou 5ecd79ea74 Handle inline tasks when marking a subtree
* org-inlinetask.el (org-inlinetask-outline-regexp): new function
* org-inlinetask.el (org-inlinetask-goto-beginning): new function
* org-inlinetask.el (org-inlinetask-goto-end): new function
* org.el (org-mark-subtree): new command
* org.el (org-speed-commands-default, org-mode-map): make use of new command
2010-12-06 19:13:09 +01:00
Carsten Dominik e9215698a2 Revert "Fix :VISIBILITY: handling of nested "folded" properties"
This reverts commit 383802d063.

The commit had org-mode process the headlines from bottom to top, which
meant that any changes to the visibility of lower headlines were
overridden/modified by changes higher up the tree. Reverting the commit
causes VISIBILITY to work correctly.
2010-12-06 10:06:21 +01:00
Matt Lundin c8ab88cb69 Allow user to limit amount of context stored in file link search strings
* lisp/org.el: (org-make-heading-search-string) Optionally limit
  number of lines stored in file link search strings.
  (org-context-in-file-links) Add option to set to integer specifying
  number of lines.
2010-12-06 10:05:29 +01:00
Carsten Dominik 73d361d844 Empty properties when cloning an entry
Patch by Mike Mc Lean
2010-12-06 10:03:04 +01:00
Carsten Dominik 238c815502 Revert "org: use org-today in habits auto repeat"
This reverts commit d1eb6cb25b.
2010-12-04 00:19:22 +01:00
Carsten Dominik 316e7e5fbc Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/org-agenda.el
2010-12-03 22:03:06 +01:00
Carsten Dominik 94c19c82b7 Make compiler happy
* lisp/org-clock.el (org-quarter-to-date): Define variables.
(org-clock-special-range): Defin variables.  Use org-floor*.
(org-clocktable-write-default): Define tcol.
* lisp/org-compat.el (org-floor*): New function.
* lisp/org-complete.el: Declare external functions and variables.
2010-12-03 10:20:41 +01:00
Julien Danjou d1eb6cb25b org: use org-today in habits auto repeat
* org.el (org-auto-repeat-maybe): Use org-today.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-01 00:48:51 +01:00
Julien Danjou 2e08843369 Rename org-agenda-today to org-today.
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-01 00:48:28 +01:00
Sébastien Vauban 6d33af4a5c Fix documentation for global tag list during capture
* lisp/org.el (org-complete-tags-always-offer-all-agenda-tags): Fix
docstring.
2010-11-29 10:28:07 +01:00
Carsten Dominik 1123a5d48e Edit formulas with "C-c '"when in TBLMF line
* lisp/org.el (org-edit-special): Edit formulas when in TBLMF line

Conflicts:

	lisp/org.el
2010-11-27 08:05:00 +01:00
Carsten Dominik 9cc19e3919 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/org.el
2010-11-24 23:44:04 +01:00
Eric Schulte b5f7b02814 "wrap" :results header argument wraps code block results
* lisp/ob.el (org-babel-insert-result): Responds to new "wrap" header
  argument.
  (org-babel-merge-params): Includes new "wrap" header argument in
  one of the results header argument exclusive groups.

* lisp/org.el (org-additional-option-like-keywords): Fontify begin and
  and results lines as comments.
2010-11-24 10:19:44 -07:00
Dan Davison fb008fdd88 Add some more keywords for completion
* lisp/org.el (org-additional-option-like-keywords): Add more keywords,
and colons to some old ones.
2010-11-23 15:11:14 +01:00
Achim Gratz 95bb16661b Fix byte compiler warnings
* org-macs.el (org-called-interactively-p): Wrap function call in
	with-no-warnings.
	(with-silent-modifications) Declare macro for Emacs < 23.2.

TINYCHANGE
2010-11-22 21:22:27 +01:00
Carsten Dominik f692ba3c26 Remove confusion of C-c C-o in footnote with cursor on link
* lisp/org.el (org-open-at-point): Don't do footnote action if cursor is
on a bracket link.

Sebastian Mengin writes:

> Hi,
>
> Consider the following minimal example:
>
> Text[fn:1]
>
> * Footnotes
> [fn:1] Note with a [[file:abecedaire.jpg][link]].
>
> Here with orgmode 7.02, doing C-c C-o on the link moves the cursor on
> [fn:1] and says in the minibuffer: "Position saved mark to ring, go back
> with C-c &", instead of opening the linked file.
>
> Is this a bug?
>
2010-11-20 18:24:18 +01:00
Carsten Dominik dce955fad0 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-20 12:33:45 +01:00
Carsten Dominik 3dc846ae38 Make org-edit-special call the formula editor if cursor is in TBLFM line
* lisp/org.el (org-edit-special): Check also for TBLFM line.

Patch by Thorsten Wagner.
2010-11-20 12:33:37 +01:00
Carsten Dominik 967c71f5ef Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-20 00:11:46 +01:00
Nicolas Goaziou c538b0eeab Fix indentation of drawers, blocks and literal examples
* lisp/org.el (org-indent-line-function): drawers and blocks have no
  influence on indentation of text below. Also fix indentation problem
  with a block at column 0 and add a special case for literal examples.
2010-11-18 16:35:46 +01:00
John Wiegley 0ff8d32131 Now using pcomplete for in-buffer completion 2010-11-18 07:34:16 +01:00
Carsten Dominik 815374e952 Allow a user-define function for getting the base priority of a node
* lisp/org.el (org-get-priority-function): New option.
(org-get-priority): Call `org-get-priority-function' if that
has been set.
2010-11-17 09:12:47 +01:00
Carsten Dominik c2a366ac5a Add command names for chapters 4-7 2010-11-13 10:09:15 -06:00
Carsten Dominik c8832d6e27 Remove [home] and [end] bindings of unknown purpose 2010-11-12 15:35:49 -06:00
Carsten Dominik 1f40cbc596 New option to stop level nine headline to use level 1 face
* lisp/org-faces.el (org-cycle-level-faces): New option.
* lisp/org.el (org-get-level-face): Honor org-cycle-level-faces

Original patch by Jonathan BISSON, modified by Carsten Dominik
2010-11-12 13:37:38 -06:00
Carsten Dominik 42dd7afe45 Fix typo 2010-11-12 12:17:00 -06:00
Carsten Dominik af71c1b049 Send table in Org-mode as well, just like radio tables do it in other modes
* lisp/org.el (org-ctrl-c-ctrl-c): Consider sending a radio table also in Org
2010-11-12 09:28:22 -06:00
Carsten Dominik dd7b13bde8 Fix typo
Patch by Robert Goldman
2010-11-12 09:24:15 -06:00
David Maus 49a00abf3d Remove stale link handler for news: links
* org.el (org-open-at-point): Remove stale link handler for news:
links.

This condition case is never evaluated because the news: link is
already passed to `browse-url'.
2010-11-07 16:21:32 +01:00
Bastien Guerry 6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Nicolas Goaziou e652a1ed85 Simplify and fix indentation code in lists
* org.el (org-indent-line-function): simplify code and remove bug that
  would insert a tab at the beginning of the line when trying to
  indent the item.
2010-11-04 19:05:10 +01:00
Carsten Dominik da0f4997fb Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-04 16:46:25 +01:00
Julien Danjou 3e4b139f1d org-agenda: return multiple results when sexp return a string with "; "
* lisp/org.el (org-diary-sexp-entry): Split sexp result strings at semicolon.

When evaluating my %%(org-calendar-holidays) on October 31st, I got a
line like:

"Halloween; Daylight Saving Time Ends 3:00am (CEST)"

And it displays in calendar:
3:00 .... Halloween; Daylight Saving Time Ends (CEST)

This is wrong since Halloween is all day, not only at 3:00.

Splitting results on "; " allows to have an independant entry on each
event and displays things correctly.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-04 13:05:50 +01:00
Carsten Dominik 106ad6e9e5 Fix sparse tree dispatch menu
* lisp/org.el (org-sparse-tree): Mention [r] in dispatch menu
2010-11-03 23:26:23 +01:00
Carsten Dominik 350b75be63 Rewrite of the clock table code
* lisp/org.el (org-shorten-string): New function.
* lisp/org-exp.el (org-export-convert-protected-spaces): New function.
(org-export-preprocess-string): Call
`org-export-convert-protected-spaces' to handle new hard spaces.

* lisp/org-clock.el (org-clocktable): New customization group.
(org-clocktable-defaults): New option.
(org-clock-clocktable-formatter): New option.
(org-clock-clocktable-default-properties): New option.
(org-dblock-write:clocktable): Rewrite to split out functionality
into separate functions.
(org-clocktable-write-default):
(org-clocktable-indent-string):
(org-clock-get-table-data): New functions.
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-redo):
(org-agenda-clockreport-mode):
(org-agenda-set-mode-name): Rewrite to implement filtered clock tables.
* doc/org.texi (Clocking commands):
(The clock table): New sections.
(Agenda commands): Document filtered clock reports.
2010-11-02 08:47:23 +01:00
David Maus 7bef01a90f Check for heading that ends at end of buffer
* org.el (org-narrow-to-subtree): Check for heading that ends at end
of buffer.
2010-11-01 19:28:11 +01:00
Eric Schulte 421405df19 adding ob-calc to org-babel-load-languages
* lisp/org.el (org-babel-load-languages): adding calc
2010-10-29 19:02:44 -06:00
Carsten Dominik 82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
Łukasz Stelmach 47107b6612 Sexp diary entries may retrurn a list
* lisp/org-agenda.el (org-agenda-get-sexps): Handle lists as return values
from diary entries
* lisp/org-bbdb.el (org-bbdb-anniversaries): Handle lists of anniversaries
* lisp/org.el (org-diary-sexp-entry): Handle lists as return values
from diary entries.

 ukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:

> I've disovered, that %%(org-bbdb-anniversaries) returns (as every other
> sexp) a string. Which is OK if there is only one.
>
>   Anniversaries:  John Doe's 10th wedding anniversary
>
> Unfortunately the agenda view becomes awful if we have noted Jane's
> weeding date too
>
>   Anniversaries:  John Doe's 10th wedding anniversary; Jane Doe's 10th wedding anniversary
>
> And what if we know 3 Eves and 5 Adams and it's Christmas Eve? (Hint:
> their name day)
[...]

As Thomas Bauman pointed out, there are functions that can be used in
sexps which return cons cells like this

    (nil . "Full Moon 3:35am (CEST)")

(this one is diary-lunar-phases), these aren't properly supported by the
previous version of my patch. This one can distinguish between such a
cons cell and a "real" list.

    ("John Doe's 10th wedding anniversary"
     "Jane Doe's 10th wedding anniversary")

This is because

    (consp (cdr '(a . b))) ; => nil

so org-diary-sexp-entry can be made return (cdr result) only in case of
the former cons cell. The third condition in the `cond' block is IMHO
enough as it is now, but if you think adding

    (listp (cdr result))

may help then be it.
2010-10-26 07:27:19 +02:00
Jambunathan K c1b8f41c37 Return 'dedicated on match when search must match exact headline
* org.el (org-link-search): Return 'dedicated on successful match when
org-link-search-must-match-exact-headline is set to t.
2010-10-24 20:35:44 +02:00
Carsten Dominik d0f737e9c2 Post-fix for globablvisibility patch
Patch by Michael Brandt
2010-10-24 18:09:24 +02:00
Carsten Dominik d600831eb7 Use better regexp for finding image links
* lisp/org.el (org-display-inline-images): Improve regexp
2010-10-23 14:43:00 +02:00
Carsten Dominik 94f2f59a93 Fix startup visibility bug
* lisp/org.el (org-cycle): Make sure resetting to startup visibility
works after another cycle command.

Gez writes:

> I have a query about the C-u C-u TAB command.  When I've just edited
> or used S-TAB (no matter which part of the global cycle it's on) C-u
> C-u TAB works as I would expect.  But if I've just used TAB, C-u C-u
> TAB cycles hrough -> CONTENTS -> SHOW ALL etc, even while the mini
> buffer displays "startup visibility plus VISIBILITY properties" at
> each stage of the cycle. C-u C-u TAB also cycles when it's repeated.
> I find it hard to keep track of whether it will cycle or not while I'm
> using it to view areas of the outline, so in effect, the only way I
> feel sure I can quickly return to my desired startup visibility is
> with S-TAB C-u C-u TAB, which is a lot of keystrokes! So my questions
> are - is this expected behaviour?  Can it be changed?
2010-10-22 18:14:18 +02:00
Carsten Dominik e85eee0624 Fix some issues in inline image display
* lisp/org.el (org-display-inline-images): Allow
non-ASCII characters in image file names.  Save match data.

Patch by Taichi Kawabata
2010-10-22 10:52:46 +02:00
Carsten Dominik a841867856 Update all ++ repeaters in an entry
* lisp/org.el (org-auto-repeat-maybe): Fix shifting multiple time stamps.

See http://www.mail-archive.com/emacs-orgmode@gnu.org/msg30284.html.

Patch by Andrew Korty
2010-10-22 09:57:28 +02:00
Carsten Dominik ca991d2ad4 HTML export: Improved support for field alignment, including centering
* doc/org.texi: Document the <c> cookie.
* lisp/org-exp.el (org-store-forced-table-alignment):
(org-export-remove-special-table-lines): Allow the "c" cookie for
table alignment.
* lisp/org-html.el (org-export-table-header-tags):
(org-export-table-data-tags): Add another %s format for the alignment.
(org-export-html-table-align-individual-fields): New option.
(org-format-org-table-html): Implement field-by-field alignment and
support centering.
(org-format-table-table-html): Make sure the new table tag formats
don't break this function.
* lisp/org-table.el (org-table-cookie-line-p):
(org-table-align): Allow for the <c> cookie.
* lisp/org.el (org-set-font-lock-defaults): Allow for the <c> cookie.
2010-10-22 09:19:39 +02:00
Carsten Dominik c41409c530 Enhance XEmacs compatibility
* lisp/org-list.el (org-list-search-unenclosed-generic): Replace call
to booleanp.

* lisp/org-compat.el (org-decompose-region): New defsubst.
* lisp/org.el (org-toggle-pretty-entities):
(org-unfontify-region): Use `org-decompose-region'.
2010-10-17 18:39:26 +02:00
Carsten Dominik c9bb51e883 Make it configurable wether agenda jumping prefers the future
* lisp/org.el (org-agenda-jump-prefer-future): New option.
* lisp/org-agenda.el (org-agenda-goto-date): Use
`org-agenda-jump-prefer-future'.
2010-10-17 08:32:23 +02:00
Carsten Dominik df5894cdcb Fix docstring of `org-insert-heading'
* lisp/org.el (org-insert-heading): Fix docstring.
2010-10-16 07:30:00 +02:00
Carsten Dominik bf8d076bb5 When on the headline of an inline task, insert another inline tasks
* lisp/org.el (org-insert-heading): When on the headline of an inline
task, insert another inline tasks.
2010-10-15 07:51:54 +02:00
Carsten Dominik 19d695ef8f Fix heading insertion with C-RET when inline tasks are involved
* lisp/org.el (org-insert-heading): Skip inline tasks when trying to
insert a new heading after the end of the subtree.
2010-10-14 11:03:47 +02:00
Carsten Dominik d44f065c08 Keep byte compiler happy 2010-10-14 10:36:21 +02:00
Carsten Dominik 575e502a53 Keep byte compiler happy 2010-10-14 10:30:43 +02:00
Carsten Dominik e101ec0c8e Fix headline insertion after inline task
* lisp/org-inlinetask.el (org-inlinetask-min-level): Set customization
type to integer or nil.
* lisp/org.el (org-insert-heading): When after an inline task, do not
use level but go back to headline level before the inline task
2010-10-14 10:29:56 +02:00
Carsten Dominik f5152e03a1 Fix indentation of text in inline tasks
* lisp/org-inlinetask.el (org-inlinetask-in-task-p): New function.
* lisp/org.el (org-indent-line-function): Fix indentation of inline tasks

Patch by Nicolas Goaziou
2010-10-14 10:16:06 +02:00
Carsten Dominik 79e8552ed3 Fix typo in customize type of variable `org-activate-link'
* lisp/org.el (org-activate-links): Fix customize type.
2010-10-14 10:12:41 +02:00
Carsten Dominik d0e70e8c81 Fix mathjax treatment of single letters in between dollars.
* lisp/org.el (org-format-latex): Fix mathjax treatment of single letters
in between dollars.
2010-10-10 09:18:24 +02:00
Carsten Dominik 4a8b676d28 Document the auto' setting of org-blank-before-new-entry'.
* lisp/org.el (org-blank-before-new-entry): Improve docstring.
2010-10-08 12:29:11 +02:00
Carsten Dominik 02357b0c2a Allow comma as a separator when specifying tags
* lisp/org.el (org-set-tags): Allow comma as a separator when
specifying tags at the completion interface.
(org-tags-completion-function): Allow comma as a separator when
specifying tags at the completion interface.

Patch by Richard Riley, extended by Carsten
2010-10-05 09:56:32 +02:00
Bernt Hansen 3b1c72ae9f Always run org-insert-heading-hook when creating headlines
* lisp/org.el (org-insert-heading): Run org-insert-heading-hook when creating
the first heading in a file

The org-insert-heading-hook was skipped when creating the first
heading in a new org file.
2010-09-30 05:22:33 +02:00
Carsten Dominik 9f96a1ead1 New STARTUP keywords to turn on inline images
* lisp/org.el (org-startup-with-inline-images): New option.
(org-startup-options): Add new keywords inlineimages and
noinlineimages.
(org-mode): Inline images when this has been configured.
* doc/org.texi (Handling links):
(In-buffer settings): Document inlining images on startup.
2010-09-29 08:18:39 +02:00
Eric Schulte 60dbabb263 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-26 14:00:41 -06:00
Jambunathan K e7bf631fdc enable speed commands for Babel commands on code blocks
* lisp/org.el (org-speed-command-hook): added org-speed-command-hook
  (org-babel-speed-command-hook): hook for Babel's speed commands
2010-09-23 17:01:17 -06:00
Jambunathan K 1aa89de494 Support for user-extensible speed commands.
* lisp/org.el (org-speed-command-hook): New. Hook for installing
additional speed commands. Use this for enabling speed commands on
src blocks.
(org-speed-command-default-hook): The default hook for
org-speed-command-hook. Factored out from org-self-insert-command
and mimics existing behaviour.
(org-self-insert-command): Modified to use org-speed-command-hook.

TINYCHANGE.
2010-09-23 09:19:39 -06:00
Carsten Dominik 045413afdf Improve completion in #+PROPERTY lines
* lisp/org.el (org-additional-option-like-keywords): Add PROPERTIES to
the list of completable meta line words.
(org-complete): Complete property names after #+PROPERTY
2010-09-23 08:27:25 +02:00
David Maus cc0cc6745a Prevent superfluous colon
* org.el (org-make-link-string): Prevent superfluous colon.
2010-09-22 21:16:29 +02:00
David Maus 400a1457b3 Leave headline intact when creating link
* org.el (org-make-org-heading-search-string): Leave headline
intact.

Otherwise `org-link-search-must-match-exact-headline' set to a non-nil
value won't work properly.
2010-09-22 20:09:26 +02:00
David Maus e14bb168cb Don't escape characters in link type
* org.el (org-make-link-string): Don't escape characters in link type.

Bug reported by Achim Gratz.
2010-09-22 20:04:53 +02:00
David Maus d6b730ea97 Add 'message:' link type to default link types
* org.el (org-link-types): Add 'message:' link type to default link
types.

Jules Bean wrote:
>The link-type "message" is one of the ones org handles by default, it
>is an explicit case in org-open-at-point, much like http and it is
>handled by the following code:

>((member type '("message"))
>	   (browse-url (concat type ":" path)))

>However it is not included in the default value of org-link-types:

>(defvar org-link-types '("http" "https" "ftp" "mailto" "file" "news"
>		       		   "shell" "elisp" "doi"))

>...and therefore it doesn't work when clicked/followed.

>Manually adding it to org-link-types makes it work correctly. For me,
>anyway.
2010-09-20 10:52:49 +02:00
Bastien Guerry ae4372ec87 Remove unused function org-parse-local-options. 2010-09-19 23:34:13 +02:00
Carsten Dominik 3abcc57aa9 Document INVISIBLE-OK argument of `org-forward-same-level'
* lisp/org.el (org-forward-same-level): Fix docstring.
2010-09-18 07:23:16 +02:00
Dan Davison 878d94b472 Some docstring typos 2010-09-16 20:55:25 +01:00
Carsten Dominik a1dc916be6 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-16 17:20:02 +02:00
Jambunathan K 6a92dd4243 Add org-goto-first-child
* lisp/org.el (org-goto-first-child): New command.

Completes existing set of org tree traversal functions.

TINYCHANGE.
2010-09-16 17:13:40 +02:00
Achim Gratz c4644b9e00 silence byte compiler warnings about european-calendar-style
I've investigated further and defvaralias doesn't silence the warnings,
but "with-no-warnings" does.
2010-09-14 09:29:59 +02:00
David Maus 73b8674e72 Fix wrong usage of`org-adapt-indentation'
* org.el (org-store-log-note): Fix wrong usage
of`org-adapt-indentation'.
2010-09-12 18:59:24 +02:00
Nicolas Goaziou 60fcd2fa7e Replace non-interactive use of org-next-item' and org-previous-item'.
* org.el (org-skip-over-state-notes): do not compute bottom point at
  each item.
* org-mouse.el (org-mouse-for-each-item): use `org-apply-on-list'
  instead of moving to each item.
2010-09-12 18:53:18 +02:00
David Maus ece2c578f0 Save match data before call to `read-char-exclusive'
* org.el (org-priority): Save match data before call to
`read-char-exclusive'.

Otherwise interactively calling `org-priority' with org-indent-mode
enabled fails to set a new priority cookie.

Bug reported by Joseph Buchignani.
2010-09-09 20:57:26 +02:00
Nicolas Goaziou 7c28d8d336 Fix indentation when using a [@start:num] or [@num] construct.
* org.el (org-indent-line-function): Indent past [@num] and
  [@start:num], consistently with what is already done with
  checkboxes.
2010-09-09 19:24:50 +02:00
Nicolas Goaziou 06c332cfee Fix notes indentation
* org.el (org-store-log-note): Indent new notes to the right column.
  Also take `org-list-two-spaces-after-bullet-regexp' into
  consideration when creating the note.
2010-09-09 19:24:46 +02:00
Dan Davison 569ba0eee8 Turn off code fontification by default; supply customize interface
* org.el (org-src-fontify-natively): Set to nil by default.
	Supply cutomize interface.
2010-09-07 12:42:15 -04:00
aaa bbb d2e071cd97 Merge branch 'special-formatting-of-links-in-ascii' 2010-09-06 08:15:46 +02:00
Achim Gratz bd8a0a6f39 inside table, delete-backward-char must not insert spaces when overwrite mode is on
* lisp/org.el (org-delete-backward-char): check for nil overwrite-mode before inserting
spaces.

TINYCHANGE

There's probably a different/better way to do this, but this seemed the least intrusive.
This patch is in the public domain.
2010-09-05 22:29:14 +02:00
Bastien 872d401fb3 Use C-c C-x _' for interactively calling org-timer-stop'
Unless I missed something, `org-timer-stop' has no keybinding yet.
I propose to use `C-c C-x _'.

Is that okay for everyone?
2010-09-05 22:28:17 +02:00
aaa bbb e72fa4dcc5 Honor special link formatting of custom links for ASCII export 2010-09-05 19:48:44 +02:00
Bastien Guerry 8f173ce843 Make `org-timer-cancel-timer' turn off the modeline countdown.
Also bind `org-timer-cancel-timer' to `C-c C-x :' in org-mode.
We may want to bind this command in org-agenda-mode as well but
I don't have any good idea of a keybinding now.
2010-09-03 15:26:47 +02:00
Bastien Guerry 00fadebf9c `org-get-refile-targets': trim multiple [%] and [/] cookies. 2010-09-03 15:08:47 +02:00
Bastien Guerry ba4bf2c96e `org-get-refile-targets': also trim [%] cookies from refile targets. 2010-09-03 10:43:09 +02:00
Carsten Dominik 8d980d219e Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-03 07:06:57 +02:00
Bastien Guerry 0c67513e7d `org-get-refile-targets': don't include [/] cookies in targets.
This was requested by Marcel van der Boom <marcel@hsdev.com>.
2010-09-03 01:47:28 +02:00
Dan Davison 73957b8fbf Fontify code in code blocks.
* org.el (org-fontify-meta-lines-and-blocks): Alter main
    regexp to match code blocks with switches and header
    args. Call `org-src-font-lock-fontify-block' for automatic
    fontification of code in code blocks, controlled by variable
    `org-src-fontify-natively'.
    (org-src-fontify-natively): New variable

    * org-src.el (org-src-font-lock-fontify-block): New function
    called during font-lock
    (org-src-fontify-block): New function for manual fontification
    of code block at point.
    (org-src-fontify-buffer): New function to manually fontify all
    code blocks in buffer
    (org-src-get-lang-mode): New utility function to map language
    name as a string to major mode symbol

Based on an initial fontification patch by David O'Toole and
suggestions from Carsten Dominik.
2010-09-02 08:12:58 -07:00
Noorul Islam f5ff5dbe5a Fix compiler warning
org.el : Fix compiler warning.

* lisp/org.el (org-insert-subheading) : Fix compiler warning
  (org-insert-todo-subheading) : Fix compiler warning

TINYCHANGE

Thanks and Regards
Noorul
2010-09-02 12:21:44 +02:00
Nicolas Goaziou 398c7bb528 Indent correctly body of source blocks
* org.el (org-indent-line-function): indentation of source block is
  left to `org-edit-src-exit' and shouldn't be modified by
  `org-indent-line-function'. Indentation of others blocks should be
  the same as the #+begin line.
2010-09-01 20:42:05 +02:00
Nicolas Goaziou bac9497d7a Handle drawers correctly. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou 6b2468477e [@num] is valid to enforce a numbering (same as [@start:num]) 2010-09-01 19:05:54 +02:00
Nicolas Goaziou dae1ec63a9 org-fix-bullet-type is now org-list-repair. Created aliases for compatibility. 2010-09-01 19:05:53 +02:00
Nicolas Goaziou 05aeeae9ed First line after a list should not be indented according to list
* org.el (org-indent-line-function): Indent first non blank line after
  a list according to current heading level.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou e890cb5eeb Small changes to fontification. 2010-09-01 19:05:53 +02:00
Nicolas Goaziou fd16515b4a Removed last call to org-provide-checkbox-statistics. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 030fc40b1d Minor refactoring. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 0dab6a2e1b Do not enforce white spaces just after [@start:num]. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 80b269d947 `org-toggle-item' working as expected.
* org-list.el (org-list-bullet-string): do not modify match-data.
* org.el (org-toggle-item): now working again when changing list items
  into plain text. Moreover take into consideration
  `org-list-two-spaces-after-bullet-regexp'.
2010-09-01 19:05:51 +02:00
Nicolas Goaziou 4d40259e56 Better handling of checkboxes with regards to [@start:x] constructs
* org.el (org-set-font-lock-defaults): Correct fontification for
  checkboxes found after [@start:?].
* org-list.el (org-list-at-regexp-after-bullet-p): skip any [@start:?]
  when looking at a regex after a bullet.
* org-list.el (org-toggle-checkbox): correct insertion of checkboxes
  when there is already a [@start:?] in the item.
* org-list.el (org-checkbox-blocked-p): properly check if there's an
  unchecked item before.
* org-list.el (org-list-parse-list): function handles items having
  both a counter and a checkbox.
2010-09-01 19:05:51 +02:00
Nicolas Goaziou 6593fcc7cd Unconditionally fix list when using C-c C-c.
* org.el (org-ctrl-c-ctrl-c): call `org-fix-bullet-type' instead of
  `org-maybe-renumber-ordered-list' and `org-fix-bullet-type' before
  toggling a checkbox.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou ca106beabb New function `org-item-has-children-p'. 2010-09-01 19:05:50 +02:00
Nicolas Goaziou 1f41236014 Cycle lists properly.
* org-list.el (org-list-bottom-point): Be sure to check real
  ORG-OUTLINE-REGEXP and not outline-regexp, that might be modified.
* org.el (org-cycle-internal-local): cycle up to end of subtree or end
  of item if we are in a list.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou fb5cab814e Better regexps in searches unenclosed.
* lisp/org.el (org-in-regexps-block-p): minor fix: limit wasn't
  correctly used.
* lisp/org-list.el (org-search-forward-unenclosed): Better regexp
  used.
* lisp/org-list.el (org-search-backward-unenclosed): Better regexp
  used.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 30fb7a570a Fix documentation.
* lisp/org.el (org-in-regexps-block-p): Fix documentation.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 5fda851968 Initial commit. 2010-09-01 19:05:44 +02:00
David Maus 3d6c1090cb Protect escape char in `org-complex-heading-regexp-format'
* org.el (org-set-regexps-and-options): Protect escape char in
`org-complex-heading-regexp-format'.
2010-08-31 22:58:08 +02:00
Carsten Dominik fa18c1c232 Fix read-date problem that could result in August 34th
Paul Sexton writes:

> Today (31 August),
> if I evaluate "(org-read-date t)", then at the prompt type
> "+3"
> The string returned is:
> "2010-08-34"
2010-08-31 09:22:26 +02:00
Carsten Dominik dabfd646ae LaTeX export: remove the t1enc package
* lisp/org.el (org-export-latex-default-packages-alist): Remove the
t1enc package - this is already covered by fontenc.
2010-08-31 08:31:14 +02:00
Manish Sharma 2cf6136523 Allow "#" and "%" in tags
Patch largely from Manish, missing points added by Carsten
2010-08-31 08:25:20 +02:00
Eric Schulte f6c09411a7 ob-scheme: very preliminary support for evaluating scheme code blocks
* Makefile (LISPF): adding ob-scheme.el to the makefile
* lisp/ob-scheme.el: very preliminary support for evaluating scheme
  code blocks
* lisp/org.el (org-babel-load-languages): adding scheme
2010-08-27 18:03:11 -06:00
Eric Schulte 4054eb0b9b ob-js: very preliminary support for evaluating Javascript code blocks
This relies upon node.js as the Javascript execution engine.
  http://nodejs.org/
2010-08-27 16:59:08 -06:00
Eric Schulte 2554f27683 moved `org-save-outline-visibility' into org-macs.el
Thanks to Nick Dokos for pointing out this as a fix to a Babel issue

* lisp/org-macs.el (org-save-outline-visibility): moved from org.el

* lisp/org.el: moved `org-save-outline-visibility' to org-macs.el
2010-08-27 08:18:32 -06:00
Carsten Dominik 7be6f7e3d5 Fix typo 2010-08-27 10:02:05 +02:00
Eric Schulte 2c33b2eb66 Introducing ob-org and now wrapping ":results org" in org code block
ob-org has two non-standard header arguments in that it exports it's
  results by default and the result type defaults to raw, this ensures
  that the body of a begin_src org block exports transparently.

  This is a breaking change in that if you are currently using org
  code blocks to export org-fontified code you will have to set the
  ":exports" header argument for org-mode blocks to "code" on a block,
  file, language or system-wide basis.

* Makefile (LISPF): adding ob-org.el to the makefile

* lisp/ob-org.el: defines handling of org code blocks

* lisp/ob.el (org-babel-insert-result): now when "org" is a result
  type the results are wrapped in an org code block
2010-08-26 10:01:21 -06:00
Eric Schulte a89dc43e83 integrating ob-plantuml -- Thanks to Zhang Weize for this contribution!
* Makefile (LISPF): now compiling and installing ob-plantuml.el

* contrib/scripts/.gitignore : ignores the plantuml.jar file, so that
  it can be located next to ditaa.jar

* lisp/ob-plantuml.el: adding copyright notice and FSF attribution

  (org-plantuml-jar-path): now a defcustom

  (org-babel-execute:plantuml): now using org-babel-eval which
  displays error messages

* lisp/org.el (org-babel-load-languages): ob-plantuml is now part of
  org-babel-load-languages
2010-08-26 09:36:08 -06:00
Nicolas Goaziou 869b2693a5 Recognize underscores in URL
* org.el (org-make-link-regexps): modified regexp of org-plain-link-re.
2010-08-25 12:33:12 +02:00
Jambunathan K 5908e8ed7b org-store-link: Return link when invoked from within agenda buffer
* org.el (org-store-link): Return link when invoked non-interactively from
an agenda buffer.

TINYCHANGE

> Summary:
>
> When I trigger a org-capture, with the cursor positioned on a line in
> the agenda buffer, I want the link to the agenda entry to be available
> as an annotation (%a) to the capture process. Currently this is broken.
>
> The enclosed patch fixes this.
>
> Setup:
>
> # file todo.org
> * TODO Talk to someone
>    SCHEDULED: <2010-08-23 Mon>
>
> # org-capture-templates
>  ("z" "Conversation" entry
>   (file+headline "~/conversation.org" "Conversations")
>   "** Note taken on %U\n   %a\n   %?" :prepend t :empty-lines 1)
>
> Steps for reporduction:
>
> 1. Restrict agenda to todo.org
> 2. Do org-agenda
> 3. Place the cursor on the above todo line
> 4. Trigger an org-capture for the above capture entry
>
> Examine the entries in conversation.org before/after the patch is
> applied. Note the absence/presence of the link to the parent todo entry.
>
> * Conversations
>
> ** Note taken on [2010-08-23 Mon 03:58]
>    [[file:~/todo.org::*Talk%20to%20someone][Talk to someone]]
>
> ** Note taken on [2010-08-23 Mon 03:42]
>
> Jambunathan K.
2010-08-23 12:18:00 +02:00
Jambunathan K 784e5f1488 org-store-link: Fix storing of links to headlines in indirect buffers
* org.el (org-store-link): Storing of links to headlines in indirect
buffers was broken.  Fix it.

TINYCHANGE
Summary:

> When org-store-link is invoked on a headline in indirect buffer (as in a
> capture buffer), hyperlink gets created to the file and NOT the
> headline. This is a bug.
>
> The attached patch fixes this.
>
> Setup:
>
> # ~/.emacs
>
> (defun my-conversation-id ()
>   (interactive)
>
>   (remove-hook 'org-capture-before-finalize-hook 'my-conversation-id)
>
>   (let ((org-link-to-org-use-id t))
>     (call-interactively 'org-store-link)
>     )
>   )
>
> # org-capture-templates
>
>  ("x" "Conversations" entry
>   (file+headline "~/conversation.org" "Conversations")
>   "%(progn (add-hook 'org-capture-before-finalize-hook 'my-conversation-id) \"\")** Note taken on %U\n   %?  " :prepend t :empty-lines 1)
>
> Steps for reproduction:
>
> Trigger org-capture for the above capture entry.
>
> Examine conversation.org before/after the patch is applied. Note the
> absence/presence of IDs for the captured entry.
>
> Check for the stored links using C-c C-l. Note the file/headline links.
>
> # file conversation.org before and after the patch
>
> * Conversations
>
> ** Note taken on [2010-08-23 Mon 04:33]
>    :PROPERTIES:
>    :ID:       7e1974a6-8fa1-43cf-bef3-2adf37d99130
>    :END:
>
> ** Note taken on [2010-08-23 Mon 04:32]
>
> # (org-insert-link) showing stored links before and after the patch
>
> file:~/conversation.org (file:~/conversation.org)
> id:7e1974a6-8fa1-43cf-bef3-2adf37d99130 (Note taken on [2010-08-23 Mon 04:33])
>
2010-08-23 12:14:20 +02:00
Robert P. Goldman 06034b9813 Expanded docstring for org-emph-re 2010-08-21 05:10:34 +02:00
Carsten Dominik 190e88cfc9 Remove the special noutline.el file for XEmacs
The latest XEmacs package release does now contain a modern version of
outline.el, put there by Michael Sperber.

* Makefile: Remove targets related to noutline.el.
* README: Remove the entry for the xemacs directory.
* README_DIST: Remove the entry for the xemacs directory.
* doc/org.texi (Installation): Remove the special installation
instructions for XEmacs.
* lisp/org.el (outline): Remove special code to load noutline.el
for XEmacs.
* xemacs/README: File removed.
* xemacs/noutline.el: File removed.
* xemacs/ps-print-invisible.el: File removed.
2010-08-20 14:19:29 +02:00
Carsten Dominik 19b0e03f32 Make backslash escape "-" in property matches
* lisp/org.el (org-make-tags-matcher): Read "\\-" as "-" in
the tags/property matcher.

Ilya Shlyakhter writes:

> When doing an agenda tags match for tags or properties with dashes in
> their name, the dashes become negation operators: "my-prop>0" means
> "entries that have the tag 'my' and do not have a positive property
> 'prop'", rather than "entries that have a positive property
> 'my-prop'".  Is there a way to escape the dashes to get the latter
> meaning?
2010-08-20 09:26:08 +02:00
Carsten Dominik fbc0ce10de Keep compiler happy 2010-08-18 08:41:29 +02:00
Carsten Dominik bf3405a6ba Fix tags column for the case when org-indent-mode is active
* lisp/org.el (org-set-tags): Consider org-indent-mode when computing the
tags column.
2010-08-17 08:34:21 +02:00
Carsten Dominik 3082ea9a30 Use a better regexp to find a refile target headline
* lisp/org.el (org-complex-heading-regexp-format): Document the variable.
(org-get-refile-targets): Use `org-complex-heading-regexp-format' to
make the regular expression for matching the headline.

Now we use the format for the complex heading regexp, which means that
Changing the TODO state, level, priority, or tags of a heading will
still allow the heading to be matched by the regexp.
2010-08-16 19:27:38 +02:00
Carsten Dominik 56cf6ad42d Verify that refile cached position is correct
* lisp/org.el (org-refile-check-position): New function.
(org-goto):
(org-refile-get-location): Call `org-refile-check-position'.

Samuel Wales has reported that the cache is loosing it, occasionally.
2010-08-16 19:20:01 +02:00
Sébastien Vauban ff1b5de478 Fontify whole lines* of code-block or meta-lines
Patch by Sebastien Vauban
2010-08-15 08:53:26 +02:00
Carsten Dominik 999078b0bf Implement MathJax support
* lisp/org-exp.el (org-export-with-LaTeX-fragments): New default t, which
now means to use MathJax processing for HTML.  Also allow new value
`dvipng' to force the old image processing.
(org-infile-export-plist): Parse for MATHJAX setup line.
* lisp/org-html.el (org-export-html-mathjax-options): New option.
(org-export-html-mathjax-config): New function.
(org-export-html-mathjax-template): New option.
(org-export-html-preprocess): Call the LaTeX snippet processor with an
additional argument to declare special ways of processing.
(org-export-as-html): Bind the dynamical variable
`org-export-have-math'.  Insert the MathJax script template when it is
needed by the document.
* lisp/org.el (org-preview-latex-fragment): Call `org-format-latex' with
the additional processing argument.
(org-export-have-math): New variable, for dynamic scoping.
(org-format-latex): Implement specific ways of processing.  New
function argument for processing type.
(org-org-menu): Remove the entry to configure LaTeX snippet
processing.

MathJax is now the default for displaying math in a browser.
2010-08-13 14:22:16 +02:00
Bastien Guerry 13a05628f4 org-ctrl-c-ctrl-c: document C-cC-c for capture buffer.
Don't mention remember in this docstring.
2010-08-12 15:24:32 +02:00
Carsten Dominik 13ddc493e4 Fix bugs to keep compiler happy 2010-08-08 22:20:33 +02:00