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

1912 commits

Author SHA1 Message Date
Carsten Dominik 31d9fd44ac Make it possible to check before invisible edits
* lisp/org.el (org-catch-invisible-edits): New option.
(org-self-insert-command):
(org-delete-backward-char):
(org-delete-char): Call `org-check-before-invisible-edit'.
(org-check-before-invisible-edit): New function.
2011-11-03 08:57:26 +01:00
Nicolas Goaziou e31e89430a Globalize some variables to make them available in buffers not in Org mode
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format,
  org-heading-keyword-maybe-regexp-format): Globalize variables so
  they are accessible even in buffers not in Org mode.
2011-11-01 11:40:11 +01:00
David Maus a9559dc08a Don't use default-description if link description function is defined
* org.el (org-insert-link): Don't use default-description if a
`org-make-link-description-function' is defined.
2011-11-01 06:24:42 +01:00
Eric Schulte 8354fd9e0f Allow multi-line properties to be specified in property blocks
#+begin_property
    var foo=1,
        bar=2,
        baz=3,
        qux=4
  #+end_property
  #+begin_src emacs-lisp
    (+ foo bar baz qux)
  #+end_src

  #+results:
  : 10

* lisp/org.el (org-set-regexps-and-options): Use property blocks for
  multi-line properties.
2011-10-31 12:28:50 -06:00
Bastien Guerry b3e1e7320f org.el: Don't throw an error when editing takes place at the first point of the buffer.
* org.el (org-self-insert-command): Don't throw an error when
editing takes place at the first point of the buffer.

Thanks to Carsten Dominik for pointing this error.
2011-10-30 09:58:37 +01:00
Bastien Guerry d3370f1608 org.el: Unfold invisible region at point or right before point when editing.
* org.el (org-self-insert-command): Unfold invisible region at
point or right before point when editing.

Thanks to Suvayu Ali for discussing this.
2011-10-30 02:58:31 +02:00
Nicolas Goaziou cfed6e9366 Add a way to search for a link search without impacting buffer visibility
* lisp/org.el (org-link-search): Add an optional argument preventing
  function from revealing context around match.
2011-10-28 17:36:14 +02:00
Bastien Guerry 6da350bf06 org.el: Fix bug when matching the face property before following a link.
* org.el (org-return): Fix bug when matching the face property
before following a link.

Thanks to Paul Sexton for the analysis and the fix.
2011-10-28 16:42:20 +02:00
Carsten Dominik f6a766548c Save complex heading regexp for column view
* lisp/org.el (org-scan-tags): Also remember `org-complex-heading-regexp'
in a property.
2011-10-28 14:47:32 +02:00
Bastien Guerry de8cd8ee41 Bugfix: make `org-return' detect 'org-link face properly.
* org.el (org-return): Check the presence of the 'org-link
face even in contexts where there is more than one face.

Thanks to Maximilian Matthé for reporting this bug.
2011-10-26 19:20:12 +02:00
Yuri Lenskiy 6115980993 Addition of default-description parameter to org-insert-link
This patch, against the stable 7.7 branch version of org.el, adds a
default-description argument to org-insert-link that, if non-nil, will
become the default description.

- Yuri Lenskiy
2011-10-26 19:04:36 +02:00
Nicolas Goaziou dba3e22c93 Have a more informative return value for `org-in-block-p'
* lisp/org.el (org-in-block-p): Return matched name of block, if any.
  It can be useful when a list of block names is provided as an argument.
2011-10-26 10:45:28 +02:00
Bastien Guerry 2494eaea49 Minor docstring fix.
Thanks to Peter Münster for spotting this.
2011-10-24 23:47:59 +02:00
Nicolas Goaziou 77eeb0df1b Fix regexps for headlines
* lisp/org.el (org-set-regexps-and-options): Fix small bug introduced
  by commit dfcb6faef1.
2011-10-23 18:14:58 +02:00
Nicolas Goaziou dfcb6faef1 Provide more consistent regexps for headlines
* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text.  Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
2011-10-23 09:30:13 +02:00
David Maus 2ac0810d19 Skip invisible headlines when mapping over headlines in active region
* org.el (org-deadline, org-schedule): Skip invisible headlines when
mapping over headlines in active region.
2011-10-22 16:20:14 +02:00
David Maus e67a28e963 New customization variable: Loop over headlines in active region
* org.el (org-loop-over-headlines-in-active-region): New customization
variable. Loop over headlines in active region.
(org-schedule, org-deadline): Apply to headlines in region depending
on new customization variable.
2011-10-22 16:19:25 +02:00
David Maus 810a2e8a5d Immediately return if scope is 'region but no region is active
* org.el (org-map-entries): Immediately return if scope is 'region but
no region is active.
2011-10-22 16:17:50 +02:00
David Maus 336cc53518 Extend scope 'region to include entire body of last headline in active region
* org.el (org-map-entries): Extend scope 'region to include
entire body of last headline in active region.
2011-10-22 16:17:43 +02:00
Bastien Guerry da5a68a0bc Rename org-format-agenda-item' to org-agenda-format-item'.
* org.el (org-format-agenda-item, org-scan-tags): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

* org-agenda.el (org-search-view)
(org-get-entries-from-diary, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-format-item, org-agenda-add-time-grid-maybe)
(org-agenda-change-all-lines)
(org-agenda-add-entry-to-org-agenda-diary-file): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

Using the `org-agenda-' prefix makes more sense here.
2011-10-22 15:08:33 +02:00
Bastien Guerry a46f58e7d0 * org.el: Declare external function `cdlatex-compute-tables'.
* org.el (cdlatex-compute-tables): Declare external function
`cdlatex-compute-tables'.
2011-10-22 15:01:02 +02:00
Tassilo Horn 4bbdfd229d Replace org-mode-p with usual (eq major-mode 'org-mode) check
Additionally, replace one

  (or (org-mode-p) (derived-mode-p 'org-mode))

with

  (derived-mode-p 'org-mode)

cause that is reflexive anyway (returns true, if the current mode is
org-mode).

Delete one check testing for org-mode or org derived mode
2011-10-22 11:29:24 +02:00
Rafael Laboissiere aa2ebf4f7b Fix typos in variable description
* lisp/org.el (org-link-search-must-match-exact-headline): Fix typos.

TINYCHANGE
2011-10-22 11:15:42 +02:00
Carsten Dominik 8d1b48fd5f Merge branch 'master' of orgmode.org:org-mode 2011-10-21 23:32:35 +02:00
Carsten Dominik 54a9cb0d99 Maintain XEmacs compatibility
* lisp/ob-calc.el (featurep): Require calc-store.
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Fix regexp
special handling.
* lisp/org-compat.el (fboundp): Support for XEmacs.
* lisp/org-exp.el (org-export): Protect XEmacs from `(redisplay)' call.
* lisp/org-footnote.el (org-footnote-re): Optimize macro processing.
* lisp/org.el (org-set-autofill-regexps): Xemacs compatibility.

Patch by Michael Sperber, checked and slightly modified by Carsten.
2011-10-21 22:36:53 +02:00
Bastien Guerry 5091facd7f org.el: Enable recursive minibuffers in `org-completing-read'.
org.el: (org-completing-read): Enable recursive minibuffers and add
the `C-c !' key in the minibuffer local map.

Thanks to Skip Collins for the idea and to Nick Dokos for the
implementation.
2011-10-21 17:46:37 +02:00
Bastien Guerry b2632dc458 org.el: Remap outline-promote' and outline-demote' keys.
* org.el: Remap `outline-promote' and `outline-demote' keys to
`org-promote-subtree' and `org-demote-subtree'.

Thanks to Michael Brand for the suggestion.
2011-10-21 16:21:49 +02:00
Carsten Dominik d622d2f709 Make sure cdlatex customization is taken into account properly
* lisp/org.el (org-cdlatex-mode): Run cdlatex-mode-hook and update
the internal cdlatex tables.
2011-10-19 18:56:13 +02:00
Carsten Dominik a9a304d938 Keep byte compiler happy 2011-10-16 16:54:52 +02:00
Carsten Dominik 782a172110 Fix parenthesis error 2011-10-16 16:51:13 +02:00
Carsten Dominik 9a132f3164 Remove table overlays before restart
* lisp/org.el (org-ctrl-c-ctrl-c): Remove table overlays before restart.
2011-10-16 13:38:48 +02:00
Carsten Dominik a9689b8750 Match entities before number, so that \sim2 is fontified correctly
* lisp/org.el (org-fontify-entities): Match entities before numbers, as in
`\sim2'.
2011-10-16 13:23:02 +02:00
Carsten Dominik 85cce6fa85 Move some of the new defcustoms to the customization section 2011-10-16 10:57:21 +02:00
Carsten Dominik 4f2f222c00 Add support for LaTeX to MathML conversion
* lisp/org.el (org-latex-to-mathml-jar-file)
(org-latex-to-mathml-convert-command): New user-customizable
variables.
(org-format-latex-mathml-available-p, org-create-math-formula)
(org-format-latex-as-mathml): New functions.
(org-format-latex): Add a new local variable block-type that
notes the nature of the equation - inline or display.
Associate it's value to `org-latex-src-embed-type' property of
dvipng links.  Add mathml as new processing type.

Patch by Jambunathan.
2011-10-16 10:52:32 +02:00
Sébastien Vauban 05ead2de3b Rebase: Add tree name to prompt
* lisp/org.el (org-refile): Add tree name to prompt.
2011-10-14 11:20:35 +02:00
Nicolas Goaziou 8e358f2cef Allow subscripts and superscripts to start at bol
* lisp/org.el (org-match-substring-regexp,
  org-match-substring-with-braces-regexp): Allow subscripts and
  superscripts to start at beginning of line.
2011-10-09 09:35:27 +02:00
John J Foerch a5d4783a7e Short timestamp in org-log-note-headings
Two new format codes support insertion of a short-format time stamp.
%d for an inactive time stamp, and %D for an active one.

* lisp/org.el (org-log-note-headings): Document new %d and %D escapes.
(org-store-log-note): Implement new %d and %D escapes.

TINYCHANGE
2011-10-08 17:55:17 +02:00
Eric Schulte 53573d6e28 adding initial support for evaluation of shen code blocks 2011-10-06 19:55:47 -06:00
Carsten Dominik 5147f6b008 Make org-open-at-point only ask once whether new header should be created
* lisp/org.el (org-open-at-point): Make org-open-at-point only ask once
about creating a new headline

When following "thisfile" links org-open-at-point is kind enough to
retry org-link-search again after widening the buffer it can't be
found. However org-link-search also asks the question "No match -
create this as a new heading? (y or n)" when target can't be
found. This means that the question is asked twice when following a
nonexistent link and answering no.

This is fixed by setting org-link-search-inhibit-query in first try,
so only second invocation asks the question.

TINYCHANGE

Patch by Anders Waldenborg
2011-10-06 10:53:31 +02:00
Nick Dokos 1d65423da8 Bug: org-refile-targets doesn't say whether it's AND or OR [7.7 (release_7.7.351.gb8b5)]
Dave Abrahams <dave@boostpro.com> wrote:

> I would change the doc for org-refile-targets to say that the resulting
> list of targets is the union of all the targets matched by each cons
> cell.  I think you could take that pretty much verbatim.
>

How's this?

Nick

---------------------------------------------------------------------------
>From f853b04fb474493b3b7b8857794c9f120c5f7822 Mon Sep 17 00:00:00 2001
From: Nick Dokos <nick@dokosmarshall.org>
Date: Wed, 28 Sep 2011 23:49:13 -0400
Subject: [PATCH] Amplify the doc for org-refile-targets

* lisp/org.el: (org-refile-targets) Elaborated the documentation of
               the variable as suggested by Dave Abrahams.

TINYCHANGE
2011-10-06 10:13:05 +02:00
Carsten Dominik 2978501ad0 Bugfix for alignment of tag next to header name
* lisp/org.el (org-align-tags-here): Allow tags to be placed right
after heading.
(org-tags-column): Document the meaning of tags column 0.

Patch by Michael Brand.

TINYCHANGE
2011-10-06 09:44:08 +02:00
Carsten Dominik 1790d6c073 Make org-refile interface for jumping to a target work before first heading
* lisp/org.el (org-refile-get-location): Ignore errors when
collection heading to be excluded.
2011-10-05 16:23:03 +02:00
Carsten Dominik 620913e596 Improve error reporting on bad time stamps during agenda construction
* lisp/org.el (org-time-string-to-time):
(org-time-string-to-absolute): Add optional arguments BUFFER and POS
for error reporting.
* lisp/org-agenda.el (org-get-all-dates):
(org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks): Call time stamp parsing functions with
information on where the timestamp was taken from.
2011-10-04 14:12:11 +02:00
Carsten Dominik a33fc1ce7d Fix typo in previous commit 2011-10-04 10:00:10 +02:00
Carsten Dominik 3268d3b48f Run org-cycle-hook' after show-all' in indirect buffer
* lisp/org.el (org-tree-to-indirect-buffer): Run `org-cycle-hook' after `show-all'
in indirect buffer.
2011-10-04 09:57:02 +02:00
Nicolas Goaziou 809318dd5b Better handling of ill-formed lists
* lisp/org-list.el (org-list-parents-alist): When no parent is found
  for an item, set it as the closest less indented item above.  If
  none is found, make it a top level item.
(org-list-write-struct): Externalize code.
(org-list-struct-fix-item-end): New function.
(org-list-struct): Remove a now useless fix.
* lisp/org.el (org-ctrl-c-ctrl-c): Use new function.
2011-10-02 23:17:11 +02:00
Nicolas Goaziou 824e06752b `org-special-ctrl-a/e' effectively behaves specially on items
* lisp/org.el (org-end-of-line): When on an item, move point at the
  end of the line, but before any hidden text.  Thus, it's still
  possible to use commands, like C-c C-c, acting at items.  This is
  still disabled if `org-special-ctrl-a/e' ignores C-e.
2011-10-01 20:37:16 +02:00
Eli Zaretskii 1a97f29c34 Force left-to-right paragraphs in Org buffers.
* org.el (org-mode): Force left-to-right paragraphs in Org
buffers.  For a related discussions, see
https://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00349.html.
2011-09-27 19:33:09 +02:00
John Wiegley 706de59f07 Fixed an incorrect paren placement 2011-09-24 12:06:25 -05:00
Carsten Dominik c7ee700bf5 Remove unnecessary `concat'
* lisp/org.el (org-paste-subtree): Remove unnecessary `concat'.
2011-09-20 10:32:41 +02:00
David Maus 4122a51366 Unescape plain link before open
* org.el (org-open-at-point): Unescape plain link.

This should fix a problem with open plain links reported by
Sebastien Vauban.
2011-09-11 16:51:23 +02:00
Bastien Guerry 28ae6b4de1 Revert "org.el (org-fixup-indentation): Correctly indent meta lines."
This reverts commit 6b04befa48.
2011-09-09 19:47:41 +02:00
Nicolas Goaziou 63ce11b1ca Allow $...$ and $x$ latex fragment types at beginning of line
* lisp/org.el (org-latex-regexps): Allow matching latex fragments of
  type "$" and "$1" at beginning of line.
2011-08-27 15:04:51 +02:00
Bastien Guerry eabea0ef85 * org.el (org-archive-location): Minor docstring fix.
Thanks to John Hendy for pointing this out.
2011-08-25 00:33:13 +02:00
Nicolas Goaziou 25131410f4 Correctly find unchecked boxes in a section
* lisp/org.el (org-block-todo-from-checkboxes):
  `org-list-search-forward' should be used when looking for an item,
  as it filters out contexts where match couldn't be in
  a list (i.e. example blocks). Also use a correct item regexp, taking
  into account alphabetical ordered lists and counters.
2011-08-24 18:30:47 +02:00
Bastien Guerry 15798836e2 New 'org-category-position text property in agendas.
* org.el (org-refresh-category-properties): New text property
'org-category-position to point at the beginning of the
headline from which the category is set.

* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-filter-by-tag-refine): Add the
'org-category-position text property.

This commit prepares for a future `org-agenda-set-category'
function allowing to set the category of the headline at point.
2011-08-23 17:34:15 +02:00
Matt Lundin 8478a5541c No need to call org-back-to-heading with goto argument.
* lisp/org.el: (org-refile) Don't call org-back-to-heading with goto
  argument.

This fixes an error that results when calling org-refile with the
GOTO argument in a non-org buffer.
2011-08-23 17:00:36 +02:00
Bastien Guerry 7475d7da1f org.el: Remove org-link-display-descriptive' and use org-descriptive-links'.
* org.el (org-link-display-descriptive): Remove this option
and rely on the existing `org-descriptive-links' instead.
(org-toggle-link-display): Use `org-descriptive-links'.

Without this change, both options are redundant.  This also
fixes a bug about using `org-descriptive-links' in the `org-mode'
function, that initialize the display using `org-descriptive-links'
instead of `org-link-display-descriptive'.

Thanks to Thomas S. Dye for spotting this.
2011-08-23 16:55:48 +02:00
Bastien Guerry 3e33c9c37e * org.el (org-set-property): Bugfix. 2011-08-19 23:55:04 +02:00
Bastien Guerry cdbf7ed876 Revert "Move three functions and add appropriate require/declarations."
This reverts commit 8c3ecbe39a.
2011-08-19 22:11:15 +02:00
Bastien Guerry 5b51893824 org.el: tiny docstring fix. 2011-08-19 17:42:27 +02:00
Bastien Guerry 1bb83091a9 org.el (org-fixup-indentation): Fix various small bugs.
* org.el (org-fixup-indentation): Fix various small bugs.

Thanks to Sébastien Vauban for reporting them.
2011-08-19 09:41:15 +02:00
Bastien Guerry 0538dd3188 Fix some double-space after ponctuation mark in docstrings. 2011-08-18 18:38:05 +02:00
Bastien Guerry 6b04befa48 org.el (org-fixup-indentation): Correctly indent meta lines.
* org.el (org-fixup-indentation): Correctly indent meta lines.

Thanks to Sébastien Vauban for reporting this.
2011-08-18 18:18:04 +02:00
Nicolas Goaziou 4771caa09c Improve compatibility between org-indent-mode and visual-line-mode
* lisp/org-indent.el (org-indent-mode): completely refresh buffer
  before starting org-indent-mode. Also set idle timer to refresh only
  visible portion of buffer, and refresh the subtree instead of
  section when promoting or demoting it.
  (org-indent-add-properties): rewrite function to proceed line by
  line, as required by `wrap-prefix' specificity.
  (org-indent-refresh-section,org-indent-refresh-subtree): refactor.
  (org-indent-refresh-view): new function.
  (org-indent-refresh-to, org-indent-refresh-section): removed
  functions.
* lisp/org.el (org-unfontify-region): do not remove prefix properties
  when unfontifying a region.
2011-08-18 10:41:30 +02:00
Bastien Guerry 8c3ecbe39a Move three functions and add appropriate require/declarations.
* org-clock.el (org-duration-string-to-minutes)
(org-minutes-to-hh:mm-string, org-hh:mm-string-to-minutes):
Move from org.el.
2011-08-17 16:08:02 +02:00
Bastien Guerry ea055d3e6d org.el: Minor update of docstrings.
(org-open-at-mouse): Point to the docstring of `org-open-file'
for more details.
(org-open-file): Mention `org-link-frame-setup' in the
docstring.

Thanks to Reiner Steib for pointing at this.
2011-08-17 15:15:35 +02:00
Bastien Guerry 4774b1b026 org.el: Allow to customize the way links are displayed.
(org-link-display-descriptive): New option to customize the
default display of links, either literal or descriptive.
(org-toggle-link-display): New command to toggle link display.
(org-org-menu): Use the new toggle function for links.

Thanks to Reiner Steib for suggesting this.
2011-08-17 15:01:54 +02:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Bastien Guerry c25165c25d org-refile: New option `org-refile-active-region-within-subtree'.
* org.el (org-refile-active-region-within-subtree): New option
to allow refiling a region that is part of a subtree without
containing a subtree itself.  This default to `nil'.
(org-refile): Use the new option.  Put point at the beginning
of the region/subtree to be refiled, so that users understand
what will be refiled.  Also improve the prompt to tell whether
the user is refiling a region or a headline.

Thanks to Jeff Horn for raising the issue of refiling a list item,
and to Nicolas Goaziou, Nick Dokos and Suvayu Ali for discussing
them patiently.  The discussion led to these changes.
2011-08-17 11:20:42 +02:00
Bastien Guerry 163cc38986 org.el: minor fix: delete trailing whitespaces. 2011-08-17 11:12:43 +02:00
Bastien Guerry eb4b035815 New option `org-properties-postprocess-alist'.
* org.el (org-properties-postprocess-alist): New option to
allow postprocessing the values of properties set through
`org-set-property'.
(org-set-property): Use this option.

This is inspired by a request from Pascal Mattia.
2011-08-17 11:11:41 +02:00
Bastien Guerry 436290bfab org.el (org-outline-regexp, org-outline-regexp-bol): Add a docstring.
* org.el (org-outline-regexp, org-outline-regexp-bol): Add a
docstring.
2011-08-17 11:05:23 +02:00
Nicolas Goaziou 7a826e09b1 fix code typo 2011-08-17 03:15:22 +02:00
Nicolas Goaziou 430b73b90c Minor fix to org-between-regexps-p
* lisp/org.el (org-between-regexps-p): searching up to pos may match
  again beginning regexp.
2011-08-17 03:11:18 +02:00
Nicolas Goaziou 628ebf04f7 Enforce white space after todo keywords
* lisp/org.el (org-set-regexps-and-options): enforce white space after
  todo keyword, as word boundary isn't sufficient (i.e. in matches * TODO/this)
2011-08-16 22:29:39 +02:00
Bastien Guerry 9d5c5c3d26 Don't insert superfluous space when updating timestamps.
* org.el (org-add-planning-info): Don't insert superfluous
space when updating timestamps.

Thanks to Valentin Wüstholz for this patch.
2011-08-16 19:05:17 +02:00
Bastien Guerry ad23b7d173 Fix bzg email address (s/altern/gnu). 2011-08-15 21:22:30 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
Bastien Guerry e01ce26c0b org.el: set org-ts-what' correctly in org-at-timestamp-p'.
(org-at-timestamp-p): set `org-ts-what' in a way that point will be
considered to be "on the bracket" whether it is really on it or right
after it.

Thanks to Matt Lundin for reporting this and to Nicolas Goaziou for
discussion about this.
2011-08-15 10:06:02 +02:00
Bastien Guerry c6bee11433 Use outline-regexp in org-overview so that global cycling works outside of Org buffers.
* org.el (org-overview): Use outline-regexp instead of
org-outline-regexp so that global cycling using orgstruct-mode
works outside of Org buffers.

Thanks to Matt Lundin for this fix.
2011-08-15 09:51:44 +02:00
Bastien Guerry bc1b688ff0 Move org-find-visible and org-find-invisible from org-exp.el to org.el. 2011-08-15 09:44:52 +02:00
Bastien Guerry 71332ac8a6 Move org-agenda-todo-yesterday from org.el to org-agenda.el. 2011-08-15 09:39:52 +02:00
David Maus 20ff46e825 Merge branch 'master' of orgmode.org:org-mode 2011-08-13 15:02:58 +02:00
David Maus 3771185cae Fix wrong order of lines to move before pasting
* org.el (org-paste-subtree): Fix wrong order of lines to move before
pasting.
2011-08-13 15:02:03 +02:00
John Wiegley 7d2d8f884b Add customization variable `org-use-effective-time'
If non-nil, consider `org-extend-today-until' when creating timestamps.
For example, if `org-extend-today-until' is 8, and it's 4am, then the
"effective time" of any timestamps between midnight and 8am will be
23:59 of the previous day.
2011-08-13 03:21:49 -05:00
David Maus e5199c4095 Paste subtree above target headline if point is at bol
* org.el (org-paste-subtree): Paste subtree above target headline if
point is at bol.

Capture and refile depend on this buggy behavior of org-past-subtree.
2011-08-13 09:19:19 +02:00
Nicolas Goaziou 9c33b9c259 Fix fontification error in feb52f9028
* lisp/org.el (org-activate-code): correct regexp so ":.*" isn't
  matched.
2011-08-12 13:06:25 +02:00
Nicolas Goaziou feb52f9028 Allow "^[ \t]*:$" as a special case of fixed-width section
* lisp/org.el (org-activate-code, org-toggle-fixed-width-section,
  org-indent-line-function): allow "[ \t]*:$" as a special case of
  fixed-width section.
2011-08-11 11:46:32 +02:00
David Maus ece3091f16 Don't eat headline when yank with point at existing headline
* org.el (org-paste-subtree): Don't eat headline when called with
point at existing headline.
2011-08-10 18:38:26 +02:00
David Maus 14b556772b Merge branch 'master' of orgmode.org:org-mode 2011-08-10 18:18:06 +02:00
David Maus fc572f5a6b Fix typo in variable name
* org.el (org-paste-subtree): Fix typo in variable name.
2011-08-10 18:17:48 +02:00
Valentin Wüstholz ce6010262d Preserve indentation of explicitly indented lines in example blocks
* lisp/org.el (org-indent-line-function): Made the way in which example blocks are
  indented more flexible.

Before: Lines in example blocks were indented like the surrounding begin and end
delimiters.
After: By default, lines in example blocks are indented like the surrounding begin and end
delimiters, unless the user explicitly indents them differently.

TINYCHANGE
2011-08-10 10:54:46 +02:00
Nicolas Goaziou aab16ffdf4 Fix `newline-and-indent' in a list when called on a line being filled
* lisp/org.el (org-return): when filling happens, `newline' can change
  match data, hence modifying the indent column.
2011-08-08 18:32:32 +02:00
John Wiegley 54c722a83a Added customization hook `org-log-buffer-setup-hook'
This allows changes to org-mode after the log buffer has been setup.
2011-08-06 18:59:18 -05:00
Nicolas Goaziou afa0df9b47 Fix heading insertion before any other headline but after a list
* lisp/org.el (org-insert-heading): with force-heading non-nil,
  inserting an heading before any headline, and just after a list
  would return an error.
2011-08-06 10:57:08 +02:00
David Maus 049c0776ff Don't move line upward if point is at eob
* org.el (org-back-over-empty-lines): Don't move line upward if point
is at eob.

Fixes a bug with refiling reported by Bernt Hansen, simplified version
of fix proposed by Jason Dunsmore.
2011-08-04 16:05:08 +02:00
Nicolas Goaziou 8c6c6a4f3d Rename org-in-regexps-block-p' to org-between-regexps-p'
* lisp/org.el (org-between-regexps-p): previous name implied the
  function was related to blocks, which isn't mandatory.
(org-narrow-to-block, org-in-block-p, org-indent-line-function):
applied the rename.
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): applied
  rename. Also removed a white space.
2011-07-30 09:32:03 +02:00
Nicolas Goaziou 226f8c873d Change behaviour of `org-in-regexps-block-p'
* lisp/org.el (org-in-regexps-block-p): return an useful value when
  point is between START-RE and END-RE. No incomplete block is allowed
  anymore. Add another optional argument to bound the bottom part of
  the search.
(org-narrow-to-block, org-in-block-p): apply modifications.
2011-07-30 09:32:03 +02:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00
Bastien Guerry 59e7fc4d3a org.el: (org-map-entries): Allow SCOPE to be the active region. 2011-07-28 10:50:44 +02:00
Bastien Guerry 0c0bce4a67 Manually revert 366254217a.
As David Maus pointed out, the implementation is not good.

* org.el (org-deadline, org-schedule): Don't loop.
(org-loop-over-siblings-within-active-region-p): Remove.
* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag):
Don't loop.

* org-macs.el (org-loop-over-siblings-in-active-region):
Remove.
2011-07-28 10:50:35 +02:00
Max Mikhanosha dea1a6f87b Make `org-extend-today-until' variable affect log notes, and CLOSED: line.
(org-done-yesterday), (org-agenda-done-yesterday): new functions
2011-07-28 10:33:14 +02:00
Carsten Dominik 30dccb04bf Add key and documentation for `org-copy-visible'.
* lisp/org.el (org-org-menu): Add `org-copy-visible' to the menu.
* doc/org.texi (Visibility cycling): Document `org-copy-visible'.
* doc/orgcard.tex: Document `org-copy-visible'.
2011-07-26 12:09:50 +02:00
Carsten Dominik 7f742f12cf Add `org-copy-visible' command proposed by Florian Beck
* lisp/org.el (org-copy-visible): New command.
2011-07-26 11:53:13 +02:00
Nicolas Goaziou ee3ea164c9 Keep point in the same category when updating a time-stamp
* lisp/org.el (org-timestamp-change): keep point in the same category
  when updating a time-stamp. This requires to be careful, as,
  depending on the locale, name of day might change of length during
  the process.
2011-07-25 11:37:45 +02:00
Bastien Guerry 88eada52a6 org: allow relative time in `org-add-planning-info'.
(org-deadline, org-schedule): Improve docstrings.
(org-add-planning-info): Allow relative time like "-2d" or
"++2w" for the TIME argument.

The user can now call `org-schedule' and `org-deadline'
and use "+1d" to say that the task must be scheduled one
day later than today, or "++1d" to say that the task must
be scheduled one day later than the current SCHEDULED date,
if any.

This also works in agenda: you can select several entries
and reschedule them to +2d.

Thanks to Memnon Anon for insisting an finding a solution
for this!
2011-07-24 18:08:24 +02:00
Bastien Guerry 162080f5f8 org.el: tiny typo in docstring. 2011-07-24 16:44:48 +02:00
Bastien Guerry eaafa42948 New hook `org-ctrl-c-ctrl-c-final-hook'.
* org.el (org-ctrl-c-ctrl-c-final-hook): New hook to be run
when `org-ctrl-c-ctrl-c' cannot do anything useful in the
given context.

Thanks to Paul Sexton for this idea.
2011-07-24 16:12:47 +02:00
Bastien Guerry de27fab99a org.el: remove one trailing whitespace. 2011-07-22 11:21:29 +02:00
Bastien Guerry 7c8db0fa34 org-refile: exclude current (sub)heading(s) even if they start with a TODO keyword.
(org-get-heading): New optional argument to return heading
with no TODO keyword.
(org-refile-get-location): Use this new argument.
2011-07-22 11:20:53 +02:00
Bastien Guerry 07d42cbee6 org-refile: exclude current heading and subheadings from targets
* org.el (org-refile-get-targets): new optional argument
`excluded-entries' to exclude entries from the targets.
(org-refile-get-location): From an org-mode buffer, exclude
current heading and subheadings from the list of targets when
org-refile-use-cache is nil.

Also remove some trailing whitespaces.

Thanks to Jason Dunsmore for this idea.
2011-07-22 11:20:35 +02:00
Bastien Guerry bd01d9bf83 Revert "Fix bug with TODO states changes modifying scheduling of next headline"
This reverts commit fd0f8e10d1.
2011-07-22 09:24:28 +02:00
Nicolas Goaziou 6b38912771 Fix small mistake
* lisp/org.el (org-imenu-get-tree): note to self: headlines start at bol.
2011-07-21 20:40:58 +02:00
Nicolas Goaziou 4fd9989b58 Fix archiving bug introduced by last commit
* lisp/org.el (org-kill-is-subtree-p): matched string needs to start
  at bol.
2011-07-21 16:53:50 +02:00
Nicolas Goaziou 5b39df0523 Remove inline tasks from subtrees yanking
* lisp/org.el (org-paste-subtree, org-kill-is-subtree-p,
  org-yank-folding-would-swallow-text, org-yank-generic): use
  `org-with-limited-levels' macro.
2011-07-21 13:47:55 +02:00
Bastien Guerry 74a4f97108 Revert "org.el: exclude current heading from the refile table."
This reverts commit 651a537e49.
2011-07-21 12:28:57 +02:00
Nicolas Goaziou fd0f8e10d1 Fix bug with TODO states changes modifying scheduling of next headline
* lisp/org.el (org-timestamp-change): some locales don't use the same
  length for date abbreviations. Set a marker at origin in case length
  of new timestamp is different.

Thanks to Tom for analyzing this.
2011-07-21 11:48:35 +02:00
Nicolas Goaziou d8bd43ed5f Avoid getting inline tasks when using imenu
* lisp/org.el (org-imenu-get-tree): browse only true headlines.
2011-07-21 01:43:29 +02:00
Bastien Guerry ce2a33104b org.el: (org-do-emphasis-faces): docstring fix. 2011-07-19 11:25:45 +02:00
Bastien Guerry 08fc6384bc org.el (org-outline-regexp): Turn into a defvar.
`org-outline-regexp' ought to be a defconst but is let-binded
in some places -- e.g. see the macro `org-with-limited-levels'
and this produces misleading warnings.

Thanks to Matthew Sauer for reporting this.
2011-07-19 02:00:50 +02:00
Eric Schulte 58763f36e3 moving ob-fortran from core to contrib until FSF assignment is complete 2011-07-18 15:47:39 -06:00
Bastien Guerry 651a537e49 org.el: exclude current heading from the refile table.
* org.el (org-refile-get-location): exclude current heading
from the refile table.

Thanks to Jason Dunsmore for this idea.
2011-07-18 22:57:53 +02:00
Eric Schulte 1c913603cd moving ob-fortran into core, and cleaning up the code 2011-07-18 12:19:21 -06:00
Bastien Guerry 5c53026d32 Fix (a lot of) compiler warnings.
Also introduce `org-pop-to-buffer-same-window' as a compatibility
function for Emacs =>24.1.
2011-07-18 19:25:10 +02:00
Bastien Guerry 05c66a2e2f Merge branch 'master' of orgmode.org:org-mode 2011-07-18 18:14:58 +02:00
Bastien Guerry 395af11404 Use org-loop-over-siblings-in-active-region' for org-archive-set-tag'. 2011-07-18 18:14:35 +02:00
Eric Schulte 06bf0eb7fe ob-java: minimal support for evaluation of java code blocks 2011-07-18 10:08:04 -06:00
Nicolas Goaziou ddec51af0f Comment some code for posterity 2011-07-18 15:11:56 +02:00
Bastien Guerry 366254217a New feature: allow some commands to loop over siblings.
This commit introduce `org-loop-over-siblings-within-active-region-p'
as a new defcustom that you can turn on (`non-nil') to allow commands
to loop over siblings in the active region.

The list of commands is this:

- org-archive-subtree
- org-archive-to-archive-sibling
- org-toggle-archive-tag
- org-deadline
- org-schedule

When `org-loop-over-siblings-within-active-region-p' is `non-nil' and
you run one of the command above on a region containing several headlines,
then Org will apply the command to each headline.

This can be particularily useful for archiving several headlines, or to
add a deadline or schedule several entries.

* org.el (org-loop-over-siblings-within-active-region-p): New
defcustom so that `org-loop-over-siblings-in-active-region'
can be turned on and off.
(org-deadline, org-schedule): Use the new macro.

* org-macs.el (org-loop-over-siblings-in-active-region): New
macro to let some commands act upon several siblings in the
active region.

* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag): Use
`org-loop-over-siblings-in-active-region'.
2011-07-18 10:09:53 +02:00
Bastien Guerry c3748fcd80 Don't use `outline-regexp' anymore.
Use `org-outline-regexp' instead or `outline-regexp'.  Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.

* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.

* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.

* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.

* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.

* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.

* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.

* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.

* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
2011-07-18 09:42:11 +02:00
Nicolas Goaziou d243679491 Fix cookies update with recursive COOKIE_DATA property
* lisp/org.el (org-update-parent-todo-statistics): COOKIE_DATA should
  be checked for parent, not current headline. Also, this function
  doesn't need to be interactive.
2011-07-18 02:20:00 +02:00
Bastien Guerry 5dec19fe5b * org.el (org-refile): minor rewriting. 2011-07-17 08:16:59 +02:00
Nicolas Goaziou c59da42c4e Fix fontification error
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): blocks cannot be
  correctly fontified when the buffer is missing a final newline.
2011-07-17 00:48:36 +02:00
Bastien Guerry 462c0d1e86 org.el: cosmetic changes in docstring. 2011-07-12 00:54:14 +02:00
Bastien 9a2bf02346 `org-set-property' to use the last set property as default prompt
I'm testing whether patchwork catches the patches again.

You are free to test the feature as well :)

>From 2064e28c44ffc6f4020c8a5ec46e0d6bcf559c01 Mon Sep 17 00:00:00 2001
From: Bastien Guerry <bzg@altern.org>
Date: Mon, 11 Jul 2011 12:10:32 +0200
Subject: [PATCH] Make `org-set-property' defaults to the last set property.

* org.el (org-last-set-property): New variable.
(org-read-property-name): Use the new variable: the prompt
defaults to the last property set, unless there is a property
in the line at point.
2011-07-11 12:25:57 +02:00
Bastien Guerry badec64cbf Bufix: remove useless whitespace added after planning.
(org-add-planning-info): Bufix: remove useless whitespace
added after planning.
2011-07-11 12:23:47 +02:00
Bastien Guerry fd12e700b0 Minor code cleanup. 2011-07-09 18:12:18 +02:00
Bastien Guerry f65e63d094 Fix tiny spelling mistake. 2011-07-09 17:38:59 +02:00
Bastien Guerry db731a9715 Allow synchronous update of timestamps in CLOCK log.
* org.el (org-shiftcontrolup, org-shiftcontroldown): New
commands to use `org-clock-timestamps-change'.

* org-clock.el (org-clock-timestamps-change)
(org-clock-timestamps-down, org-clock-timestamps-up)
(org-at-clock-log-p): New functions to let the user update
clock log timestamps while keeping the same clock duration.

Thanks to Rainer Stengele for this idea.
2011-07-09 17:38:21 +02:00
Bastien Guerry a4bbc54d15 org.el: org-timestamp-up/down: mention time changes.
* org.el (org-timestamp-up, org-timestamp-down): mention time
changes in the docstring.
2011-07-09 15:26:29 +02:00
Bastien Guerry 516b2fbb87 org.el: remove CLOCK: and empty drawers from clones. 2011-07-09 15:04:39 +02:00
Nicolas Goaziou abe9550309 Forbid footnotes in some contexts
* lisp/org.el (org-in-block-p): new function.
* lisp/org-footnote.el (org-footnote-forbidden-blocks): new variable.
(org-footnote-in-valid-context-p): new function.
(org-footnote-at-reference-p): use new function. Allow inline
footnotes to start at bol.
2011-07-08 18:08:34 +02:00
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Bastien Guerry 7a88eaec29 New face: org-default.
* install/git/org-mode/lisp/org.el (org-mode): Use org-default as
the default face in org-mode.

* install/git/org-mode/lisp/org-faces.el (org-default): New face.

M-x customize-face RET org-default RET lets the user define a default
face for org-mode.
2011-07-06 17:25:29 +02:00
Bastien Guerry 330ed08feb org.el: fix `org-end-of-meta-data-and-drawers'
Back to the previous version of `org-end-of-meta-data-and-drawers',
with a better fix.

Thanks to Eric Abrahamsen for this.
2011-07-05 11:05:20 +02:00
Bastien Guerry 43a380708e org.el: tiny fix to org-add-planning-info. 2011-07-02 15:23:25 +02:00
Bastien Guerry 5fb8c750fb org.el: fix issues with timestamps: insert them at the same position.
* install/git/org-mode/lisp/org.el (org-add-planning-info): fix
issues with timestamps not being inserted at the same position.
2011-07-02 15:13:03 +02:00
Bastien Guerry 467435dba7 Don't include org-lparse.el in the list of contributed modules.
This modules is a dependancy of org-odt.el, which is the real
library users want to load.
2011-07-02 11:15:57 +02:00
Jambunathan K 67be9be326 Add org-lparse and org-odt as contrib modules
--

>From 9b97d19c1184d3cf2cc82831e3d29067cf91f014 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Sat, 2 Jul 2011 01:56:01 +0530
Subject: [PATCH] Add org-lparse and org-odt as contrib modules

* lisp/org.el (org-modules): Add org-lparse and org-odt as
contrib modules.
* contrib/README: Ditto
2011-07-02 11:13:22 +02:00
Eric Schulte 9c0ddffdc4 fix typo 2011-07-01 17:37:30 -07:00
Eric Schulte ca4472063a org: fontify #+header lines
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Include header
  lines.
  (org-additional-option-like-keywords): Include data as a synonym for
  results.
2011-07-01 13:12:03 -07:00
Julien Barnier 549a521256 Fix some #+ blocks fontification when there is no lang attribute
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Fix test for src blocks
lang attribute

When there is no lang attribute to a block (for quote, verse or others), the
lang variable is not nil, but an empty string.
2011-07-01 17:28:32 +02:00
Bastien Guerry 0461d55c41 Merge branch 'master' of orgmode.org:org-mode 2011-07-01 09:38:47 +02:00
Eric Schulte 0e4d6f3e77 moving ob-lilypond into the core of Org-mode 2011-06-30 11:06:22 -07:00
Nicolas Goaziou ffa016ba3d Fix some glitches in footnotes fontification
* lisp/org.el (org-activate-footnote-links): properly fontify inline
  footnotes.
(org-set-font-lock-defaults): apply changes to previous function.
2011-06-30 19:29:14 +02:00
Bastien Guerry dbde087a21 org.el: don't escape image links with no description.
(org-make-link-string): Don't escape image links when no description
is provided by the user.  Otherwise those images won't be recognized
as images when trying to display inline pictures.
2011-06-30 18:40:24 +02:00
Bastien Guerry f0bbfe50aa org.el: (org-end-of-meta-data-and-drawers): simplify. 2011-06-30 18:01:38 +02:00
Bastien Guerry 9c582ceed8 org.el: Remove useless `org-without-partial-completion'.
* org.el (org-set-tags): Remove useless `org-without-partial-completion'.
2011-06-30 17:06:13 +02:00
Michael Markert b3e8b3f87c adding optional argument KIND to all org-called-interactively-p function invocations
* lisp/ob.el (org-babel-sha1-hash): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
* lisp/org-agenda.el (org-agenda-redo): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-agenda-show-1): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-agenda-set-tags): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org-ascii.el (org-export-as-latin1): Adding optional argument
  KIND to all org-called-interactively-p function invocations.
  (org-export-as-latin1-to-buffer): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-export-as-utf8-to-buffer): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-export-region-as-ascii): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org-docbook.el (org-export-region-as-docbook): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-html.el (org-export-region-as-html): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-latex.el (org-export-region-as-latex): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-table.el (org-table-blank-field): Adding optional argument
  KIND to all org-called-interactively-p function invocations.
  (org-table-current-column): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-current-dline): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-sort-lines): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-sum): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-rotate-recalc-marks): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-table-eval-formula): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (orgtbl-send-table): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org.el (org-mode): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-copy-subtree): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-paste-subtree): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-store-link): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-todo): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-occur): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
2011-06-29 16:22:58 -07:00
Bastien Guerry 2b7dbee193 Replace interactive-p with the org-called-interactively-p macro.
Interactive-p is an obsolete function as of Emacs 23.2.
`org-called-interactively-p' takes care of the current (x)Emacs
version and use either `interactive-p' (for XEmacs and Emacs<23.2)
or `called-interactively-p'.
2011-06-29 18:24:08 +02:00
Nicolas Goaziou 1eac25a438 Adjust fontification of footnotes
* lisp/org-footnote.el (org-footnote-next-reference-or-definition):
  new function.
* lisp/org.el (org-activate-footnote-links): activate the whole
  footnote, but only fontify its label.
2011-06-29 12:00:42 +02:00
Bastien Guerry 7311ac5d4f Keep warning cookie when timestamping/rescheduling/redeadlining.
* install/git/org-mode/lisp/org.el (org-deadline, org-schedule):
keep warning cookie when rescheduling/redeadlining.
(org-time-stamp): Fix problem with warning cookie.
2011-06-29 01:56:40 +02:00
Bastien Guerry f9cc3f525b org.el: make org-time-stamp also keep warning periods.
... not only repeaters.

Thanks to Karl Voit for spotting this.
2011-06-28 19:27:12 +02:00
Bastien Guerry d7c693c1ff org.el: fix bug about repeater not kept when using org-time-stamp
Thanks to Karl Voit for reporting this.
2011-06-27 18:22:37 +02:00
Vincent Belaïche 6d18e03519 * org.el (org-read-property-name): Propose default property name.
Propose default property name value by looking at whether current line
is already some property setting.
2011-06-27 12:35:08 +02:00
Achim Gratz d37223562d Introduce CLOCK_INTO_DRAWER property like the existing LOG_INTO_DRAWER
* lisp/org.el (defcustom org-log-into-drawer): correct typo
* lisp/org-clock.el: new function org-clock-into-drawer to change
  the location of clock events based on properties CLOCK_INTO_DRAWER
  or, as fallback, LOG_INTO_DRAWER, like it is already possible for
  state change logs.
* lisp/org-clock.el (org-clock-jump-to-current-clock): add statement
  to let clause to bind org-clock-into-drawer to result of function
  eval
* lisp/org-clock.el (org-clock-find-position): add statement
  to let clause to bind org-clock-into-drawer to result of function
  eval, change let to let* since the binding is used later in the
  same clause
* doc/org.texi: document that both CLOCK_INTO_DRAWER and
  LOG_INTO_DRAWER can be used to override the contents of variable
  org-clock-into-drawer (or if unset, org-log-into-drawer)
* doc/org.texi: @xref->@pxref
2011-06-27 12:12:23 +02:00
Bastien Guerry 8608b6651d Fix doubled-word typo.
Thanks to Jim Meyering <jim@meyering.net> for this upstream fixes.
2011-06-20 15:38:24 +02:00
Ted Zlatanov b3aad7ffa8 Do not error out on fontification errors
* org.el (org-fontify-meta-lines-and-blocks): Ignore errors.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-06-20 11:23:44 +02:00
Eric Schulte db1c3f6a3e Revert "replacing calls to now-defunct function `interactive-p'"
This reverts commit 4f084e1467.
2011-06-16 21:32:54 -07:00
Carsten Dominik faccb8d58c Make S-up/down/left/right in indented clocktable BEGIN lines
* lisp/org.el (org-find-dblock):
(org-clocktable-try-shift): Make regexp work also when #+begin
line is indentex.

Achim Gratz writes:

It wasn't possible to use S-up/down/left/right on the clocktable BEGIN
line when the whole table was indented.  Interestingly enough calling
the function directly would work, it turned out to be a regexp in org.el
that was still pinned to bol.  There was a second one further down that
is used to recognize dynamic blocks that got the same treatment.

TINYCHANGE
2011-06-15 08:55:09 +02:00
Eric Schulte a034526448 more small compiler errors
* lisp/org-mouse.el (org-agenda-earlier): Declaring previously unknown
  function.
  (org-agenda-later): Declaring previously unknown function.
  (org-agenda-mode-map): Declaring previously unknown variable.
* lisp/org.el (org-read-date-analyze): Explicitly ignore the return
  value of a function.
2011-06-14 12:51:13 -07:00
Eric Schulte 94b325839c Replacing '(λ...) with #'(λ...).
* lisp/org-ascii.el (org-export-as-ascii): Replacing '(λ...) with #'(λ...).
* lisp/org-attach.el: Replacing '(λ...) with #'(λ...).
  (org-attach-commit): Replacing '(λ...) with #'(λ...).
* lisp/org-exp.el: Replacing '(λ...) with #'(λ...).
  (org-export-handle-include-files): Replacing '(λ...) with #'(λ...).
* lisp/org-html.el: Replacing '(λ...) with #'(λ...).
  (org-export-as-html): Replacing '(λ...) with #'(λ...).
* lisp/org-mouse.el: Replacing '(λ...) with #'(λ...).
  (org-mouse-popup-global-menu): Replacing '(λ...) with
  (org-mode-hook): Replacing '(λ...) with #'(λ...).
  (org-agenda-mode-hook): Replacing '(λ...) with #'(λ...).
* #'(λ...).Replacing '(λ...) with #'(λ...).
  (org-mouse-context-menu): Replacing '(λ...) with #'(λ...).
* lisp/org-src.el: Replacing '(λ...) with #'(λ...).
  (org-src-mode-configure-edit-buffer): Replacing '(λ...) with #'(λ...).
* lisp/org-table.el: Replacing '(λ...) with #'(λ...).
  (org-table-fix-formulas-confirm): Replacing '(λ...) with #'(λ...).
* lisp/org.el: Replacing '(λ...) with #'(λ...).
  (org-confirm-shell-link-function): Replacing '(λ...) with
  (org-category): Replacing '(λ...) with #'(λ...).
* #'(λ...).Replacing '(λ...) with #'(λ...).
  (org-time-stamp-rounding-minutes): Replacing '(λ...) with #'(λ...).
2011-06-14 12:01:04 -07:00
Eric Schulte f8abb11eff Declaring functions used by `org-open-file'
* lisp/org.el (mailcap-parse-mailcaps): Declaring functions used by
  `org-open-file'.
  (mailcap-extension-to-mime): Declaring functions used by
  `org-open-file'.
  (mailcap-mime-info): Declaring functions used by `org-open-file'.
2011-06-14 11:58:00 -07:00
Eric Schulte 4f084e1467 replacing calls to now-defunct function `interactive-p'
* lisp/org-agenda.el (org-agenda-redo): Replacing call to now-defunct
  function `interactive-p'.
  (org-agenda-show-1): Replacing call to now-defunct function
  `interactive-p'.
  (org-agenda-set-tags): Replacing call to now-defunct function `interactive-p'.
* lisp/org-ascii.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-latin1): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-latin1-to-buffer): Replacing call to now-defunct
  function `interactive-p'.
  (org-export-as-utf8): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-utf8-to-buffer): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-ascii): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-docbook.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-docbook): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-html.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-html): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-latex.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-latex): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-macs.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-called-interactively-p): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-table.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-table-blank-field): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-current-column): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function
  `interactive-p'.
  (org-table-current-dline): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function
  `interactive-p'.
  (org-table-sort-lines): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-sum): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-rotate-recalc-marks): Replacing call to now-defunct
  function `interactive-p'.
  (org-table-eval-formula): Replacing call to now-defunct function
  `interactive-p'.
  (orgtbl-send-table): Replacing call to now-defunct function `interactive-p'.
* lisp/org.el: Replacing call to now-defunct function `interactive-p'.
  (org-mode): Replacing call to now-defunct function `interactive-p'.
  (org-copy-subtree): Replacing call to now-defunct function
  `interactive-p'.
  (org-paste-subtree): Replacing call to now-defunct function
  `interactive-p'.
  (org-store-link): Replacing call to now-defunct function
  `interactive-p'.
  (org-todo): Replacing call to now-defunct function `interactive-p'.
  (org-occur): Replacing call to now-defunct function `interactive-p'.
2011-06-14 11:37:59 -07:00
Michael Brand 374b70a383 Bugfix for heading levels when toggling from list
* org.el (org-toggle-heading): More comments and fix number of stars
when toggling from list items.

TINYCHANGE
2011-06-09 21:11:20 +02:00
Nicolas Goaziou ddeab1a8af Changes automatically made to cookies shouldn't move tags
* lisp/org.el (org-auto-align-tags): change docstring.
(org-update-parent-todo-statistics): keep tags aligned even when
statistics cookies are shifting them.
* lisp/org-list.el (org-update-checkbox-count): keep tags aligned even
when statistics cookies are shifting them.
2011-06-05 18:55:25 +02:00
Carsten Dominik 0db8830733 Fix issue with truncate-lines and visual-line-mode
* lisp/org.el (org-insert-link): Set truncate-line in the *Org Link* buffer
and make sure that it really is set there.

See http://thread.gmane.org/gmane.emacs.orgmode/42447
2011-06-02 19:48:36 +02:00
Carsten Dominik 32ac8dd0e5 More fixes to priority setting.
Patch by Michael Brand
2011-06-01 14:25:03 +02:00
Sébastien Delafond 1afcef3007 Do not run flyspell-checks on {todo,all-time,additional-option-like}-keywords
* org.el (org-mode-flyspell-verify): This is useful when using
  flyspell with a non-English dictionary, or if some of your
  keywords are in another language.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-06-01 13:51:31 +02:00
David Maus 00040e708c Use delete-char' instead of delete-backward-char'
* org.el (org-self-insert-command): Use `delete-char' instead of
  `delete-backward-char'.
* org-table.el (orgtbl-self-insert-command): Dto.

According to the doc string `delete-backward-char' "is meant for
interactive use only; from Lisp, better use `delete-char' with a
negated argument."
2011-06-01 08:30:20 +02:00
David Maus f4f20ad5c8 Move defsubst `org-re-property' before its first use
* org.el (org-re-property): Move before its first use.
2011-06-01 06:47:03 +02:00
Carsten Dominik 1beda3d3c8 Fix typo in code
* lisp/org.el (org-toggle-item): Move parenthesis to correct location.
2011-05-31 13:46:30 +02:00
Carsten Dominik 257ce858e7 Improve documentation and error handling with priorities
* lisp/org.el (org-default-priority):
(org-priority-start-cycle-with-default): Improve docstring.
(org-priority): Throw error when priority is out of range.

Patch by Michael Brand.
2011-05-31 13:37:04 +02:00
Carsten Dominik a958e3bc8f Fix issue with buffer-undo-list being t in some buffers
* lisp/org.el (org-self-insert-command): Catch the case of
buffer-undo-list eq t.
2011-05-31 09:23:52 +02:00
Nicolas Goaziou 363a4554e2 Do not split a partially selected line when calling org-toggle-heading
* lisp/org.el (org-toggle-heading): region should be considered as
  made of full lines, without the last one if region-end is at bol.
  Removed unused variables. Refactored and commented code.
2011-05-28 19:42:53 +02:00
Nicolas Goaziou 5a57bfffae Preserve subtrees when changing headlines into items
* lisp/org.el (org-toggle-item): when region includes an headline less
  indented than first one, set it as the new reference.
2011-05-28 19:10:05 +02:00
Nicolas Goaziou 6c2737ddbd Fix code typo 2011-05-28 17:22:48 +02:00
Nicolas Goaziou ddc2467387 Fix list before first heading conversion to odd levels subtree
* lisp/org-list.el (org-list-to-subtree): if the list is before first
  heading and `org-odd-levels-only' is non-nil, the first item gets
  two stars instead of one.
* lisp/org.el (org-reduced-level): a level of 0 was reduced to 1 with
  `org-odd-levels-only' non-nil.
2011-05-28 14:13:11 +02:00
Nicolas Goaziou ec61f20650 Fix org-toggle-item
* lisp/org.el (org-toggle-item): converting an heading to an item
  would sometimes insert unnecessary spaces before it, and unwanted
  space with `org-indent-mode' on. Changing some text into an item
  wouldn't always preserve indentation.
2011-05-28 14:13:11 +02:00
Eric Schulte 5c1cc3fb4b adding support for evaluation of awk code blocks
* Makefile (LISPF): Adding ob-awk to the makefile
* lisp/org.el (org-babel-load-languages): Adding ob-awk to the list of
  executable languages.
2011-05-26 07:34:58 -06:00
David Maus b6384bbcbe Prevent adding of extra space to value if property already exists
* org.el (org-entry-put): Prevent adding of extra space to value if
  property already exists.

Fixes a regression reported by Wujun Zhou.
2011-05-24 20:55:35 +02:00
Paul Sexton 7af369da69 contrib/org-drill.el -- updated to version 2.3.2
contrib/org-drill.el -- added to choices for 'org-modules' variable
2011-05-21 00:13:35 +12:00
Carsten Dominik 2a8fbc4b46 Bury calendar buffer
* lisp/org.el (org-read-date): Bury Calendar buffer after
using it for selecting a date.

Patch by Ben North

TINYCHANGE
2011-05-16 08:36:56 +02:00
Nicolas Goaziou 3dfcaf013a Don't indent #+include lines
* lisp/org.el (org-indent-line-function): don't include #+include lines.
2011-05-14 14:32:32 +02:00
Carsten Dominik 9dba548cd5 Agenda Views: Call `org-agenda-skip' first.
* lisp/org-agenda.el (org-agenda-get-todos): Call `org-agenda-skip' first,
then check if timestamps cause exclusion.
* lisp/org.el (org-scan-tags):  Call `org-agenda-skip' first,
then check if timestamps cause exclusion.

For more information, see the following mailing list thread:

http://thread.gmane.org/gmane.emacs.orgmode/41052/focus=41052
2011-05-10 08:58:04 +02:00
Carsten Dominik e8151c382c Add CLOCKSUM to special properties, to make org-invoice.el work again
* lisp/org.el (org-special-properties): Add CLOCKSUM to the special properties.
2011-05-06 17:20:40 +02:00
Robert P. Goldman 62c12cc50f Add an easy template for index (i)
* lisp/org.el (org-structure-template-alist):  Add an easy template
for index (i), and move include file to I from i.
* doc/org.texi (Easy Templates): Document new template.

Notes about this patch:
1.  It breaks some old user-visible behavior, since <i changes meaning.
    Per Nick's posting, we expect that if index is used, it will be used
    more commonly than include file.  However, since this is a custom,
    behavior could be changed.  Indeed, we could put index on capital
    I with a suggestion that users who are indexing should swap in their
    customizations.
2.  I modified the docstring for org-structure-template-alist, which did
    not explain the function of the "?" in the string.  Someone should
    check and verify I didn't get this wrong.
3.  There doesn't seem to be a Muse tag equivalent for #+index, so I
    just made the Muse equivalent of #+index be #+index.  I don't know
    org-mtags enough to know if this is appropriate.
2011-05-04 09:49:31 +02:00
Carsten Dominik 420899b3df Fix typo in function name
* lisp/org.el (org-remove-uninherited-tags): Renamed from
org-remove-iniherited-tags.
(org-scan-tags): Fix typo in function call.
(org-get-tags-at): Fix typo in function call.
2011-05-02 09:16:51 +02:00