Commit Graph

9268 Commits

Author SHA1 Message Date
Bastien Guerry 01f7b698a7 More copyright year fixes. 2012-02-19 08:16:27 -07:00
David Maus ff2b00b7ac Use `with-selected-window' to select calendar window
* org.el (org-recenter-calendar): Use `with-selected-window' to select
calendar window and save currently selected window and current buffer.

Fixes a bug reported by Thomas Morgan in <mid:87obsxwpvc.fsf@ziiuu.com>.
2012-02-19 08:06:20 -07:00
Toby S. Cubitt 2d4b9c05f2 Fix bug in org-goto `outline-path-completion' interface
* lisp/org.el (org-goto): call org-refile-get-location with NO-EXCLUDE
argument set, otherwise not only are headlines in the current subtree
excluded, but it throws an error if point happens not to be within a
subtree (e.g. at start of buffer).

TINYCHANGE
2012-02-19 08:06:02 -07:00
David Maus 37e35d2bb5 Fix highlighting in sparse-tree
* org.el (org-scan-tags): Fix highlighting in sparse-tree.

`org-get-heading' uses `org-heading-regexp' introduced by
dfcb6faef1 but `org-scan-tags' assumed
match groups of the old regular expression.

This should fix a bug reported by Suvayu Ali in
<20120209032255.431e8197@kuru.dyndns-at-home.com>.
2012-02-19 08:05:57 -07:00
David Maus 79105c48e2 Moved `org-in-clocktable-p' from org-clock.el to org.el
* org-clock.el (org-in-clocktable-p): Moved to org.el.
* org.el (org-in-clocktable-p): New function. Moved from org-clock.el

Fixes a bug reported by suvayu ali in
<CAMXnza2W9VSJ2d-dDmsByNmTVgxnt1Onp=J5S=TsFEi8MOVNtg@mail.gmail.com>.

`org-context' depends on the function but org.el does not depend on
org-clock.el.
2012-02-19 08:05:53 -07:00
David Maus 4b84ca41d7 Don't format tags in title if title headline does not have tags
* org-exp.el (org-export-get-title-from-subtree): Don't format tags in
title if title headline does not have tags.

Fixes a bug reported by John Hendy in
<CA+M2ft_UnBVfUbmoUX6J2MY7e_9w+7an5n23rAarpnnQnaV=ZA@mail.gmail.com>.
2012-02-19 08:05:48 -07:00
Bastien Guerry 2bbb8b99f4 org.el: Fix bug: hide drawers in inline tasks too.
* org.el (org-cycle-internal-local): Fix bug: hide drawers in
inline tasks too.
2012-02-19 08:04:38 -07:00
Jambunathan K 2ac428a21d org-odt.el: Honor "[TABLE-OF-CONTENTS]" directive
* lisp/org-odt.el (org-odt-format-preamble): Don't insert TOC here.
Delay it till the end of export.
(org-odt-begin-document-body): Make a note of the default
position of TOC in `org-lparse-dyn-first-heading-pos'.
(org-odt-insert-toc): Insert TOC as directed by
[TABLE-OF-CONTENTS] line or at the default position.
(org-odt-end-export): Call `org-odt-insert-toc'.

Fix for the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00974.html
2012-02-19 08:04:31 -07:00
Bastien Guerry 8c16d85476 org.el: `org-preview-latex-fragment' requires a buffer file name.
* org.el (org-preview-latex-fragment): Throw an error when
called from a non-file buffer.

This take care of this bug:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3768
2012-02-19 08:04:26 -07:00
David Maus 6bd7c7d042 Don't search for position in existing list if :exact-position
* org-capture.el (org-capture-place-item): Don't search for
position in existing list if :exact-position was supplied.

This fixes a bug reported by François Pinard in
<http://thread.gmane.org/gmane.emacs.orgmode/49995>.
2012-02-19 08:04:20 -07:00
Bastien Guerry 624194dc51 org.el: Fix bug in done headline fontification.
* org.el (org-set-font-lock-defaults): Fix bug in done
headline fontification.

Thanks to Brian J. Carlson for pointing this error and
a solution.
2012-02-19 08:04:10 -07:00
Bastien Guerry 1c73d5a403 org.el: Fix bug in done headline fontification.
* org.el (org-set-font-lock-defaults): Fix bug in done
headline fontification.

Thanks to Brian J. Carlson for pointing this error and
a solution.
2012-02-19 08:03:58 -07:00
Jambunathan K 4da551b600 Honor user-specified width in captioned images
* lisp/org-odt.el (org-odt-format-textbox): Honor user-specified
width in captioned images.

Fix for bug reported here:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00641.html
2012-02-19 08:03:45 -07:00
Jambunathan K e9fd334eb4 Add support for indented tables in ODT export
* etc/styles/OrgOdtContentTemplate.xml
(OrgIndentedSection-Level-*): New section styles. These
sections are indented to the same level as the corresponding
list entries.  These sections hold tables that occur within a
list.
(OrgTable): Increased relative width from 90% to 96% for
aesthetic reasons.

* lisp/org-odt.el (org-odt-table-indentedp): New variable
(org-odt-begin-table): Modified.  If the table is within a
list, temporarily leave the list and begin an indented section
before emitting the table.
(org-odt-end-table): Modified.  If the table was within a
list, close the indented section and re-open the list
immediately after ending the table.
(org-odt-continue-list, org-odt-discontinue-list): Helper
routines to temporarily discontinue and continue a list.
(org-odt-list-stack-stashed): New variable to hold the state
of a pending list.
(org-odt-begin-list, org-odt-begin-list-item)
(org-odt-end-list-item): Modified. Handle nitty-gritties for
continuing a list and list item.
(org-odt-section-count): New variable that keeps track of
section count.  Used in conjunction with naming of sections.
(org-odt-begin-section, org-odt-end-section): New defuns.
(org-odt-init-outfile): Initialize
`org-odt-list-stack-stashed' and `org-odt-section-count'.

* lisp/org-lparse.el (org-lparse-list-item-count): Removed. Was a
superfluous variable.
(org-lparse-list-level): Removed.  Now derived from
`org-lparse-list-stack'.
(org-lparse-list-stack): New.  List that records the list
types - ordered, unordered or descriptive - in the following
order: self, parent, grand-parent etc.
(org-do-lparse): Added, removed above let-bound vars.
Disallowed regular tables within list-table block.
(org-lparse-begin-list, org-lparse-end-list)
(org-lparse-begin-list-item, org-lparse-end-list-item):
Propagate above changes.

OpenDocument doesn't permit tables to occur in the middle of a
list.  Use list continuations and indented sections to typeset
indented tables.

Fixes the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00515.html
2012-02-19 08:03:39 -07:00
Eric Schulte 65f1ae033a fix bug in property list updates
* lisp/org.el (org-update-property-plist): Fix bug in property list
  updates.
2012-02-19 08:03:13 -07:00
Eric Schulte 2b2e853b1b fixed bug in org-babel-balanced-split when run on Emacs22
Thanks to Martyn Jago for the test case

* lisp/ob.el (org-babel-balanced-split): Explicit checking if list
  before calling member.
* testing/lisp/test-ob.el (test-ob/org-babel-balanced-split): Testing
  the new Emacs22-proof behavior.
2012-02-19 08:01:26 -07:00
Eric Schulte 60176c84e5 specify "," as default sqlite output seperator
* lisp/ob-sqlite.el (org-babel-execute:sqlite): Specify the use of ","
  as the separator to `org-table-convert-region'.  Fixes errors when
  only one result per line of output.
2012-02-18 14:49:59 -07:00
Eric Schulte 19f1bf6bce unified stripping of protective commas -- idempotent org-edit-src-code
* lisp/ob.el (org-babel-strip-protective-commas): Use
  `org-strip-protective-commas'.
* lisp/org-exp.el (org-export-select-backend-specific-text): Use
  `org-strip-protective-commas'.
* lisp/org-src.el (org-edit-src-code): Use
  `org-strip-protective-commas'.
* lisp/org.el (org-strip-protective-commas): Single definition for
  this functionality.
2012-02-18 10:38:32 -07:00
Michael Brand 40b3b323f8 manual: fix references to Calc manual
* doc/org.texi: Decapitalize file name in references to Calc manual.

On a case sensitive file system the references from the HTML Org
manual (e. g. the link href="Calc.html#Embedded-Mode" or
href="../Calc/Embedded-Mode.html#Embedded-Mode") to the HTML Calc
manual (e. g. the file calc.html or calc/Embedded-Mode.html) do not
match.
2012-02-18 18:21:32 +01:00
Eric Schulte e744db1ad1 mention ob-sqlite in the comments of ob-sql
* lisp/ob-sql.el: Mention ob-sqlite in the comments of ob-sql.
2012-02-18 09:26:02 -07:00
Sebastien Vauban 2d78957c5c Fix old Babel syntax 2012-02-18 09:15:44 -07:00
Eric Schulte bf238997a9 Generalize to multiple "prop+" properties.
* lisp/org.el (org-entry-get): Generalize to multiple "prop+" properties.
2012-02-18 08:28:40 -07:00
Eric Schulte 51923ff2bc Accumulate properties from subtree property drawers.
* lisp/org.el (org-entry-get): Accumulate properties from subtree
  property drawers.
2012-02-15 08:02:06 -07:00
Nicolas Goaziou b3721c2a66 org-footnote: Fix bogus defvar declares
* lisp/org-footnote.el (org-blank-before-new-entry,
  org-export-footnotes-seen, org-export-footnotes-data): Fix bogus
  declarations.

This fixes bug #10745.  Thanks to Steve Revilak for the report and to
Glenn Morris for the solution.
2012-02-07 08:43:09 +01:00
Nicolas Goaziou dc5d61f03a Fix special C-a and C-e behaviour with visual lines
* lisp/org.el (org-beginning-of-line, org-end-of-line): Fix special
  C-a and C-e behaviour with visual lines.
2012-02-04 16:32:34 +01:00
Eric Schulte 9e2a3cfe9b updated babel key binding documentation in manual
* doc/org.texi (Key bindings and useful functions): Updated babel key
  binding documentation in manual.
2012-02-03 11:44:58 -07:00
Eric Schulte e38f80e6bf concluding cherry pick 2012-02-03 10:27:37 -07:00
Eric Schulte df13cc7375 changed the name of exporting comment blocks
* lisp/org-exp-blocks.el (org-export-blocks): Changed the name of
  exporting comment blocks given that it seems regular comment blocks
  no longer export.
2012-02-03 10:25:52 -07:00
Nicolas Goaziou d10792510f org-footnote: Better blank lines control when inserting a footnote
* lisp/org-footnote.el (org-footnote-create-definition): Fix space
  insertion when creating a new footnote. This fixes newline munching
  when `org-footnote-section' is nil and blank lines stacking when it
  isn't nil.

Thanks to Eric Abrahamsen for reporting this.
2012-02-02 21:22:17 +01:00
Nicolas Goaziou acd743bdc0 org-footnote: Fix export bug introduced by previous commit
* lisp/org-footnote.el (org-footnote-normalize): Make sure that
  footnotes are moved to a single place during export.
2012-02-02 20:39:40 +01:00
Nicolas Goaziou b032a6d51b org-footnote: Fix normalization when no footnote section is defined
* lisp/org-footnote.el (org-footnote-normalize): Ensure footnote
  definition will be inserted at the end of the section corresponding
  to to its first reference.
2012-02-02 10:01:50 +01:00
Nicolas Goaziou 6c0da676af org-footnote: Fix definition ending retrieval with no footnote section
* lisp/org-footnote.el (org-footnote-at-definition-p): Make sure to
  move point at the beginning of the separator before skiping white
  spaces.  Refactor code.
2012-02-02 09:08:28 +01:00
Bastien Guerry 04ecf18db0 Merge branch 'maint' of orgmode.org:org-mode into maint 2012-02-01 00:10:06 +01:00
Nicolas Goaziou 182970cf8e org-exp: Fix export error with code blocks within lists
* lisp/org-exp.el (org-export-select-backend-specific-text): Always
  preserve original indentation as a text property so that lists do
  not get broken by indentation at column 0.
2012-01-31 20:21:44 +01:00
Bastien Guerry 1ec188b00a Merge branch 'maint' of orgmode.org:org-mode into maint 2012-01-31 09:27:47 +01:00
Eric Schulte 900b988742 fix bug introduced by 794319dfd9 2012-01-30 18:35:49 -07:00
Eric Schulte 7b59410c30 don't allow newlines in source names in noweb references
* lisp/ob.el (org-babel-expand-noweb-references): Don't allow newlines
  in source names in noweb references.
2012-01-30 18:27:33 -07:00
Vitalie Spinu 794319dfd9 inhibit R evaluation visibility regardless of local user customization
* lisp/ob-R.el (org-babel-R-evaluate-session): Inhibit R evaluation
  visibility regardless of local user customization.
2012-01-30 09:31:40 -07:00
Eric Schulte eb02808f97 splitting large tests up into smaller units
This make it easier to track down the cause of failing tests.
2012-01-30 08:54:25 -07:00
Eric Schulte 660e30b39c inline src block tests by Martyn Jago
* testing/lisp/test-ob.el (test-org-babel/inline-src_blk-preceded-punct):
  Inline src block tests by Martyn Jago.
2012-01-30 08:51:17 -07:00
Michael Brand d9ac2ffa37 Link to Org file: regard startup view state
* lisp/org.el (org-open-link-from-string): Regard `reference-buffer'
when setting `org-inhibit-startup'.

When opening a link to another Org file not yet opened (first close it
if opened) before this patch:
1) When point is on the line with the link and the line is not a
   heading then the target file is opened with the target file startup
   view state, e. g. the default OVERVIEW.
2) When point is on the heading of the entry of which the link is part
   of then the target file is opened with "SHOW ALL". But it is
   expected to regard the target file startup view state like case 1).
Note: Only in case 2) `org-open-at-point' uses
`org-offer-links-in-entry' and from there `org-open-link-from-string'.

example current buffer with link:
#+BEGIN_SRC org
  ,* section
  ,  [[file:myfile.org::*mytarget]]
#+END_SRC

example target file myfile.org:
#+BEGIN_SRC org
  ,* mytarget
  ,  text
  ,*** subsection
#+END_SRC
2012-01-28 15:48:04 +01:00
Eric Schulte 843ac278f9 Don't insert extra space between inline src block and results on export.
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Don't insert
  extra space between inline src block and results on export.
2012-01-27 16:29:03 -07:00
Eric Schulte 3451d35fcd allow *any* punctuation to proceed an inline src block
Thanks to Martyn Jago for this change.

* lisp/ob.el (org-babel-get-inline-src-block-matches): Allow *any*
  punctuation to proceed an inline src block.
2012-01-27 16:21:49 -07:00
Eric Schulte 8c69417861 add ( to the list of characters allowed to proceed an inline src block
* lisp/ob.el (org-babel-get-inline-src-block-matches): Add ( to the
  list of characters allowed to proceed an inline src block.
2012-01-27 16:17:21 -07:00
Eric Schulte 1bb2a3c23a fixed two issues with noweb reference expansion
* lisp/ob.el (org-babel-expand-noweb-references): Only allow
  reference names which start and end with non-whitespace characters.
  Also, raise errors as appropriate given org-babel-noweb-error-langs.
2012-01-24 07:23:43 -07:00
Eric Schulte a706f42403 update tests 2012-01-24 00:02:33 -07:00
Eric Schulte 11d31e89c4 replace org-babel-noweb-separator variable with :noweb-sep header argument
* doc/org.texi (noweb-sep): Document new header argument.
* lisp/ob.el (org-babel-common-header-args-w-values): Add new header
  argument.
  (org-babel-expand-noweb-references): Use header argument rather than
  customization variable.
2012-01-23 23:57:51 -07:00
Eric Schulte 269a509615 customizable noweb reference separator
* lisp/ob.el (org-babel-noweb-separator): Custom variable for
  accumulated noweb references.
  (org-babel-expand-noweb-references): Allow separator for noweb
  references.
* doc/org.texi (noweb-ref): Documentation of this new custom variable.
2012-01-23 19:42:06 -07:00
Eric Schulte 978fd46069 don't report valid header arguments as suspicious
* lisp/ob.el (org-babel-check-src-block): Don't report valid header
  arguments as suspicious.
2012-01-23 11:07:27 -07:00
Eric Schulte 43abeaa488 evaluate all executables in buffer order on export
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Map over both
  inline src blocks and call lines on export.
2012-01-23 10:39:38 -07:00