21 months agotest-org.el: Fix test release_8.2.6
Bastien Guerry [Tue, 22 Apr 2014 10:08:15 +0000]
test-org.el: Fix test

* test-org.el (test-org/insert-todo-heading-respect-content):
Fix test.

21 months agoorg.el (org-insert-heading): Fix behavior
Bastien Guerry [Tue, 22 Apr 2014 09:18:12 +0000]
org.el (org-insert-heading): Fix behavior

* org.el (org-insert-heading): Fix behavior when point is at
the beginning of a heading or a list item.  Enhance docstring.

Thanks to York Zhao for reporting this.

21 months agoox-html.el (org-html-infojs-install-script): Don't install infojs scripts when #...
Bastien Guerry [Tue, 22 Apr 2014 08:41:56 +0000]
ox-html.el (org-html-infojs-install-script): Don't install infojs scripts when #+INFOJS_OPT: is empty

* ox-html.el (org-html-infojs-install-script): Don't install
infojs scripts when #+INFOJS_OPT: is empty.

Thanks to Diez B. Roggisch for reporting this.

21 months agoorg.el (org-mode): Use `org-*-element' functions again
Bastien Guerry [Tue, 22 Apr 2014 06:03:44 +0000]
org.el (org-mode): Use `org-*-element' functions again

* org.el (org-mode): Use `org-*-element' functions for C-M-a
and C-M-e but fix C-M-e.

21 months agoRevert "org.el (org-mode): Use `org-back-to-heading' and `org-end-of-subtree' for...
Bastien Guerry [Tue, 22 Apr 2014 06:02:05 +0000]
Revert "org.el (org-mode): Use `org-back-to-heading' and `org-end-of-subtree' for C-M-a and C-M-e"

This reverts commit 47e456d8a6e1c818b820a31f447496b89ed45445.

21 months agoorg-agenda.el (org-agenda-search-view): Fix tag
Bastien Guerry [Mon, 21 Apr 2014 19:56:28 +0000]
org-agenda.el (org-agenda-search-view): Fix tag

* org-agenda.el (org-agenda-search-view): Fix tag.

Thanks to Brady Trainor for reporting this.

21 months agoorg.el (org-mode): Use `org-back-to-heading' and `org-end-of-subtree' for C-M-a and...
Bastien Guerry [Mon, 21 Apr 2014 17:25:27 +0000]
org.el (org-mode): Use `org-back-to-heading' and `org-end-of-subtree' for C-M-a and C-M-e

* org.el (org-mode): Use `org-back-to-heading' and
`org-end-of-subtree' for C-M-a and C-M-e.

This partially reverts commit 76fa97922.

Thanks to Leo Liu for reporting this.

21 months agoSmall documentation improvements
Nicolas Goaziou [Mon, 21 Apr 2014 07:48:17 +0000]
Small documentation improvements

* doc/org.texi (The Export Dispatcher): Reformulation.
* lisp/ox.el (org-export-copy-to-kill-ring): Comply to docstrings

21 months agoTiny fix
Nicolas Goaziou [Mon, 21 Apr 2014 07:24:58 +0000]
Tiny fix

* lisp/org.el (org-sparse-tree): Tiny fix.

21 months agoFix code typo
Nicolas Goaziou [Mon, 21 Apr 2014 07:19:37 +0000]
Fix code typo

* lisp/org.el (org-sparse-tree): Fix code typo.  Small refactoring.

Thanks to Brady Trainor for spotting it.

21 months agoorg-bibtex: Tiny code clean-up
Nicolas Goaziou [Sun, 20 Apr 2014 08:14:03 +0000]
org-bibtex: Tiny code clean-up

* lisp/org-bibtex.el (org-bibtex-headline): Tiny code clean-up.

21 months agoorg.el (org-check-before-invisible-edit): Show the subtree
Bastien Guerry [Sun, 20 Apr 2014 07:31:28 +0000]
org.el (org-check-before-invisible-edit): Show the subtree

* org.el (org-check-before-invisible-edit): Don't just cycle,
show the subtree, as cycling may leave the current heading

Thanks to Paul Stansell for reporting this.

21 months agoorg.el (org-contextualize-validate-key): Fix wrong test
Bastien Guerry [Sun, 20 Apr 2014 06:44:07 +0000]
org.el (org-contextualize-validate-key): Fix wrong test

* org.el (org-contextualize-validate-key): Fix wrong test.

Thanks to Eric Abrahamsen for reporting the problem and the fix:

21 months agoorg-bibtex.el (org-bibtex-headline): Fix insertion of keywords
Leonard Randall [Sun, 20 Apr 2014 06:30:01 +0000]
org-bibtex.el (org-bibtex-headline): Fix insertion of keywords

* org-bibtex.el (org-bibtex-headline): Fix insertion of
keywords of unknown BibTeX entries.


21 months agoRevert "org.el (org-refile): Allow org-refile goto from everywhere"
Bastien Guerry [Sun, 20 Apr 2014 06:00:19 +0000]
Revert "org.el (org-refile): Allow org-refile goto from everywhere"

This reverts commit faa1703b8f9c2bc2d1b9317c29fde75b764f41fc.

21 months agoorg-bibtex.el (org-bibtex-headline): Don't throw an error
Bastien Guerry [Sat, 19 Apr 2014 14:40:11 +0000]
org-bibtex.el (org-bibtex-headline): Don't throw an error

* org-bibtex.el (org-bibtex-headline): Don't throw an error
when trying to add a keyword field to a BibTeX entry that is
not known by BibTeX or defined by the user.

Thanks to Leonard Randall for reporting this and suggesting a fix.

21 months agoorg-bibtex.el (org-bibtex): Fix docstring
Bastien Guerry [Sat, 19 Apr 2014 14:22:15 +0000]
org-bibtex.el (org-bibtex): Fix docstring

* org-bibtex.el (org-bibtex): Fix docstring.

Thanks to Leonard Randall for reporting this.

21 months agoFix `org-clock-put-overlay' again.
Bastien Guerry [Fri, 18 Apr 2014 19:30:12 +0000]
Fix `org-clock-put-overlay' again.

21 months agoFix `org-clock-put-overlay'
Bastien Guerry [Fri, 18 Apr 2014 14:35:27 +0000]
Fix `org-clock-put-overlay'

21 months agoorg-bibtex.el (org-bibtex-no-export-tags): Fix docstring
Bastien Guerry [Fri, 18 Apr 2014 11:12:34 +0000]
org-bibtex.el (org-bibtex-no-export-tags): Fix docstring

* org-bibtex.el (org-bibtex-no-export-tags): Fix docstring.

Thanks to Leonard Randall for the fix.

21 months agoox-latex.el (org-latex-src-block): Fix wrong propagation of labels and captions
Bastien Guerry [Thu, 17 Apr 2014 15:09:11 +0000]
ox-latex.el (org-latex-src-block): Fix wrong propagation of labels and captions

* ox-latex.el (org-latex-src-block): Fix wrong propagation of
labels and captions when using the listings environment.

Thanks to Dominik Ernst for reporting this:

21 months agoorg.texi (Installation): Fix documentation bug
Bastien Guerry [Thu, 17 Apr 2014 11:38:29 +0000]
org.texi (Installation): Fix documentation bug

* org.texi (Installation): Be more clear on why installing Org
through ELPA should be done without loading any Org file.

This is a very common pitfall that needs to be considered a
documentation bug.

21 months agoorg.el (org-sort-entries): Fix the number of blank lines to keep for the last entry...
Bastien Guerry [Thu, 17 Apr 2014 10:51:49 +0000]
org.el (org-sort-entries): Fix the number of blank lines to keep for the last entry to sort

* org.el (org-sort-entries): Fix the number of blank lines to
keep for the last entry to sort.

Thanks to Kyle Meyer for raising this issue.

21 months agoMerge branch 'maint' of into maint
Bastien Guerry [Thu, 17 Apr 2014 09:39:02 +0000]
Merge branch 'maint' of into maint

21 months agoorg-clock.el (org-clock-put-overlay): Fix display when `org-indent-mode' is on
Bastien Guerry [Thu, 17 Apr 2014 09:38:53 +0000]
org-clock.el (org-clock-put-overlay): Fix display when `org-indent-mode' is on

* org-clock.el (org-clock-put-overlay): Fix display when
`org-indent-mode' is on.

Thanks to Christoph Groth for reporting this.

21 months agoUpdate export back-ends wrt "file" link changes
Nicolas Goaziou [Thu, 17 Apr 2014 07:15:09 +0000]
Update export back-ends wrt "file" link changes

* lisp/ox-latex.el (org-latex-link):
* lisp/ox-html.el (org-html-link):  Do not expand absolute file names
  and do not try to fix hierarchy part, as it is already taken care of
  at the parser level.

* lisp/ox-md.el (org-md-link): Ditto.  Also fix absolute file names.

* lisp/ox-odt.el (org-odt-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-texinfo.el (org-texinfo-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto.  Do not prepend
  scheme part to relative file names either.

* contrib/lisp/ox-deck.el (org-deck-link): Small refactoring.

21 months agoorg-element: Fix ill-defined "file" type links
Nicolas Goaziou [Thu, 17 Apr 2014 06:44:37 +0000]
org-element: Fix ill-defined "file" type links

* lisp/org-element.el (org-element-link-parser): Fix ill-defined
  "file" type links.  Expand absolute file names in the process.

Org accepts invalid URI syntax for absolute "file" links, e.g.,
file:/home/user/file.txt.  This patch normalizes them.

21 months agoSmall refactoring
Nicolas Goaziou [Thu, 17 Apr 2014 06:42:14 +0000]
Small refactoring

* lisp/org.el (org-make-link-regexps): Use `regexp-opt' instead of
  `mapconcat' and `regexp-quote'.

21 months agoRevert "Make Org links compatible with URI syntax"
Nicolas Goaziou [Thu, 17 Apr 2014 06:41:14 +0000]
Revert "Make Org links compatible with URI syntax"

This reverts commit 3589f64e42dfbc894e789c2a9fba530eac36c665.

21 months agoRevert "Fix link export"
Nicolas Goaziou [Wed, 16 Apr 2014 20:46:53 +0000]
Revert "Fix link export"

This reverts commit fc1f7d752fcd526909f0bb619cb9b3568c87665f.

21 months agoRevert "Fix mailto links"
Nicolas Goaziou [Wed, 16 Apr 2014 20:46:30 +0000]
Revert "Fix mailto links"

This reverts commit f61cd6b7a17507dbcbd96a105d6c2e59a5b087b4.

21 months agoRevert "org.el (org-sort-entries): Allow to sort by clocking time"
Bastien Guerry [Thu, 17 Apr 2014 08:32:23 +0000]
Revert "org.el (org-sort-entries): Allow to sort by clocking time"

This reverts commit 1cca8f534fdfcb34d2bce53a179604f6f8f491f2.

21 months agoorg.el (org-sort-entries): Allow to sort by clocking time
Bastien Guerry [Thu, 17 Apr 2014 08:30:44 +0000]
org.el (org-sort-entries): Allow to sort by clocking time

* org.el (org-sort-entries): Allow to sort by clocking time.

Thanks to Noah Slater for this idea.

21 months agoFix previous commit
Bastien Guerry [Thu, 17 Apr 2014 08:18:32 +0000]
Fix previous commit

21 months agoorg-agenda.el (org-agenda-finalize): Apply all filters correctly
Bastien Guerry [Thu, 17 Apr 2014 07:55:57 +0000]
org-agenda.el (org-agenda-finalize): Apply all filters correctly

* org-agenda.el (org-agenda-finalize): Apply all filters

21 months agoorg.el (org-update-dblock): Use `save-excursion'
Bastien Guerry [Thu, 17 Apr 2014 07:18:08 +0000]
org.el (org-update-dblock): Use `save-excursion'

* org.el (org-update-dblock): Use `save-excursion' instead of
`save-window-excursion' so that blocks can edit other windows and
change the window layout.

Thanks to Martin for reporting this.

21 months agoorg-agenda.el: Fix bug when displaying the changed date
Bastien Guerry [Thu, 17 Apr 2014 00:31:23 +0000]
org-agenda.el: Fix bug when displaying the changed date

* org-agenda.el (org-agenda-mode): Disable `indent-tabs-mode'.
(org-agenda-dim-blocked-tasks): Make overlays intangible.
(org-agenda-show-new-time): Fix bug when deleting a timestamp
right after changing it.
(org-agenda-get-sexps, org-agenda-filter-by-regexp)
(org-agenda-filter-top-headline-apply): Fix indentation.

Thanks to Fletcher Charest and Nick Dokos for reporting issues
in this area.

There is one bug left: in a filtered agenda, changing a timestamp
will not always correctly display the warning.  This happens when
the headline at point is followed by hidden headlines, because
`org-agenda-show-new-time' tries to set a text property at a
point where there is an overlay that hides then text.  Because
the overlay is now intangible, the warning text will be displayed
too far on the right, and may be outside of the window.

21 months agoRevert "org-agenda.el: Fix bug when using `org-agenda-do-date-later' in filtered...
Bastien Guerry [Wed, 16 Apr 2014 22:35:14 +0000]
Revert "org-agenda.el: Fix bug when using `org-agenda-do-date-later' in filtered agendas"

This reverts commit 3559ff84b244dae2109131507804b21126e0b07c.

21 months agoorg.el (org-cycle): Try `org-try-cdlatex-tab' before trying to edit/move as in a...
Bastien Guerry [Wed, 16 Apr 2014 15:25:08 +0000]
org.el (org-cycle): Try `org-try-cdlatex-tab' before trying to edit/move as in a table

* org.el (org-cycle): Try `org-try-cdlatex-tab' before trying
to edit/move as in a table.

Thanks to Konstantin Kliakhandler for reporting this.

21 months agoFix mailto links
Nicolas Goaziou [Mon, 14 Apr 2014 11:47:57 +0000]
Fix mailto links

* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* contrib/lisp/ox-groff.el (org-groff-link): "mailto" URI do not have
  an authority part, we do not append "//".

21 months agoFix link export
Nicolas Goaziou [Mon, 14 Apr 2014 10:32:25 +0000]
Fix link export

* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Append "//" after some link

* lisp/ox-md.el (org-md-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto.  Also remove some
  unused code, as search options are already stripped out link's path.

Since 3589f64e42dfbc894e789c2a9fba530eac36c665, Org ignores "//" in
a link type so it has to be re-introduced upon exporting.

21 months agoorg.el (org-refile): Allow org-refile goto from everywhere
Markus Hauck [Mon, 7 Apr 2014 17:21:43 +0000]
org.el (org-refile): Allow org-refile goto from everywhere

* lisp/org-agenda.el (org-refile): Flip logic to allow instead of
  prohibit the use of `org-refile' with the goto flat from non
  org-mode buffers.

In commit 49da67d the condition was changed from only
`(unless goto ...)` to `(unless (and goto (listp arg)) ...)`
where the `and` condition is only true for non-empty lists, so that
calling `(org-refile t)` complains about not being inside an org-mode

With this patch org-refile can be used (again) from anywhere when
passed the goto flag to jump to the chosen task.


21 months agoorg.el (org-refresh-properties): Don't throw an error when reaching the end of the...
Sacha Chua [Fri, 11 Apr 2014 09:28:45 +0000]
org.el (org-refresh-properties): Don't throw an error when reaching the end of the buffer

* org.el (org-refresh-properties): Don't throw an error when
reaching the end of the buffer.

21 months agoMake Org links compatible with URI syntax
Nicolas Goaziou [Fri, 28 Mar 2014 18:24:38 +0000]
Make Org links compatible with URI syntax

* lisp/org.el (org-make-link-regexps): Allow optional double slashes
  after type.  Small refactoring.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
  Update test.

This patch allows to write both [[file:/]] and [[file:///]].
See bug#16751.

21 months agoorg-test: Small code clean-up
Nicolas Goaziou [Thu, 10 Apr 2014 09:53:27 +0000]
org-test: Small code clean-up

* testing/org-test.el (org-test-with-temp-text): Clean-up code.

21 months agoorg-test: Fix <point> feature
York Zhao [Wed, 9 Apr 2014 17:39:16 +0000]
org-test: Fix <point> feature

* testing/org-test.el (org-test-with-temp-text): Fix point position.

According to the docstring, if the string "<point>" appears in TEXT
then the string "<point>" is removed and point is placed there. The
problem was that after string "<point>" was removed, the point
was *not* placed at the position of the removed text, rather, it was
placed one character before that position which is wrong. The reason
is that Emacs buffer position is a number started from 1, instead of
0, in other words, the value of `(point-min)' is 1 not 0. The problem
is addressed by adding 1 to the calculated position.


21 months agoorg-element: Tiny refactoring
Nicolas Goaziou [Wed, 9 Apr 2014 21:49:04 +0000]
org-element: Tiny refactoring

* lisp/org-element.el (org-element-headline-parser): Tiny refactoring.

21 months agoorg-element: Tiny fix to headline parsing
Nicolas Goaziou [Wed, 9 Apr 2014 21:26:05 +0000]
org-element: Tiny fix to headline parsing

* lisp/org-element.el (org-element-headline-parser): Correctly parse
  blank lines after a headline.

Thanks to Thorsten Jolitz for reporting it.

21 months agoorg-element: Fix table parsing with missing final bar
Nicolas Goaziou [Tue, 8 Apr 2014 16:46:41 +0000]
org-element: Fix table parsing with missing final bar

* lisp/org-element.el (org-element-table-cell-parser,
  org-element-table-cell-successor): Recognize cell even when last
  vertical bar is missing.

* testing/lisp/test-org-element.el (test-org-element/table-cell-parser):
  Add test.

Thanks to Thorsten Jolitz for reporting it.

22 months agoox-latex.el: Downcase language name in minted blocks
Michael Weylandt [Sun, 6 Apr 2014 17:26:19 +0000]
ox-latex.el: Downcase language name in minted blocks

* lisp/ox-latex.el (org-latex-export-to-latex): Downcase the language
name when using minted highlighting for src block exports.

Minted, by convention, uses all lowercase names for languages.  This
will handle mappings like "R" to "r" or "Python" to "python"
automatically.  More complex renamings still need to be handled by
customizing `org-latex-minted-langs'.

Note that the `downcase' is only applied when using the "automatic"
name.  Names in `org-latex-minted-langs' still need to be lower-case.


22 months agoox-md: Fix handling of switches in source blocks
Nicolas Goaziou [Sun, 6 Apr 2014 12:06:08 +0000]
ox-md: Fix handling of switches in source blocks

* lisp/ox-md.el (org-md-example-block): handle switches and references
  in source blocks.

22 months agoUpdate docstrings
Nicolas Goaziou [Sat, 5 Apr 2014 07:50:20 +0000]
Update docstrings

* lisp/org.el (org-latex-packages-alist,
  org-latex-default-packages-alist): Update docstrings.

22 months agoox-ascii: Ignore line breaks when removing duplicates links
Nicolas Goaziou [Thu, 3 Apr 2014 20:48:25 +0000]
ox-ascii: Ignore line breaks when removing duplicates links

* lisp/ox-ascii.el (org-ascii--unique-links): Ignore white spaces when
  uniquifying links in section.

Thanks to Mathias Bauer for reporting it.

22 months agoox-odt: Ignore blank titles
Nicolas Goaziou [Fri, 28 Mar 2014 09:08:56 +0000]
ox-odt: Ignore blank titles

* lisp/ox-odt.el (org-odt-template): Ignore blank titles.

22 months agoox-publish: Fix (invalid-read-syntax "#") error
Nicolas Goaziou [Sat, 29 Mar 2014 13:30:07 +0000]
ox-publish: Fix (invalid-read-syntax "#") error

* lisp/ox-publish.el (org-publish-find-title):
  Fix (invalid-read-syntax "#").

Since 8e1386cead0e4296f7bb063d07d64dd95ec0b231,
`org-element-interpret-data' no longer trims text properties attached
to strings.  We need to remove them before writing the title into the
cache, as text properties are not readable.

22 months agoorg-agenda.el (org-agenda-show-new-time): Don't use `move-beginning-of-line'
Bastien Guerry [Tue, 25 Mar 2014 20:46:50 +0000]
org-agenda.el (org-agenda-show-new-time): Don't use `move-beginning-of-line'

* org-agenda.el (org-agenda-show-new-time): Don't use
`move-beginning-of-line' as it is slower and not needed.

Thanks to Matt Lundin for reporting this.

22 months agoorg-test: fix macro definitions so that eager macro expansion doesn't fail
Achim Gratz [Sun, 17 Nov 2013 20:31:03 +0000]
org-test: fix macro definitions so that eager macro expansion doesn't fail

* testing/org-test.el (org-test-with-temp-text,
  org-test-with-temp-text-in-file): Correct quoting of macro

Macro arguments must not be used during macro expansion since they are
not available at that time; conversely, bindings established during
macro expansion generally can not be used at macro execution
time (unless un-quoted during expansion).

22 months agoob-gnuplot: create a proper table even when handed just a vector
Achim Gratz [Tue, 25 Mar 2014 17:55:13 +0000]
ob-gnuplot: create a proper table even when handed just a vector

* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars):
  `org-babel-gnuplot-table-to-data´ expects a table, so we need to
  construct one when Babel hands us a vector.

Thanks to Eric Fraga for reporting the bug.

22 months agoorg-compat.el (org-move-to-column): Fix bug
Bastien Guerry [Tue, 25 Mar 2014 11:04:09 +0000]
org-compat.el (org-move-to-column): Fix bug

* org-compat.el (org-move-to-column): Temporarily set
`buffer-invisibility-spec' more accurately.

Thanks to Samuel Wales for reporting this.

22 months agoexport back-ends: Update radio target export
Nicolas Goaziou [Sun, 23 Mar 2014 17:04:22 +0000]
export back-ends: Update radio target export

* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link): Update radio target export according
  to recent changes.

See bug report at

22 months agoFix radio target parsing
Nicolas Goaziou [Sun, 23 Mar 2014 10:28:26 +0000]
Fix radio target parsing

* lisp/org-element.el (org-element-all-successors,
  org-element-object-restrictions): Prioritize `link' over other
  successors in order to find radio links starting with another syntax
  object (e.g., an entity).  Also allow text markup within radio
(org-element-link-parser): Add contents to radio targets.

* lisp/org.el (org-make-target-link-regexp): Fix regexp so it can
  match targets starting with an Org object (e.g., an entity).
(org-ctrl-c-ctrl-c): Fix function when applied on an object contained
within a radio target.

* testing/lisp/test-org-element.el (test-org-element/radio-target-parser): Add test.
* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add test.

22 months agoChange "\" and "~" syntax to symbol
Nicolas Goaziou [Sun, 23 Mar 2014 10:23:08 +0000]
Change "\" and "~" syntax to symbol

* lisp/org.el (org-mode): Change "\" and "~" characters syntax from
  `punctuation' to `symbol' so they are on par with other characters used
  in Org syntax (e.g., "/", "*"...).

This change is needed to correctly find radio links starting with an

  <<<\alpha-test>>> \alpha-test

22 months agoFix LaTeX and Beamer publishing process
Nicolas Goaziou [Mon, 24 Mar 2014 12:55:46 +0000]
Fix LaTeX and Beamer publishing process

* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Ensure ".tex" file is
  generated in the same directory as the ".org" file.

Thanks to Rafael for reporting it.  See

22 months agoFix 3a233aa
Bastien Guerry [Mon, 24 Mar 2014 05:29:14 +0000]
Fix 3a233aa

22 months agoorg-rss-headline: Replace bracket links by their descriptions
Bastien Guerry [Mon, 24 Mar 2014 05:27:31 +0000]
org-rss-headline: Replace bracket links by their descriptions

* contrib/lisp/ox-rss.el (org-rss-headline): Replace bracket
links by their descriptions.

Thanks to steckerhalter for reporting this.

22 months agoox-latex: Fix underline in sections
Nicolas Goaziou [Sat, 22 Mar 2014 13:23:23 +0000]
ox-latex: Fix underline in sections

* lisp/ox-latex.el (org-latex-headline): Hard-code "\underline" in
  sections because "\uline" ("ulem" package) returns an error and
  "\ul" ("soul" package) doesn't support chinese characters.

See for the
related thread.

22 months agoRevert "LaTeX: Use \ul (from the "soul" package) instead of \uline"
Nicolas Goaziou [Sat, 22 Mar 2014 14:15:25 +0000]
Revert "LaTeX: Use \ul (from the "soul" package) instead of \uline"

This reverts commit b399ff0cba2382bf52d5bb6ef2b4a776fe0ac902.

22 months agoFix org-src-edit interaction with undo.
Aaron Ecay [Wed, 28 Aug 2013 15:50:53 +0000]
Fix org-src-edit interaction with undo.

* org-src.el (org-edit-src-exit): Place an undo boundary before
writing changes back to parent buffer.

The previous code attempted to preserve the undo information in the
indirect buffer editing the source code, but this interacts poorly
with the undo system, and can lead to undo operations scrambling the
buffer.  The new approach means that edits made in the indirect buffer
cannot be undone piece-by-piece (instead, all changes made in the
indirect buffer constitute one “change” from the point of view of
undo), but the misbehavior of undo is (hopefully) now avoided.

22 months agoLaTeX: Use \ul (from the "soul" package) instead of \uline
Bastien Guerry [Fri, 21 Mar 2014 23:27:34 +0000]
LaTeX: Use \ul (from the "soul" package) instead of \uline

* ox-latex.el (org-latex-text-markup-alist): Use \ul{...} for
underlining instead of \uline{...} as requiring the hyperref
package makes \uline{...} unusable on headline.

* org.el (org-latex-default-packages-alist): Add the "soul"

Thanks to Konstantin Kliakhandler for reporting this.

22 months agoorg.el (org-refresh-properties): Bugfix
Bastien Guerry [Fri, 21 Mar 2014 11:51:04 +0000]
org.el (org-refresh-properties): Bugfix

* org.el (org-refresh-properties): Don't add the property to
the whole subtree, only to the part between the beginning of
the headline and the end of the "content", before any other
headline.  This fix a bug about properties displayed as
inherited in the agenda, where Org properties are checked
against text properties.

Thanks to Sébastien Vauban for reporting this.

22 months agoox-latex.el (org-latex--text-markup): Replace newlines by whitespaces in \verb constructs
Bastien Guerry [Fri, 21 Mar 2014 08:56:18 +0000]
ox-latex.el (org-latex--text-markup): Replace newlines by whitespaces in \verb constructs

* ox-latex.el (org-latex--text-markup): Replace newlines by
whitespaces in \verb constructs.

Thanks to Alan Schmitt for reporting this.

22 months agoRevert "ox-ascii: Fix radio link"
Nicolas Goaziou [Thu, 20 Mar 2014 17:21:29 +0000]
Revert "ox-ascii: Fix radio link"

This reverts commit b4ffae0d096d155e76b37012fc0268f7ebe7aa70.

22 months agoRevert "org-element: Fix radio-target and radio link parsing"
Nicolas Goaziou [Thu, 20 Mar 2014 17:21:04 +0000]
Revert "org-element: Fix radio-target and radio link parsing"

This reverts commit 5174495ee6f8758109e6c009f8a351e79481d5b8.


22 months agoorg-agenda.el: Fix bug when using `org-agenda-do-date-later' in filtered agendas
Bastien Guerry [Thu, 20 Mar 2014 16:07:03 +0000]
org-agenda.el: Fix bug when using `org-agenda-do-date-later' in filtered agendas

* org-agenda.el (org-agenda-filter-hide-line): Hide from the
beginning of the line to the beginning of the next line.
(org-agenda-show-new-time): Use `move-beginning-of-line' and
(org-agenda-drag-line-forward): Adapt to the new definition of
hidden filtered lines.

Thanks to Igor Sosa Mayor for reporting this bug and to Nick Dokos
and Matt Lundin for providing further information.

22 months agoFix bugs wrt invisibility handline.
Bastien Guerry [Thu, 20 Mar 2014 14:04:49 +0000]
Fix bugs wrt invisibility handline.

* org-compat.el (org-move-to-column): Always ignore invisible
text in agenda buffer, and when there is both a bracket link
and '(org-link) as a member of `buffer-invisibility-spec'.
Add a docstring.

* org.el (org-align-tags-here): Add docstring and remove
useless arguments when calling `org-move-to-column'.

* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row):
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-todo)
(org-agenda-priority, org-agenda-show-new-time)
(org-agenda-clock-in, org-agenda-clock-out): Remove useless
arguments when calling `org-move-to-column'.

This fixes the issue about S-RET not placing the cursor in the right
table field when M-x org-toggle-link-display RET removed '(org-link)
from `buffer-invisibility-spec' and some other discrepancies (like
S-M-<up> not restoring point correctly when there is a bracket link
before point, or M-x org-clock-display RET not aligning overlays
correctly, etc.

Thanks to Matt Lundin and Michael Brand for tracking issues
about this.

22 months agoFix 3a233aa
Bastien Guerry [Thu, 20 Mar 2014 08:44:56 +0000]
Fix 3a233aa

Thanks to Alexey Lebedeff for providing the fix.

22 months agoorg.el (org-refile): Fix C-u 3 C-c C-w
Bastien Guerry [Wed, 19 Mar 2014 15:13:33 +0000]
org.el (org-refile): Fix C-u 3 C-c C-w

* org.el (org-refile): Fix calling with a numeric prefix
argument of 3 to refile and keep.

22 months agoorg-clock.el (org-clock-get-table-data): Bugfix
Bastien Guerry [Wed, 19 Mar 2014 09:48:44 +0000]
org-clock.el (org-clock-get-table-data): Bugfix

* org-clock.el (org-clock-get-table-data): When :link is `t'
in the clocktable parameters, bracket links in the clocktable
should only contain their description, other C-c C-o will try
to open the bracket link at point instead of the headline.

Thanks to Alexey Lebedeff for providing a preliminary patch for this.

22 months agoorg.el: Only set org-hide foreground if one is available
Nikolai Weibull [Mon, 17 Mar 2014 21:50:37 +0000]
org.el: Only set org-hide foreground if one is available

* org.el (org-mode): Add guard around set-face-foreground.


22 months agoorg-agenda.el (org-agenda-todo): Restore the window correctly
Bastien Guerry [Tue, 18 Mar 2014 19:54:02 +0000]
org-agenda.el (org-agenda-todo): Restore the window correctly

* org-agenda.el (org-agenda-todo): Always restore the window
state after `org-agenda-change-all-lines' has been called.

`org-agenda-change-all-lines' is narrowing to the line it needs to
update.  In the narrowed state, `org-agenda-finalize' is called,
which may lead to a change in the way the window is displayed.  We
use `save-window-excursion' to ensure the window state is restored

Thanks to Francesco Pizzolante for reporting this with a
detailed recipe.

22 months agoorg-agenda.el (org-agenda-open-link): Bugfix
Bastien Guerry [Tue, 18 Mar 2014 16:23:45 +0000]
org-agenda.el (org-agenda-open-link): Bugfix

* org-agenda.el (org-agenda-open-link): Don't throw an error
when trying to open a link when the point is on a place that
is not associated with a buffer.

22 months agoox-latex.el (org-latex-link): Escape `%' characters
Bastien Guerry [Tue, 18 Mar 2014 15:41:24 +0000]
ox-latex.el (org-latex-link): Escape `%' characters

* ox-latex.el (org-latex-link): Escape `%' characters.

22 months agoorg-timer.el: Silent compiler warnings
Bastien Guerry [Mon, 17 Mar 2014 19:34:52 +0000]
org-timer.el: Silent compiler warnings

22 months agoorg.el (org-entry-get-with-inheritance): Remove wrong quote
Bastien Guerry [Tue, 18 Mar 2014 15:25:12 +0000]
org.el (org-entry-get-with-inheritance): Remove wrong quote

* org.el (org-entry-get-with-inheritance): Remove wrong quote.

22 months agoorg.el (org-entry-get): Fix inheritance problem
Bastien Guerry [Tue, 18 Mar 2014 13:47:09 +0000]
org.el (org-entry-get): Fix inheritance problem

* org.el (org-entry-get): Only try to combine file properties
with local properties when the property drawer contains such
local property, not when the property drawer exists.

Before the fix, `org-entry-get' behavior was inconsistent,
returning `nil' when looking for a property in a subtree with
no property drawer, and returning the global properties in a
subtree with a property drawer, independantly of whether this
property drawer contained a reference to the property we are checking
against or not.

As a side-effect, inheritance was broken for the case that
Ilya reported in commit 475f2f53, because `org-entry-get' returned
a value (with the global properties of the file) too early.

Thanks to Ilya for raising this bug and to Achim for pointing
out that the previous fix was wrong.

22 months agoRevert "Properties: Fix property-getting with inheritance"
Bastien Guerry [Mon, 17 Mar 2014 20:22:04 +0000]
Revert "Properties: Fix property-getting with inheritance"

This reverts commit 475f2f5388074c5153b3f35e41696419faa52b54.

22 months agoorg-element: Fix docstring and code typos
Nicolas Goaziou [Mon, 17 Mar 2014 09:31:37 +0000]
org-element: Fix docstring and code typos

22 months agoox-ascii: Fix radio link
Nicolas Goaziou [Mon, 17 Mar 2014 09:25:57 +0000]
ox-ascii: Fix radio link

* lisp/ox-ascii.el (org-ascii-link): Correctly handle case mismatch
  between radio targets and radio links.

22 months agoorg-element: Fix radio-target and radio link parsing
Nicolas Goaziou [Mon, 17 Mar 2014 09:17:20 +0000]
org-element: Fix radio-target and radio link parsing

* lisp/org-element.el (org-element-link-parser): "radio" links have
  their path downcased to avoid introducing case mismatch with their
  relative radio target.  With this change it is also necessary to add
  contents to them, since `:path' property no longer matches real
  value of the link.
(org-element-radio-target-parser): Downcase value as explained above.
Store the initial value in a new `:raw-value' property.

22 months agoRevert "Fix links to radio targets."
Nicolas Goaziou [Mon, 17 Mar 2014 09:05:52 +0000]
Revert "Fix links to radio targets."

This reverts commit d2e7b1b5b168454aec99aed1ab3af83dd1f7f941.

22 months agoFix links to radio targets.
Bastien Guerry [Mon, 17 Mar 2014 01:58:02 +0000]
Fix links to radio targets.

* ox-latex.el (org-latex-link):
* ox-html.el (org-html-link):
* ox-beamer.el (org-beamer-link): Fix links to radio targets.

* ox-ascii.el (org-ascii-link): For links to a radio target,
use the link, not the target.

Thanks to Noah Slater for reporting this.

22 months agoorg.el (org-do-emphasis-faces): Explicitly prevent nested emphasis
Bastien Guerry [Mon, 17 Mar 2014 01:19:27 +0000]
org.el (org-do-emphasis-faces): Explicitly prevent nested emphasis

* org.el (org-do-emphasis-faces): Explicitly prevent nested

Thanks to Sébastien Vauban for reporting this.

22 months agoorg.el (org-insert-heading): Don't remove whitespaces following an empty headline
Bastien Guerry [Mon, 17 Mar 2014 00:41:42 +0000]
org.el (org-insert-heading): Don't remove whitespaces following an empty headline

* org.el (org-insert-heading): Don't remove whitespaces
following an empty headline.

Thanks to Brady Trainor for reporting this.

22 months agoRemove reference to hgroup in ox-html
Rasmus [Sat, 15 Mar 2014 23:36:21 +0000]
Remove reference to hgroup in ox-html

* ox-html.el (org-html-html5-elements): Drop reference to hgroup.

22 months agoFix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline
Markus Hauck [Tue, 11 Mar 2014 15:06:17 +0000]
Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline

* lisp/org-agenda.el (org-agenda-get-scheduled): If
  `org-agenda-skip-scheduled-if-deadline-is-shown' is set to
  'repeated-after-deadline, still show tasks without any deadline

The problem was that the check for the deadline seems to return a
default time even if no deadline is set for the task.  This adds a
check if there is a deadline at all, if there is none, the task is
shown in the agenda, otherwise the old semantics apply.


22 months agoProperties: Fix property-getting with inheritance
Ilya Shlyakhter [Fri, 7 Mar 2014 06:09:13 +0000]
Properties: Fix property-getting with inheritance

* lisp/org.el (org-entry-get-with-inheritance): Temporarily
let-bind `org-file-properties', `org-global-properties' and
`org-global-properties-fixed' to nil before calling `org-entry-get'
on entries up the hierarchy from the queried entry.

Problem was that when org-entry-get-with-inheritance went up the
hierarchy of entries from a given entry, checking whether the property
has been set in any of the entries, it was calling org-entry-get,
which always looks at file-scope and global-scope properties.  So if
our property was set file-wide or system-wide, and somewhere up the
hierarchy there was an entry which set some properties _other_ than
the one we're looking up but did not set ours, org-entry-get would
fill in the global property value and report that our property was in
fact set in that entry.  The search would stop, and if the property
was actually set further up the hierarchy (which should override
file-wide or system-wide settings), we would never get to that
up-the-hierarchy setting.

Illustration of fixed problem:

#+PROPERTY: myprop aaa
* headline A
:myprop: bbb
*** headline B
:otherprop:       ccc

    #+BEGIN_SRC emacs-lisp
    (message (org-entry-get-with-inheritance "myprop"))

    : aaa

Result should be bbb, which it is after the fix.

22 months agoorg-timer.el (org-timer-stop): Set `org-timer-current-timer' to nil
Bastien Guerry [Fri, 14 Mar 2014 10:57:15 +0000]
org-timer.el (org-timer-stop): Set `org-timer-current-timer' to nil

* org-timer.el (org-timer-stop): Set `org-timer-current-timer'
to nil.

22 months agoFix 9323857 (again^2)
Bastien Guerry [Fri, 14 Mar 2014 08:59:28 +0000]
Fix 9323857 (again^2)

Thanks to Florian Beck for providing the right fix.

22 months agoFix 9323857 (again)
Bastien Guerry [Thu, 13 Mar 2014 18:07:50 +0000]
Fix 9323857 (again)

22 months agoorg.el (org-store-link): Fix bugs
Bastien Guerry [Thu, 13 Mar 2014 15:27:51 +0000]
org.el (org-store-link): Fix bugs

* org.el (org-store-link): Ensure desc is not nil before
matching a regexp against it.