Commit graph

8720 commits

Author SHA1 Message Date
Carsten Dominik 54d7df6774 Make it possible to place table captions below the table
* lisp/org-latex.el (org-export-latex-tables): Honor
`org-export-latex-table-caption-above'
(org-export-latex-table-caption-above): New option.

Patch by Thomas Dye.
2011-10-10 21:05:03 +02:00
Jambunathan K 968313f113 org-odt.el: Treat label resolution failures as soft error
* contrib/lisp/org-odt.el (org-odt-get-label-definition): If a
label cannot be resolved, issue a warning and return nil.
(org-odt-fixup-label-references): Nothing to fixup if a
referenced label is not seen by the odt exporter.
2011-10-10 16:26:16 +05:30
Jambunathan K 78a1d2919c org-odt.el: Abort export if the label referenced is not defined
* contrib/lisp/org-odt.el (org-odt-get-label-definition):
Throw an error if the label that is being referenced is not
defined elsewhere.
2011-10-10 14:27:14 +05:30
Jambunathan K bbf836730a Revert "org-odt.el: Remove dependency on a pending patch"
This reverts commit 13b4f6b2e0.
2011-10-09 22:23:11 +05:30
Eric Schulte 3e86300d6d now including language specific header arg values in insertion options
* lisp/ob.el (org-babel-insert-header-arg): Now including language
  specific header arg values in insertion options.
2011-10-09 09:31:32 -06:00
Eric Schulte d7d0230bf4 Fixed typo in org-babel-insert-header-arg.
Thanks to Torsten Wagner for pointing this out and for suggesting
  the original feature.

* lisp/ob.el (org-babel-insert-header-arg): Fixed typo.
2011-10-09 09:11:10 -06:00
Carsten Dominik 9bd1c338a0 Merge branch 'master' of orgmode.org:org-mode 2011-10-09 13:17:58 +02:00
Jambunathan K f8cd4a3793 org-odt help
> I would like to submit 2 more patches - one to the manual and other to
> org-exp.el.

I am attaching the promised patch to org-exp.el. Can someone review and
commit this change?

Please note that I have withheld the changes to org-odt & co which make
use of this change.

ps: The patch to org.texi will follow soon - maybe in a day or two.

>From 39ab2a263336ba077c7cd6627a3203c55c5bddba Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Tue, 4 Oct 2011 23:32:35 +0530
Subject: [PATCH] org-exp.el: Enhance `org-export-number-lines' to support odt export

* lisp/org-exp.el (org-export-number-lines): Modified.  Add a
new parameter `preprocess' and use this for backend-agnostic
handling of literal examples.

This parameter is currently exercised only by the odt exporter.  Hint:
See future commits.
2011-10-09 13:17:08 +02:00
David Maus 6f69fbca0c org-lparse.el: Remove unecessary link unescape
* contrib/lisp/org-lparse.el (org-lparse-format-org-link): Remove unecessary
link unescape.
2011-10-09 13:31:02 +05:30
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
Eric Schulte 4a7dd1e087 binding new code block header argument helper function to C-c C-v h 2011-10-08 16:38:32 -06:00
Eric Schulte 9135ec76dd New helper function for inserting common code block header arguments
* lisp/ob.el (org-babel-common-header-args-w-values): New variable to
  hold common header arguments and their default values.
  (org-babel-header-arg-names): Redefined using the new common header
  arg variable.
  (org-babel-insert-header-arg): New function to help when inserting
  header arguments.
2011-10-08 16:31:50 -06:00
David Maus 85d0a9fc05 Remove unnecessary protection markers
* org-html.el (org-html-handle-links): Remove unnecessary protection
markers when publishing link in default format.

Left-over from the mess that was 7.5's HTML export.
2011-10-08 21:18:57 +02:00
Carsten Dominik eed6b353d2 Manual: Better yasnippet config info
* doc/org.texi (Conflicts): Better yasnippet config info

Patch by Sylvain Rousseau.
TINYCHANGE
2011-10-08 18:32:16 +02:00
Pieter Praet 7e5c0263fc org-crypt: when running org-decrypt-entry', only run auto-save-mode' check if on an encrypted entry
* lisp/org-crypt.el (org-crypt-check-auto-save): New function, see next change.
* lisp/org-crypt.el (org-decrypt-entry): Break the auto-save-mode check out
  into a separate function, and call it at a later point, to assure it only
  runs when visiting an encrypted entry.

Currently `org-decrypt-entry' is doing the auto-save-mode check whenever
it's run, regardless of context, while this only makes sense when run on
an entry which is actually encrypted (or looks like it, at least).

TINYCHANGE
2011-10-08 18:10:37 +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
niels giesen a6d74af2b9 Continue numbering from any previous numbered snippet with +n, even when previous numbered snippet does not immediately precede it.
* org-mode/lisp/org-exp.el (org-export-number-lines):

  Check whether number parameter (this is a numbered block!) is
  non-nil as well as whether cont is nil (this numbered block should
  *not* continue numbering where we left off before!) before resetting
  the count to zero.

  From the docs:

    If you use a `+n' switch, the numbering from the previous
    numbered snippet will be continued in the current one.

  With this change I believe the code complies with the docs.
2011-10-08 16:30:56 +02:00
Carsten Dominik 468aa115ef Merge branch 'master' of orgmode.org:org-mode 2011-10-08 09:02:36 +02:00
Dave Abrahams e53f62eba9 Add indirect agenda follow mode
* lisp/org-agenda.el (org-agenda-follow-indirect): New option.
(org-agenda-follow-mode): Call `org-agenda-do-context-action' fro
follow mode.
(org-agenda-do-context-action): Also do indirect follow mode action.

By setting `org-agenda-follow-indirect' to a non-nil value,
`org-agenda-follow-mode' will use an indirect buffer to display only
the current item, rather than the whole agenda file in which it lives
2011-10-08 09:01:50 +02:00
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
Jambunathan K fec067a405 org-odt.el: Add bottom margin to source or example blocks
* contrib/odt/styles/OrgOdtStyles.xml
(OrgFixedWidthBlockLastLine, OrgSrcBlockLastLine): New styles
to be applied to the last line of the source or example
blocks.

* contrib/lisp/org-odt.el
(org-odt-format-source-code-or-example-plain)
(org-odt-format-source-code-or-example-colored): Use above
styles.
2011-10-07 19:02:04 +05:30
Jambunathan K 13b4f6b2e0 org-odt.el: Remove dependency on a pending patch
Revert this commmit once the patch referenced below is accepted.
https://lists.gnu.org/archive/html/emacs-orgmode/2011-10/msg00097.html
2011-10-07 16:30:16 +05:30
Jambunathan K 8aedd359bb org-odt.el: Add support for native numbering of src and example lines
* contrib/lisp/org-lparse.el (org-lparse-format-org-link):
Push the responsibility of calling
`org-export-get-coderef-format' to the backends.

* contrib/lisp/org-xhtml.el (org-xhtml-format-org-link): Take
up the above responsibility.

* contrib/lisp/org-odt.el (org-odt-format-link): Handle links whose
descriptions are actually line-numbers.
(org-odt-format-source-line-with-line-number-and-label): New.
Generate line numbers and link targets for lines that are part of
source or example blocks.
(org-odt-format-source-code-or-example-plain)
(org-odt-format-source-code-or-example-colored): Use
`org-odt-format-source-line-with-line-number-and-label'.
(org-odt-format-source-code-or-example): Pre-process input lines with
`org-export-number-lines'.  Also handle numbering of src lines.
(org-odt-format-org-link): Rework handling of coderef links.  Generate
ODF-specific markup for line-number based coderef links.
(org-xml-encode-plain-text-lines): Removed.  Not used any more.

contrib/odt/styles/OrgOdtStyles.xml (OrgSrcBlockNumberedLine): New
style for automatic numbering of src and example lines.
2011-10-07 16:17:07 +05:30
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
David Maus 384c502385 contrib/lisp/org-elisp-symbol: Set type if symbol is defuned but not fbound
Another small patch for org-elisp-symbol: Set the symbol type to
"Function or command" if it is defuned but not fbound when
`org-elisp-symbol-store-link' is called.

Best,
  -- David
2011-10-06 10:14:19 +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 c18896841e Allow dashes and underscores in bibtex citation keys
* contrib/lisp/org-exp-bibtex.el (org-export-bibtex-preprocess): Allow
dashes and underscores in bibtex citation keys.

TINYCHANGE

Patch by Nik Putnam
2011-10-06 10:10:47 +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