Commit Graph

14794 Commits

Author SHA1 Message Date
Nicolas Goaziou c3e19caa1a ox-icalendar: Tiny fixes
* lisp/ox-icalendar.el (org-icalendar-include-sexps,
org-icalendar-blocked-headline-p): Fix docstrings.
(org-icalendar-clear-blank-lines): Fix docstring and regexp.
2014-04-23 21:53:58 +02:00
Nicolas Goaziou 1819b90931 ox-icalendar: Use `org-icalendar-with-timestamps'
* lisp/ox-icalendar.el (org-icalendar-entry): Use
  `org-icalendar-with-timestamps'.

We cannot simply rely on ignored timestamps in communication channels,
as regular `org-export-with-timestamps' only applies to isolated
timestamps.

Thanks to Greg Troxel for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/85387
2014-04-23 21:37:38 +02:00
Bastien Guerry e1e5c0776a org-agenda.el (org-agenda-finalize): Filter by top headline
* org-agenda.el (org-agenda-finalize): Filter by top headline
if `org-agenda-top-headline-filter' is set.

Thanks to Brady Trainor for reporting this.
2014-04-23 08:11:29 +02:00
Bastien Guerry 1fa6ccab10 Complete fix 369e3d77 2014-04-22 15:24:14 +02:00
Bastien Guerry 099b6f0fb5 test-org.el: Fix test
* test-org.el (test-org/insert-todo-heading-respect-content):
Fix test.
2014-04-22 12:08:15 +02:00
Bastien Guerry fdb4b54e92 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.
2014-04-22 11:18:12 +02:00
Bastien Guerry 6f1b5185c2 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.
2014-04-22 10:41:56 +02:00
Bastien Guerry 162f8867c9 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.
2014-04-22 08:03:44 +02:00
Bastien Guerry 9ca840a501 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 47e456d8a6.
2014-04-22 08:02:05 +02:00
Bastien Guerry 369e3d77d0 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.
2014-04-21 21:56:28 +02:00
Bastien Guerry 47e456d8a6 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.
2014-04-21 19:25:27 +02:00
Nicolas Goaziou b983048b73 Small documentation improvements
* doc/org.texi (The Export Dispatcher): Reformulation.
* lisp/ox.el (org-export-copy-to-kill-ring): Comply to docstrings
  standards.
2014-04-21 09:48:17 +02:00
Nicolas Goaziou f9c93aaa49 Tiny fix
* lisp/org.el (org-sparse-tree): Tiny fix.
2014-04-21 09:24:58 +02:00
Nicolas Goaziou 2434d3e248 Fix code typo
* lisp/org.el (org-sparse-tree): Fix code typo.  Small refactoring.

Thanks to Brady Trainor for spotting it.
http://permalink.gmane.org/gmane.emacs.orgmode/85320
2014-04-21 09:19:37 +02:00
Nicolas Goaziou c7812ff8a0 org-bibtex: Tiny code clean-up
* lisp/org-bibtex.el (org-bibtex-headline): Tiny code clean-up.
2014-04-20 10:14:03 +02:00
Bastien Guerry d9312231e9 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
folded.

Thanks to Paul Stansell for reporting this.
2014-04-20 09:31:28 +02:00
Bastien Guerry 5d0e668cc6 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:
http://article.gmane.org/gmane.emacs.orgmode/85276
2014-04-20 08:44:07 +02:00
Leonard Randall 24a1f7295c org-bibtex.el (org-bibtex-headline): Fix insertion of keywords
* org-bibtex.el (org-bibtex-headline): Fix insertion of
keywords of unknown BibTeX entries.

TINYCHANGE
2014-04-20 08:30:01 +02:00
Bastien Guerry 9272ef3e17 Revert "org.el (org-refile): Allow org-refile goto from everywhere"
This reverts commit faa1703b8f.
2014-04-20 08:00:19 +02:00
Bastien Guerry aff6a10aac 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.
2014-04-19 16:40:11 +02:00
Bastien Guerry 0afb088207 org-bibtex.el (org-bibtex): Fix docstring
* org-bibtex.el (org-bibtex): Fix docstring.

Thanks to Leonard Randall for reporting this.
2014-04-19 16:22:15 +02:00
Bastien Guerry 7c5cf02e2f Fix `org-clock-put-overlay' again. 2014-04-18 21:30:12 +02:00
Bastien Guerry bcbc97d902 Fix `org-clock-put-overlay' 2014-04-18 16:35:27 +02:00
Bastien Guerry 292660b27c 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.
2014-04-18 13:12:34 +02:00
Bastien Guerry eaaa5c2e48 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:
http://article.gmane.org/gmane.emacs.orgmode/84932
2014-04-17 17:09:11 +02:00
Bastien Guerry 4315658419 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.
2014-04-17 13:38:29 +02:00
Bastien Guerry a937366e8a 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.
2014-04-17 12:51:49 +02:00
Bastien Guerry 1781a63304 Merge branch 'maint' of orgmode.org:org-mode into maint 2014-04-17 11:39:02 +02:00
Bastien Guerry 17fb85b12c 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.
2014-04-17 11:38:53 +02:00
Nicolas Goaziou 9dac00129d 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.
2014-04-17 11:30:15 +02:00
Nicolas Goaziou b49cbf1338 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.
2014-04-17 11:30:15 +02:00
Nicolas Goaziou 018a80541a Small refactoring
* lisp/org.el (org-make-link-regexps): Use `regexp-opt' instead of
  `mapconcat' and `regexp-quote'.
2014-04-17 11:30:15 +02:00
Nicolas Goaziou 1ca819e398 Revert "Make Org links compatible with URI syntax"
This reverts commit 3589f64e42.
2014-04-17 11:30:15 +02:00
Nicolas Goaziou 73c141e43e Revert "Fix link export"
This reverts commit fc1f7d752f.
2014-04-17 11:30:14 +02:00
Nicolas Goaziou 7b3c11f797 Revert "Fix mailto links"
This reverts commit f61cd6b7a1.
2014-04-17 11:30:14 +02:00
Bastien Guerry 817619a50b Revert "org.el (org-sort-entries): Allow to sort by clocking time"
This reverts commit 1cca8f534f.
2014-04-17 10:32:23 +02:00
Bastien Guerry 1cca8f534f 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.
2014-04-17 10:30:44 +02:00
Bastien Guerry f2ec685008 Fix previous commit 2014-04-17 10:18:32 +02:00
Bastien Guerry 63e9763b2a org-agenda.el (org-agenda-finalize): Apply all filters correctly
* org-agenda.el (org-agenda-finalize): Apply all filters
correctly.
2014-04-17 09:55:57 +02:00
Bastien Guerry c3810f71b6 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.
2014-04-17 09:18:08 +02:00
Bastien Guerry eb0f8afdf4 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-check-for-timestamp-as-reason-to-ignore-todo-item)
(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.
2014-04-17 02:31:23 +02:00
Bastien Guerry 241764b2d1 Revert "org-agenda.el: Fix bug when using `org-agenda-do-date-later' in filtered agendas"
This reverts commit 3559ff84b2.
2014-04-17 00:35:14 +02:00
Bastien Guerry d1600af7b6 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.
2014-04-16 17:25:08 +02:00
Nicolas Goaziou f61cd6b7a1 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 "//".
2014-04-14 13:47:57 +02:00
Nicolas Goaziou fc1f7d752f 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
  types.

* 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 3589f64e42, Org ignores "//" in
a link type so it has to be re-introduced upon exporting.
2014-04-14 12:36:34 +02:00
Markus Hauck faa1703b8f 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
buffer.

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

TINYCHANGE
2014-04-11 11:59:43 +02:00
Sacha Chua d6a38604e6 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.
2014-04-11 11:28:45 +02:00
Nicolas Goaziou 3589f64e42 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:/file.org]] and [[file:///file.org]].
See bug#16751.
2014-04-10 22:57:05 +02:00
Nicolas Goaziou 7fe1da1f8c org-test: Small code clean-up
* testing/org-test.el (org-test-with-temp-text): Clean-up code.
2014-04-10 11:53:27 +02:00
York Zhao d01d22b74f 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.

TINYCHANGE
2014-04-10 11:52:44 +02:00