Commit Graph

5605 Commits

Author SHA1 Message Date
Eric Schulte 32a6752267 fix typo in new sbe specification
* lisp/ob-table.el (sbe): Fix typo in new sbe specification.
2011-10-07 12:22:04 -06:00
Eric Schulte 75e65de150 sbe now allows specification of header arguments
* lisp/ob-table.el (sbe): If first variable is a string and not a cons
  cell, then interpret it as a string of header arguments to be passed
  to the code block.
2011-10-07 12:18:00 -06:00
Eric Schulte 623dd10c96 ob-shen: fix build error
* lisp/ob-shen.el (shen-eval-defun): Declare external function.
  (org-babel-execute:shen): Move requirement of inf-shen into the
  function in which it is used to fix build error.
2011-10-07 09:09:49 -06: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
niels giesen 3d83564b7d Time range end in agenda view not displayed
Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:

> michael holzer <michi_holzer_news@gmx.at> writes:
>
>> When I have an entry that contains a time range, for example:
>>
>> * timerange
>>   <2011-09-30 Fri 14:00>--<2011-09-30 Fri 18:00>
>>
>> this shows up in the agenda view as:
>>
>>   uni:        14:00...... timerange
>>
>> while I would expect something like:
>>
>>   uni:        14:00-18:00 timerange
>>
>
> |the manual says:
> |Time ranges can be specified with two timestamps,
> |like ‘<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>’.
> |
> | 20:30-22:15 Marvin escorts the Hitchhikers to the bridge
>
> I confirm this bug.
>
> Org-mode version 7.7 0e9d401519
> GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO
>
> Giovanni
>
>

Funny enough, I noticed this too last week, so I whipped up this patch.
It inserts the range when start date is the same as the end date. Please
test (it's still young) && include in Org if you so please.

#+begin_src diff
>From dcf81753aa5cab311f2a3a0272e4691e4bc6ea38 Mon Sep 17 00:00:00 2001
From: Niels Giesen <niels.giesen@gmail.com>
Date: Mon, 26 Sep 2011 11:43:55 +0200
Subject: [PATCH] Show timestamp ranges in agenda

* lisp/org-agenda.el (org-agenda-get-blocks): Show timestamp ranges in
  agenda if start day is same as end day
2011-10-05 16:46:18 +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 ee3a68216b Revert "Avoid XHTML strict problems by not enclosing special blocks in paragraph tags"
This reverts commit 4e3cc81a2e.
2011-10-04 23:31:43 +02:00
Carsten Dominik 4e3cc81a2e Avoid XHTML strict problems by not enclosing special blocks in paragraph tags
* lisp/org-special-blocks.el (org-special-blocks-convert-html-special-cookies):
Avoid XHTML strict problems by not enclosing special blocks in
paragraph tags.
2011-10-04 16:22:27 +02:00
Bernt Hansen 106993d310 Check argument is a string before calling string-match
* lisp/org-html.el (org-export-as-html): Check string-match argument
(org-html-handle-time-stamps): Check string-match argument

Avoid wrong-type-argument errors during exporting.
2011-10-04 14:35:33 +02:00
Carsten Dominik aefd49b909 Change default value of `org-agenda-skip-additional-timestamps-same-entry'
* lisp/org-agenda.el (org-agenda-skip-additional-timestamps-same-entry):
Change default value.
2011-10-04 14:30:32 +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
Nicolas Goaziou 0fff59cd43 org-footnote: Small refactoring
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Small
  refactoring.
2011-10-01 08:57:33 +02:00
Nicolas Goaziou 0e9d401519 org-footnote: Fix an infloop
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Fix an infloop
  introduced by commit 1effad02be.
2011-09-29 22:53:45 +02:00
Nicolas Goaziou a77117ba80 org-footnote: Remove useless org-re
* lisp/org-footnote.el (org-footnote-at-definition-p): remove useless
  org-re.
2011-09-29 22:44:58 +02:00
Nicolas Goaziou 1effad02be org-footnote: Only renumber real footnotes references or definitions
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Verify point is
  at a real footnote reference or definition before renumbering it.
2011-09-29 22:34:15 +02:00
Tassilo Horn 2e2bd083da Fix renumbering for footnotes at BOL.
Hi all,

org-footnote-renumber-fn:N invalidates footnotes that appear as the
first thing on a line.  Here's a test file including the recipe.

--8<---------------cut here---------------start------------->8---
* Bla

  This is a line in which the following footnote that is inserted exactly
  [fn:1] is the first thing in that line.  And now invoke
  org-footnote-renumber-fn:N and see it breaking.

* Footnotes

[fn:1] Test
--8<---------------cut here---------------end--------------->8---

Note, that in larger org files, it's likely that you don't even notice
that the footnotes break.

Once I added a patch on patchwork that fixed this issue, and that's
shown as "accepted".

  http://patchwork.newartisans.com/patch/705/

I think, I've marked it as deferred or so myself because I've thought
the issue was fixed in the meantime, but that doesn't seem to be true.

Here's an updated patch.
2011-09-29 15:55:30 +02:00
Nicolas Goaziou c00fe037be org-footnote: Don't offer to create a footnote when it already exists
* lisp/org-footnote.el (org-footnote-goto-definition): This patch
  makes sure the function says when a definition has been found.
  Thus, moving from the reference to the definition doesn't offer to
  create the latter again.
2011-09-29 15:30:46 +02:00
Nicolas Goaziou c7abf641eb org-footnote: fix commit 774f9cb8e6
* lisp/org-footnote.el (org-footnote-create-definition): Explicitely
  move point after tag, if it has just been inserted.
2011-09-29 15:20:34 +02:00
Eric Schulte dec0b8e975 gnuplot, don't quote file names on Windows systems
Thanks to Alex Vorobiev for suggesting this change

* lisp/ob-gnuplot.el (org-babel-execute:gnuplot): Don't quote file
  names on Windows systems.
2011-09-29 06:54:49 -06:00
Nicolas Goaziou 774f9cb8e6 org-footnote: ensure footnote tag is inserted after footnotes in non-Org buffers
* lisp/org-footnote.el (org-footnote-create-definition): When the tag
  is missing, it is created before any existing footnote, or at end of
  buffer.  In the latter case, the marker pointing at the position
  where the new footnote is going to be inserted (at end of buffer)
  stays before the tag.  This patch makes sure that the marker will be
  kept after the tag.
2011-09-28 19:07:38 +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
Nicolas Goaziou e9ce64c8bb ob-asymptote: silence byte-compiler
* lisp/ob-asymptote.el (org-babel-asymptote-define-type): silence byte-compiler.
2011-09-25 16:19:27 +02:00
John Wiegley 706de59f07 Fixed an incorrect paren placement 2011-09-24 12:06:25 -05:00
Eric Schulte ad21eeff85 fix bug in R session evaluation
* lisp/ob-R.el (org-babel-R-evaluate): Fix bug in R session
  evaluation.
2011-09-21 09:10:21 -06:00
John Wiegley 0c09937069 New vars: org-habit-today-glyph, org-habit-completed-glyph 2011-09-21 04:09:49 -05:00
Eric Schulte 4fbefd87aa configurable property name for bibtex entry types
* lisp/org-bibtex.el (org-bibtex-type-property-name): Configurable
  property name for bibtex entry types.
  (org-bibtex-headline): Use new configurable property name.
  (org-bibtex-check): Use new configurable property name.
  (org-bibtex-create): Use new configurable property name.
  (org-bibtex-write): Use new configurable property name.
2011-09-20 09:20:53 -06:00
Bastien Guerry fcdbb5e6c9 org.el (org-paste-subtree): Remove useless (concat ...).
* org.el (org-paste-subtree): Remove useless (concat ...).

See change from Stefan Monnier here:
https://lists.gnu.org/archive/html/emacs-diffs/2011-09/msg00224.html
2011-09-20 08:38:34 +02:00
Eric Schulte 1b11c7e6a0 replacing usage of characterp with integerp (which should work w/Emacs22)
* contrib/babel/langs/ob-fortran.el (org-babel-fortran-var-to-fortran):
  Replacing usage of characterp with integerp (which should work w/Emacs22).
* lisp/ob-C.el (org-babel-C-var-to-C): Replacing usage of characterp
  with integerp (which should work w/Emacs22).
2011-09-17 14:52:29 -06:00
Nicolas Goaziou 1e1cde7546 org-footnote: check context around definition at a proper place
* lisp/org-footnote.el (org-footnote-at-definition-p): Context must be
  valid at the beginning of line, not at point.
2011-09-17 12:01:54 +02:00
Eric Schulte 647849dff9 better delimiting of Org-mode text preceding a code block
Thanks to Christopher Genovese for this change

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Better
  delimiting of Org-mode text preceding a code block.
2011-09-16 09:52:34 -06:00
Eric Schulte 6844094edb Don't delete variable values when checking for assignment.
* lisp/ob.el (org-babel-get-src-block-info): Fixing bug, accidentally
  deleted variable values.
2011-09-16 09:52:34 -06:00
Eric Schulte b9922ba879 customizable processing of Org-mode text used as comments in tangled source-code files
* lisp/ob-tangle.el (org-babel-process-comment-text): Customizable
  function to process comment text.
  (org-babel-tangle-collect-blocks): Make use of new customizable
  processing function.
  (org-babel-spec-to-string): Call customizable function rather than
  `org-babel-trim'.
2011-09-16 09:52:34 -06:00
Eric Schulte 65d05b00b0 ob-R: don't process output when "scalar" or "verbatim"
* lisp/ob-R.el (org-babel-execute:R): Collect and pass along the
  result-params.
  (org-babel-R-evaluate): Accept result-params and if "scalar" or
  "verbatim" don't process output.
  (org-babel-R-evaluate-session): Accept result-params and if "scalar"
  or "verbatim" don't process output.
2011-09-15 15:43:35 -06:00
Eric Schulte 267015b24a differentiate between result types and wrappers
* lisp/ob.el (org-babel-merge-params): Differentiate between result
  types and wrappers.
2011-09-15 15:22:14 -06:00
Eric Schulte 11f07576cb Check that functional-syntax variables are initialized.
* lisp/ob.el (org-babel-get-src-block-info): Check that
  functional-syntax variables are initialized.
2011-09-15 09:24:29 -06:00
Eric Schulte f075ada9a1 Adding a note for a future enhancement.
* lisp/ob.el (org-babel-check-src-block): Adding a note for a future
  enhancement.
2011-09-15 09:11:12 -06:00
Carsten Dominik 11dec73c0c Merge branch 'master' of orgmode.org:org-mode 2011-09-14 08:54:53 +02:00
Carsten Dominik a3c3ff3fde Restore point when exporting a subtree
* lisp/org-exp.el (org-export): Restore point when exporting a subtree.
2011-09-14 07:48:49 +02:00
Eric Schulte 0037ef9261 more robust to code blocks with empty bodies
* lisp/ob.el (org-babel-parse-src-block-match): More robust to code
  blocks with empty bodies.
2011-09-13 09:36:03 -06:00
Eric Schulte 597e1eb4fe Don't error on empty code block body.
* lisp/ob.el (org-babel-parse-src-block-match): Don't error on empty
  code block body.
2011-09-13 08:57:29 -06: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
David Maus 5a373f649e Remove unnecessary link unescape
* org-html.el (org-html-handle-links): Remove unnecessary link
unescape.

PATH is already unescaped and should never be escaped twice. Big
thanks to Jambunathan K for analyzing the problem.
2011-09-11 16:50:43 +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
Eric Schulte a4e881207d better error message for unassigned variables
* lisp/ob.el (org-babel-merge-params): Better error message for
  unassigned variables.
2011-09-08 11:44:49 -06:00
Christian Egli 2178b63545 Merge branch 'master' of orgmode.org:org-mode 2011-09-07 15:45:40 +02:00
Christian Egli 14304f6dcd taskjuggler export: take buffer local variables into account
* org-taskjuggler.el (org-export-as-taskjuggler): Clone the
buffer local variables to the temporary buffer before
exporting.

The taskjuggler exporter handles properties. When defining buffer
local priorities the export fails however, as buffer local variables
are not taken into account since the export happens in a new temporary
buffer. This commit fixes that by cloning the relevant buffer local
variables into the temporary buffer before exporting.
2011-09-07 15:45:14 +02:00
Eric Schulte d0a3a3870f org-exp: only remove commas on the front line of a code block
* lisp/org-exp.el (org-export-select-backend-specific-text): Only
  remove commas on the front line of a code block.
2011-09-06 21:52:17 -06:00
Martyn Jago 223ac13486 Inline source block and test fixes * lisp/ob.el: Fixed late night refactoring error * testing/examples/babel.org: whitespace * testing/lisp/test-ob.el: Fixed test-org-babel/inline-src-block-regexp (regression error) Renamed test-org-babel/parse-header-args2 since duplicate test heading Made test-org-babel/parse-header-args less brittle 2011-09-06 08:53:07 -06:00
Martyn Jago d7d052ec7c Bug fixes to inline source block execution triggering. * lisp/ob.el: Created org-babel-get-inline-src-block-matches() to fix problems with org-ctrl-c-ctrl-c not triggering inline src block execution when point is on or after a space within the inline src block body. Also fixed execution problems where inline src block is on buffer line 1. * testing/examples/babel.org: Test data for org-babel-get-inline-src-block-matches()
* testing/lisp/test-ob.el: Tests for
  org-babel-get-inline-src-block-matches()
2011-09-06 08:52:59 -06:00
Eric Schulte 0d580520cc better code block demarcation
* lisp/ob.el (org-babel-demarcate-block): Copy headers and indent to
  column of point when a block is split.
2011-09-04 17:06:07 -06:00
Eric Schulte 0b6de9a026 corrected file insertion for inline results
* lisp/ob.el (org-babel-insert-result): Corrected file insertion for
  inline results.
2011-09-04 10:51:34 -06:00
Nicolas Goaziou ff4af45e68 org-footnote: no footnote in latex fragments
* lisp/org-footnote.el (org-footnote-in-valid-context-p): No footnote
  in latex fragments.
2011-09-04 16:45:39 +02:00
Martin Rudalics 4a8634e1a5 org-compat.el: Remove LABEL argument from pop-to-buffer-same-window call.
* org-compat.el (org-pop-to-buffer-same-window): Remove LABEL
argument from pop-to-buffer-same-window call.
2011-09-02 18:18:56 +02:00
Eric Schulte a611170b57 ob-R: improve prompt detection regexp. Thanks to the users of ess-tracebug for this new regexp
* lisp/ob-R.el (org-babel-R-evaluate-session): Improve prompt
  detection regexp.
2011-09-01 12:03:43 -06:00
Nicolas Goaziou ea7732d269 org-inlinetask: Small refactoring
* lisp/org-inlinetask.el (org-inlinetask-goto-end): Small refactoring.
2011-09-01 08:49:28 +02:00
Nicolas Goaziou 84226fe2b5 ob-asymptote: simplify table to array conversion process
* lisp/ob-asymptote.el (org-babel-asymptote-var-to-asymptote):
  refactor code.
(org-babel-asymptote-table-to-array): removed function.
2011-08-31 06:09:42 -06:00
Nicolas Goaziou 77537073a1 ob-asymptote: full support for uni-dimensional lists
* lisp/ob-asymptote.el (org-babel-asymptote-var-to-asymptote):
  recognize non-nested lists as uni-dimensional arrays.
2011-08-31 06:09:36 -06:00
Eric Schulte cae9f947be babel: don't check for header arguments in properties with leading ":"s
* lisp/ob.el (org-babel-params-from-properties): Don't check for
  header arguments in properties with leading ":"s.
2011-08-30 14:51:00 -06:00
Nicolas Goaziou d775777afc org-inlinetask: fix `org-inlinetask-goto-end' with one line long tasks
* lisp/org-inlinetask.el (org-inlinetask-goto-end): Correctly detect
  the end of an inlinetask when the next one starts immediately after
  the current one.  Also, return position of point.
2011-08-30 14:28:36 +02:00
Nicolas Goaziou 2ff74fc5b6 ob: allow inline src blocks to start at bol
* lisp/ob.el (org-babel-inline-src-block-regexp): Allow regexp to
  start at bol.
2011-08-29 16:05:18 -06:00
Nicolas Goaziou 1421887cde ob-asymptote: small fix
* lisp/ob-asymptote.el (org-babel-asymptote-define-type): elisp floats
  are asymptote reals.
2011-08-29 23:06:35 +02:00
Nicolas Goaziou 755f597a05 ob-asymptote: mixed-types tables default to string arrays
* lisp/ob-asymptote.el (org-babel-asymptote-table-to-array): Require a
new argument TYPE specifying the detected type of array.  If it's a
string array, make sure every element is returned as a string. Also
improve doc-string.
(org-babel-asymptote-var-to-asymptote): Fill new argument.  Small
refactoring.
(org-babel-asymptote-define-type): Rewrite to avoid stopping search at
first float found, as strings have precedence over floats.
2011-08-29 11:56:25 -06:00
Nicolas Goaziou d6aa8ffa13 org-footnote: fix xhtml export
* lisp/org-footnote.el (org-footnote-normalize): be sure to separate
  the last footnote definition from the rest of the buffer.

Thanks to Jambunathan K for reporting this.
2011-08-29 13:05:57 +02:00
Eric Schulte f5e09fbd30 ob-awk: safer variable expansion
* lisp/ob-awk.el (org-babel-expand-body:awk): Allow for symbolic
  variable names.
2011-08-28 09:03:19 -06: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 c462683ba2 Merge branch 'master' of orgmode.org:org-mode 2011-08-25 23:42:43 +02:00
Bastien Guerry 8bd2ff192e org-agenda.el: Add `category-pos' in let construct.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-deadlines, org-agenda-get-scheduled): Add
`category-pos' in let construct.

Thanks to Achim Gratz for spotting this.
2011-08-25 23:42:07 +02:00
Nicolas Goaziou 4574cc11bc org-footnote: preserve narrowing when searching a definition
* lisp/org-footnote.el (org-footnote-get-definition): the function has
  to widen buffer if definition has not been found in the current
  narrowed part. Be sure to restore that restriction once the
  definition is found.
2011-08-25 21:12:07 +02:00
Michal Sojka cd8d1b095b icalendar: Make alarm duration RFC5545 compliant
* org-icalendar.el (org-print-icalendar-entries): Make alarm duration
RFC5545 compliant.

The format of alarm trigger was incorrect because "T" letter from
dur-time element was missing (see
http://tools.ietf.org/html/rfc5545#section-3.3.6). This caused some
software (such as KOrganizer) to not interpret the alarms correctly.

TINYCHANGE
2011-08-25 16:39:35 +02:00
Bastien Guerry 02fad0981f org-agenda.el: Correctly set the `org-category-pos' property.
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-progress): Correctly set
the `org-category-pos' property.

Thanks to Michael Brand for signaling this problem, and to Nick
Dokos and Erik Iverson for confirming it.
2011-08-25 15:20:10 +02:00
Bastien Guerry 236642dc54 org-html.el (org-export-html-divs): Improve docstring.
* org-html.el (org-export-html-divs): Improve docstring.
2011-08-25 15:09:44 +02:00
Bastien Guerry 50412d29c5 Merge branch 'master' of orgmode.org:org-mode 2011-08-25 09:39:38 +02:00
Carsten Dominik be25be1c8d Merge branch 'master' of orgmode.org:org-mode 2011-08-25 08:48:16 +02:00
Carsten Dominik e91f6db1e3 Keep table row/column removal from creating invalid formulas
* lisp/org-table.el (org-table-fix-formulas): Throw error when changing
formula leads to an invalid formula.

This fix catches at least one case, the one described by Nicolas:

> | 1 | 2 | 3 |
> | 1 | 2 | 3 |
> #+TBLFM: @2$1..@2$3=@1
> If I remove the second column (M-S-Left), the formula is correctly
> updated. But when I remove the last column, the formula gets partly
> deleted and becomes:
>
>                            #+TBLFM: @2$1..
>
2011-08-25 08:16:00 +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
Bastien Guerry d203b61a11 Merge branch 'master' of orgmode.org:org-mode 2011-08-24 22:32:55 +02:00
Achim Gratz ccc99317de backport copyright and license headers from Emacs trunk 2011-08-24 22:32:38 +02:00
Nicolas Goaziou ecc6e2fe3f org-agenda: refactor code in `org-agenda-dim-blocked-tasks' 2011-08-24 18:32:19 +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 8b16fae479 org-html.el (org-html-make-link): Minor fix to the docstring.
* org-html.el (org-html-make-link): Minor fix to the docstring.
2011-08-24 16:13:14 +02:00
Suvayu Ali 3a6956770e Define org-inlinetask face
* org-inlinetask.el (org-inlinetask): New customisable face
  for inlinetasks

TINYCHANGE
2011-08-24 15:22:38 +02:00
Bastien Guerry fc4628ef56 * org-agenda.el (org-agenda-get-todos): Properly set `category-pos'.
* org-agenda.el (org-agenda-get-todos): Properly set
`category-pos'.

Thanks to Noorul Islam for this patch.
2011-08-24 10:17:09 +02:00
Nicolas Goaziou 0019b6f193 org-list: fix code typo 2011-08-24 02:11:36 +02:00
Eric Schulte 1833a9c1b4 Revert "Revert "make the "FILE" property non-special when resolving bibtex values""
This reverts commit 4b423ac3cb.
2011-08-23 14:44:09 -06:00
Nicolas Goaziou 08ca5be491 org-list: tiny code change
* lisp/org-list.el (org-list-struct-apply-struct): don't
  use (copy-marker (point)) instead of (point-marker).
2011-08-23 22:20:55 +02:00
Nicolas Goaziou 8bb1a0c57f org-list: forgot a double space 2011-08-23 22:19:14 +02:00
Nicolas Goaziou 969baac557 org-list: corrections to commentary section and add linefeed 2011-08-23 22:17:20 +02:00
Nicolas Goaziou 065c5c3241 Make some files pass checkdoc test 2011-08-23 21:43:30 +02:00
Bastien Guerry 984318cea5 Merge branch 'master' of orgmode.org:org-mode 2011-08-23 17:52:53 +02:00
Eric Schulte 21fd1523be Don't require full variable resolution when finding results
* lisp/ob.el (org-babel-where-is-src-block-result): Don't try to
  resolve variables when simply checking if we're inside of a code
  block.
2011-08-23 09:46:32 -06: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
Eric Schulte b924b34b76 Allow matching of results with tags after the result name.
* lisp/ob-ref.el (org-babel-ref-resolve): Allow matching of results
  with tags after the result name.
2011-08-23 08:36:49 -06:00
Bastien Guerry 76ab4dd422 org-table.el: Allow underscore in field and column names.
* org-table.el (org-table-get-specials): Allow the use of the
underscore character in column names.
(org-table-get-specials): Allow the use of the underscore
character in field names.

Thanks to András Major for bringing this up and to Nick Dokos
for a suggested fix.
2011-08-23 16:27:56 +02:00
Eric Schulte caaadd91a9 cleaning up markers in org-exp-blocks -- Thanks again to Nicolas Goaziou for advice
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Explicitly
  cleaning up markers.
2011-08-22 08:31:09 -06:00
Eric Schulte cb449a672e improve export of inline code blocks
* lisp/ob-exp.el (org-babel-exp-inline-src-blocks): Save match data
  around `org-babel-exp-do-export' which now searches in this case.
  (org-babel-exp-results): Position the point in the inline source
  block during export evaluation.
* lisp/ob.el (org-babel-insert-result): More readable code.
2011-08-22 08:23:52 -06:00
Eric Schulte 36d80ff505 remove duplicate function, Thanks to Nicolas Goaziou for pointing this out.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Use the built
  in function rather than the superfluous (and now removed)
  org-specific function.
2011-08-22 07:40:00 -06:00
Eric Schulte fceb767aea ob-exp: don't examplize inline code blocks which are already escaped
* lisp/ob-exp.el (org-babel-exp-inline-src-blocks): Don't examplize
  inline code blocks which are already escaped.
2011-08-21 14:23:27 -06:00
Eric Schulte f51e540c4c org-exp-blocks: use markers instead of points to remember code block locations
* lisp/org-exp-blocks.el (org-marker-from-point): Helper function to
  create markers at specific points in source buffers.
  (org-export-blocks-preprocess): Use markers instead of points to
  delimit code blocks.
2011-08-21 14:15:18 -06:00
Nicolas Goaziou 405ebb43df org-list: remove dependency on `org-back-over-empty-lines'
* lisp/org-list.el (org-list-separating-blank-lines-number): the
  behaviour of `org-back-over-empty-lines' depends on the associated
  value of `headline' in `org-blank-before-new-entry', which is out of
  context in a list.
2011-08-21 21:39:56 +02:00
Nick Dokos 7f913bc816 Get rid of gratuitous newline after listing/minted environment.
Signed-off-by: Nick Dokos <nick@dokosmarshall.org>
2011-08-21 12:29:56 -06:00
Nick Dokos 707897c25c Eliminate extra newline(s) after example or src block.
Signed-off-by: Nick Dokos <nick@dokosmarshall.org>
2011-08-21 12:28:33 -06:00
Nicolas Goaziou b93087ccf1 org-indent: also initialize background buffers, less aggressively
* lisp/org-indent.el (org-indent-initialize-agent): when the current
  buffer isn't being watched, resume initialization of other watched
  buffers. In that case, give hand to others idle timers or processes
  more frequently.
(org-indent-agent-active-delay): renamed from
org-indent-agent-process-duration.
(org-indent-agent-passive-delay): new variable.
(org-indent-agent-resume-delay): change value.
(org-indent-initialize-buffer): change argument name.
(org-indent-add-properties): change argument name and type
expected. It must be a time value now.

add
2011-08-21 15:28:50 +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
Eric Schulte 96ad99ba07 ob: idempotent code block evaluation and result removal
* lisp/ob.el (org-babel-remove-result): Idempotent code block
  evaluation and result removal.
2011-08-19 08:58:24 -06:00
Eric Schulte bf740ba41c ob-ruby: No longer require inf-ruby when no session evaluation takes place
* lisp/ob-ruby.el (org-babel-ruby-initiate-session): No longer require
  inf-ruby when no session evaluation takes place.
2011-08-19 08:58:24 -06:00
Carsten Dominik 85cc7670c0 Merge branch 'cleanup-include-all-stuff-in-agenda.el' 2011-08-19 15:30:46 +02:00
Bastien Guerry 54fe955c9a org-agenda.el: Mention "%e" in the docstring of org-agenda-prefix-format.
* org-agenda.el (org-agenda-prefix-format): Mention "%e" in
the docstring.
2011-08-19 15:16:38 +02:00
Bastien Guerry 5239a26309 org-crypt.el: fix copyright years. 2011-08-19 15:15:51 +02:00
Carsten Dominik b3de2dbb95 Set a default custom command, agenda plus TODO items
* lisp/org-agenda.el (org-agenda-custom-commands): Set a default value
for this command.
2011-08-19 12:41:11 +02:00
Carsten Dominik 8404f15647 Clean up the misleading name INCLUDE-ALL in some agenda functions
* lisp/org-agenda.el (org-agenda-include-all-todo): Declare this
option as no longer working.
(org-timeline): Rename the include-all argument to dotodo.
(org-arg-loc): Renamed from` org-include-all-loc'.
(org-agenda-list): Rename the INCLUDE-ALL argument to ARG, because its
function has changed.
2011-08-19 12:41:02 +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
Nicolas Goaziou 0c6b67c191 org-indent: changes to the internals of initialization
* lisp/org-indent.el (org-indent-agent-timer,
  org-indent-agentized-buffers, org-indent-agent-resume-timer,
  org-indent-agent-process-duration, org-indent-agent-resume-delay):
  new variables.
(org-indent-initial-marker): more accurate doc-string.
(org-indent-initial-timer, org-indent-initial-resume-timer,
org-indent-initial-process-duration, org-indent-initial-resume-delay,
org-indent-initial-lock): removed variables.
(org-indent-mode): set up an agent to watch current buffer, or add it
to the list of already watched buffers.
(org-indent-initialize-agent): new function.
(org-indent-initialize-buffer): now requires a mandatory buffer
argument.
(org-indent-add-properties): reflect changes to variables. The resume
timer is now global.

This change was introduced because a buffer killed while initializing
couldn't cancel its own initialization timer. Now, a global agent
watches for buffers, starting or resuming their initialization when
appropriate. It can cancel its own timer, thus killing itself, when no
more buffers are being watched.
2011-08-18 23:14:08 +02:00
Nicolas Goaziou 300b2e8f4e org-footnote: normalize function cleanup
* lisp/org-footnote.el (org-footnote-normalize): refactor, and fix
  some blank lines deletion.
2011-08-18 20:18:24 +02:00
Nicolas Goaziou c4d482b269 org-indent: forgot to make a variable local
* lisp/org-indent.el (org-indent-mode):
  `org-indent-initial-resume-timer ' needs to be local.
2011-08-18 19:06:33 +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 74cca9f57e org-indent: silence byte-compiler 2011-08-18 15:46:09 +02:00
Nicolas Goaziou b3f462a94b org-indent: add virtual indentation for blank lines
* lisp/org-indent.el (org-indent-set-line-properties): add text
  properties down to the beginning of the next line.
(org-indent-add-properties): when last position to add properties to
is at the beginning of a line, all that line will have properties.
2011-08-18 15:45:02 +02:00
Nicolas Goaziou 84faa05c1b org-indent: add breaks during asynchronous indentation
* lisp/org-indent.el (org-indent-initial-resume-timer): new variable.
(org-indent-initialize-buffer): also resume after a small break.
(org-indent-add-properties): when in asynchronous mode, proceed for
2 seconds, then take a break.
2011-08-18 15:45:02 +02:00
Nicolas Goaziou b9962b7829 org-indent: externalize a function for better code readability
* lisp/org-indent.el (org-indent-set-line-properties): new function.
(org-indent-add-properties): externalize worker function.
2011-08-18 15:45:02 +02:00
Nicolas Goaziou d40643f949 org-indent: `org-indent-indent-buffer' acts on accessible part of buffer.
* lisp/org-indent.el (org-indent-indent-buffer): take into account narrowing.
2011-08-18 15:45:02 +02:00
Nicolas Goaziou 4d780baa11 org-indent: corrections to comments and doc-strings 2011-08-18 15:45:02 +02:00
Nicolas Goaziou ff5a081002 org-indent: refactoring 2011-08-18 15:45:01 +02:00
Nicolas Goaziou 4ef4bcd533 org-indent: handle more modifications of headlines
* lisp/org-indent.el (org-indent-modified-headline-flag): renamed from
  `org-indent-deleted-headline-flag'
(org-indent-notify-modified-headline): renamed from
`org-indent-notify-deleted-headline'. Handle situations when the stars
of an headline are modified.
(org-indent-refresh-maybe): remove case now handled by previous function.
(org-indent-mode): apply renames.
2011-08-18 15:45:01 +02:00
Nicolas Goaziou 0fd4c59367 Cleaner handling of inline tasks under org-indent-mode
* lisp/org-indent.el (org-indent-inlinetask-first-star): new variable.
(org-indent-add-properties): set the first star of inline-tasks'
virtual indentation in `org-warning' face.
* lisp/org-inlinetask.el (org-inlinetask-insert-task): create a new
  inline-task slightly differently, so virtual indentation can be
  applied normally.
2011-08-18 15:45:01 +02:00
Nicolas Goaziou acd6ed2140 org-indent: implement asynchronous initialization
* lisp/org-indent.el (org-indent-initial-marker,
  org-indent-initial-timer, org-indent-initial-lock): new variables.
(org-indent-mode): at initialization, start an idle timer to indent
the whole buffer. When the user is asking for control, interrupt the
process, and resume at the same point when idle again.
(org-indent-initialize-buffer): new function.
(org-indent-add-properties): throw an interrupt when indentation of
buffer is stopped during initialization.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou 9479991d4c org-indent: modify messages sent
* lisp/org-indent.el (org-indent-indent-buffer): send more appropriate
  messages .
2011-08-18 10:41:31 +02:00
Nicolas Goaziou a7600032d0 org-indent: remove unused variable org-indent-outline-re
* lisp/org-indent.el (org-indent-notify-deleted-headline,
  org-indent-refresh-maybe): replace `org-indent-outline-re' with
  `org-outline-regexp-bol'.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou b955d7539f org-indent: pay attention to org-indent-max and org-indent-max-levels
* lisp/org-indent.el (org-indent-max-levels): modify default value and
  add comment.
  (org-indent-add-properties): pay attention to org-indent-max and
  org-indent-max-levels values.
  (org-indent-refresh-maybe): refactor code to avoid an unnecessary
  save excursion.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou a968b8c76f org-table: remove a now useless hack
* lisp/org-table.el (org-table-align): remove now useless hack.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou 818c449e2c org-indent: remove refresh timer
* lisp/org-indent.el (org-indent-fix-section-after-idle-time): remove
  variable.
  (org-indent-initialize): remove timer.
  (org-indent-add-properties): refactor code.
  (org-indent-refresh-subtree, org-indent-refresh-section,
  org-indent-refresh-buffer,org-indent-set-initial-properties): remove
  functions.
  (org-indent-deleted-headline): new variable.
  (org-indent-notify-deleted-headline,org-indent-refresh-maybe): new
  functions.
  (org-indent-mode): insert new functions into a hook.
2011-08-18 10:41:31 +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 3100838dcc org-colview.el: Correctly remove leading stars.
* org-colview.el (org-columns-cleanup-item): Correctly remove
leading stars in items displayed in the agenda column view.

Thanks to Christian Schmidt for spotting this.
2011-08-18 09:14:44 +02:00
Bastien Guerry 9f337ee06c org-clock.el: remove `org-clocktable-sort-clock-data'.
This function by Max Mikhanosha was added accidently.  We are
waiting for the FSF to process Max copyright assignement to get
this function in org-mode.

Thanks to Achim Gratz for spotting at this.
2011-08-18 09:00:20 +02:00
Bastien Guerry 2edd05eaac org-colview: Clean up items in agenda mode too.
* org-colview.el (org-columns-display-here): Clean up items in
org-agenda-mode too.
(org-columns-cleanup-item): Take a new argument CPHR to allow
passing a complex heading regexp.  Rewrite to cleanup ITEM
correctly in `org-agenda-mode'.

Thanks to Christian Schmidt for pointing at this problem.
2011-08-17 16:56:27 +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 a472bee33d org-footnote.el: silence byte-compiler. 2011-08-17 16:05:11 +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