Commit Graph

17695 Commits

Author SHA1 Message Date
Kyle Meyer e712f17822 org-compat: Quiet font-lock-fontify-buffer warning
* lisp/org-compat.el (org-font-lock-ensure): Quiet byte compiler warning
  about font-lock-fontify-buffer.
2016-05-15 18:59:19 -04:00
Kyle Meyer 3b8fc502b9 org-compat: Check for w32-focus-frame
* lisp/org-compat.el (org-select-frame-set-input-focus): Check for
  w32-focus-frame to quiet byte compiler.

Don't use declare-function because this function was marked obsolete in
Emacs 23.1 (44fe0f6).
2016-05-15 18:59:19 -04:00
Kyle Meyer 0e0963acbf org-gnus: Check nnimap-group-overview-filename
* lisp/org-gnus.el (org-gnus-nnimap-cached-article-number): Check that
  nnimap-group-overview-filename, which was removed from Emacs in 2010,
  is defined before calling.
2016-05-15 18:59:19 -04:00
Kyle Meyer 1c9bb0dba8 Fix up last backport
* lisp/org.el (org-export-backend-options): Add back removed
declare-function call.
* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-gnuplot.el (orgtbl-to-generic): Remove BACKEND argument from
declare-function calls.

The last backport added this argument to match orgtbl-to-generic's
signature in Emacs's version of Org, but the BACKEND argument to
orgtbl-to-generic was later removed in 9209aa3 (org-table: Use "ox.el"
internally for radio tables, 2014-08-24).
2016-05-15 18:59:19 -04:00
Paul Eggert 1f046ea4b1 Backport commit 65c8c7c from Emacs
* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-exp.el (org-element-context):
* lisp/ob-gnuplot.el (org-time-string-to-time)
(orgtbl-to-generic):
* lisp/ob-haskell.el (org-export-to-file):
* lisp/ob-latex.el (org-create-formula-image)
(org-latex-compile):
* lisp/ob-python.el (run-python):
* lisp/ob-tangle.el (org-link-escape, org-back-to-heading):
* lisp/org-colview.el (org-agenda-redo):
* lisp/org-feed.el (url-retrieve-synchronously):
* lisp/org-info.el (Info-find-node):
* lisp/org-list.el (org-previous-line-empty-p):
* lisp/org-macs.el (org-string-match-p):
* lisp/org.el (org-beamer-mode):
Fix prototype to match current definition.
* lisp/ob-comint.el (tramp-flush-directory-property):
* lisp/ob-tangle.el (org-babel-update-block-body):
* lisp/org-bibtex.el (org-babel-trim):
* lisp/org-pcomplete.el (org-export-backend-options):
* lisp/org-protocol.el (org-publish-get-project-from-filename):
Fix file name in declare-function.
* lisp/ob-comint.el (with-parsed-tramp-file-name)
* lisp/ob-core.el (with-parsed-tramp-file-name):
* lisp/org.el (org-beamer-mode):
Append ‘t’ to declare-function, since the declaration isn’t a defun.
* lisp/ob-core.el (org-save-outline-visibility):
Remove; not needed.
* lisp/ob-scheme.el (run-geiser, geiser-mode)
(geiser-eval-region, geiser-repl-exit):
* lisp/ox-org.el (htmlize-buffer):
Prepend "ext:" to file name, since it is not part of Emacs.
* lisp/org-gnus.el (nnimap-group-overview-filename):
Remove decl, since function was removed.
* lisp/org-macro.el (org-with-wide-buffer):
Omit unnecessary (and mismatching) decl.
* lisp/org-clock.el (calendar-iso-to-absolute):
Declare calendar-iso-to-absolute instead, since it is the
non-obsolete version of this function.
* lisp/org-compat.el (w32-focus-frame):
Remove decl, since function is now obsolete.

Pacify ‘make check-declare’
65c8c7cb96c14f9c6accd03cc8851b5a3459049e
Paul Eggert
Sat May 14 19:57:44 2016 -0700
2016-05-15 18:59:16 -04:00
Arun Isaac 9b5e8fdb5c ox-rss: Prevent dropping lower level headlines
* contrib/lisp/ox-rss.el (org-rss-headline): Transcode lower level
  headlines (headlines with level > 1) using the html backend.  Do not
  drop them.

Previously, lower level headlines were dropped and did not appear in the
exported RSS output.
2016-05-13 17:37:06 +02:00
Nicolas Goaziou 34dc298869 org-agenda: Fix `org-agenda-bulk-custom-functions' supported Customize type
* org-agenda.el (`org-agenda-bulk-custom-functions'): Change the defcustom
  template to recognize that the code expects this alist's elements to be
  two-element lists like (?a b), not conses like (?a . b).

The Customize UI previously incorrectly presented the latter.  When
saved, this led to the agenda bulk-commands menu correctly presenting
the accelerator key 'a' but then erroring when it tried to execute the
associated command 'b'.
2016-05-11 22:49:25 +02:00
Nicolas Goaziou ee5d40b001 org-clock: Fix `org-clock-drawer-name'
* lisp/org-clock.el (org-clock-drawer-name): When
  `org-clock-into-drawer' is a number and `org-log-into-drawer' is t,
  default to "LOGBOOK".

* testing/lisp/test-org-clock.el (test-org-clock/into-drawer):
(test-org-clock/drawer-name): New tests.
2016-05-11 18:44:02 +02:00
Nicolas Goaziou d1786a0908 org-clock: Fix generated drawer when `org-clock-into-drawer' is numerical
* lisp/org-clock.el (org-clock-find-position): Create a default
  "LOGBOOK" drawer when `org-clock-into-drawer' is a numeric value.

Reported-by: Carlos Noguera <carlos.francisco.noguera@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106886>
2016-05-10 22:42:38 +02:00
Nicolas Goaziou 83e373f109 Fix `org-occur' when regexp matches a single char
* lisp/org.el (org-occur): Fix infloop when regexp matches a single
  char.  Improve docstring.

(org-check-before-date):
(org-check-after-date):
(org-check-dates-range): Match correct object since point may be at the
beginning of the next one.

* testing/lisp/test-org.el (test-org/occur): New test.
2016-05-05 12:59:46 +02:00
Nicolas Goaziou 1ca1d52e92 Fix `org-occur' when called non-interactively
* lisp/org.el (org-first-headline-recenter): Check if current buffer is
  actually displayed in a window before trying to recenter view.
2016-05-05 11:55:00 +02:00
Nicolas Goaziou 8638c14fbd org-agenda: Fix error on empty headlines
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks): Handle empty headlines.
2016-05-04 14:20:09 +02:00
Nicolas Goaziou af853dd3aa Fix `org-flag-drawer' with optional argument
* lisp/org.el (org-flag-drawer): Do not require point to be at a drawer
  in order to call the function with an optional argument.

* testing/lisp/test-org.el (test-org/flag-drawer): Narrow test.
2016-05-01 01:27:30 +02:00
Nicolas Goaziou c8c2d2b1f7 Fix multiple groups of mutually exclusive tags
* lisp/org.el (org-set-tags): Use a subtler mechansim to remove
  duplicate tags.  This fixes a bug introduced in 77b4fad.

Reported-by: Christoph LANGE <math.semantic.web@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106763>
2016-04-28 22:04:49 +02:00
Nicolas Goaziou e818699113 Fix storing links to headlines containing multiple links
* lisp/org.el (org-store-link): Fix storing links to headlines
  containing multiple links.

* testing/lisp/test-org.el (test-org/store-link): New test.

Reported-by: Georgiy Tugai <georgiy.tugai@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106606>
2016-04-26 20:59:33 +02:00
Nicolas Goaziou 00a8275c62 Fix links to elements with a name
* lisp/org.el (org-store-link): Properly handle elements with a NAME
  keyword.
2016-04-26 18:58:01 +02:00
Nicolas Goaziou 91ea3920df ox-ascii: Fix spurious links
* lisp/ox-ascii.el (org-ascii--unique-links): Fix spurious links.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106667>
2016-04-26 18:46:34 +02:00
Kyle Meyer ae73c75fa6 org-yank: Correct docstring
* lisp/org.el (org-yank): Update docstring for change in default value
  of org-yank-adjusted-subtrees.

The default value was changed to nil in 2949012 (Change default values
of some variables., 2009-02-01).

Reported-by: Jorge Peixoto de Morais Neto <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106610>
2016-04-23 17:38:45 -04:00
Nicolas Goaziou 21ef130752 ox-odt: Fix styles location
* lisp/ox-odt.el (org-odt-styles-dir-list): Point to correct location
  for styles.

Reported-by: Colin Baxter <m43cap@yandex.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106209>
2016-04-19 21:30:39 +02:00
Nicolas Goaziou 77b4fad528 Remove duplicate candidates when setting tags
* lisp/org.el (org-set-tags): Remove duplicate candidates from menu.
2016-04-19 01:34:27 +02:00
Nicolas Goaziou e0acd8a15a Fix "Invalid time zone specification" error
* lisp/org.el (org-timestamp-change): Correctly handle `encode-time'
  parameters.

Suggested-by: Derek Feichtinger <dfeich@gmail.com>
Reported-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/106344>
2016-04-16 11:35:43 +02:00
Nicolas Goaziou e3656b6b2e org.texi: Fix typo
* doc/org.texi (Timers): Fix typo.

Reported-by: Lee <maplainfly@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106430>
2016-04-16 11:30:31 +02:00
Nicolas Goaziou 846467b718 Fix typo
* lisp/org.el (org-property--local-values): Fix typo in doc string.
2016-04-14 09:17:34 +02:00
Nicolas Goaziou 297315c46a org-capture: Fix invalid table line specification
* lisp/org-capture.el (org-capture-place-table-line): Move point in
  front of the table before trying to analyze it.

Reported-by: Christian Moe <mail@christianmoe.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106356>
2016-04-13 23:47:36 +02:00
Nicolas Goaziou 9b5f2a03ea ox-ascii: Fix export of links in headlines
* lisp/ox-ascii.el (org-ascii--unique-links):
(org-ascii-headline):
(org-ascii-section): Fix export of links in headlines.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106338>
2016-04-13 23:16:25 +02:00
Kyle Meyer acfd411193 Update format-time-string calls for argument change
* lisp/org.el (org-timestamp-format):
* lisp/ox-icalendar.el (org-icalendar-convert-timestamp): Specify t for
  the ZONE argument of format-time-string to indicate UTC.

As of Emacs's af32fa9 (New optional ZONE arg for format-time-string
etc., 2015-07-26), UTC is indicated by passing t as the third argument
to format-time-string rather than any non-nil value.

This change is in place of a backport of Emacs's b787d55 (More
format-time-string change fixups, 2016-04-02), which would not work for
earlier versions of Emacs.
2016-04-11 00:32:08 -04:00
Nicolas Goaziou d522fc8853 orgguide: Fix mis-uses of itemx
* doc/orgguide.texi (Agenda commands): Fix mis-uses of itemx.

Reported-by: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106211>
2016-04-08 22:51:04 +02:00
Nicolas Goaziou 9c6811b9d4 ox-texinfo: Fix erroneous count of blank lines in menu
* lisp/ox-texinfo.el (org-texinfo-section):
(org-texinfo--build-menu): Normalize empty lines in generated menu.

Reported-by: Jonas Bernoulli <jonas@bernoul.li>
<http://permalink.gmane.org/gmane.emacs.orgmode/106145>
2016-04-06 22:26:42 +02:00
Nicolas Goaziou cb683e3a56 ox-html: Fix planning info export
* lisp/ox-html.el (org-html-planning): Properly escape angle brackets in
  time-stamps.

Reported-by: Keith Sutton <kesutt@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/105945>
2016-03-30 17:17:07 +02:00
Nicolas Goaziou 954103dd9b Fix indentation bug
* lisp/org.el (org--get-expected-indentation): Return correct columns
  when at the end of an empty item.
* testing/lisp/test-org.el (test-org/indent-line): Add test.
2016-03-30 15:34:24 +02:00
Nicolas Goaziou a94147535a ox-html: Fix Usenet links
* lisp/ox-html.el (org-html-link): Properly export Usenet links.

Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/105915>
2016-03-28 11:06:56 +02:00
Thierry Banel f9464d2678 ob-C: use size_t in babel D
* lisp/ob-C.el (org-babel-C-header-to-C): change ulong to size_t for
  indexing a table as mandated by the latest version of the D language
  (thanks to Chris Andrews)
2016-03-26 00:27:39 +01:00
Nicolas Goaziou a737f20ca4 org-table: Add tests
* testing/lisp/test-org-table.el (test-org-table/eval-formula):
(test-org-table/last-rc): New tests.
(test-org-table/first-rc): Add tests.
2016-03-26 00:20:08 +01:00
Nicolas Goaziou 28a8d2e24e org-table: Fix docstrings
* lisp/org-table.el (org-table-eval-formula): Nowadays, Calc is
  installed with Emacs, so there is no need to specify this.  Also
  remove hard-coded "C-u".
(org-table-recalculate): Fix code typo.
2016-03-25 23:11:34 +01:00
Nicolas Goaziou 0b077de733 org-table: Fix #ERROR in table formula with "@>"
* lisp/org-table.el (org-table-eval-formula): Expand first and last
  references into proper fields coordinates before replacing ranges.

Reported-by: Pablo S. Casas <pabloscasas@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/105895>
2016-03-25 22:33:06 +01:00
Nicolas Goaziou 780445c0aa org.texi: Fix typo
* doc/org.texi (HTML doctypes): Special block names are case-sensitive.

Reported-by: Guilherme Gondim <guilherme@semente.io>
<http://permalink.gmane.org/gmane.emacs.orgmode/105896>
2016-03-25 14:26:09 +01:00
Nicolas Goaziou 6d070db91c org-table: Silence byte-compiler 2016-03-24 22:12:58 +01:00
Nicolas Goaziou c736013224 org.texi: Fix typo
* doc/org.texi (@LaTeX{} specific attributes): Fix typo.

Reported-by: Eduardo Mercovich <eduardo@mercovich.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/105873>
2016-03-24 14:02:24 +01:00
Nicolas Goaziou a5623bc502 org-table: Fix LaTeX snippets in radio tables
* lisp/org-table.el (orgtbl-to-generic): Call back-end specific filters.
* testing/lisp/test-org-table.el (test-org-table/to-latex): Add test.

Reported-by: Uwe Brauer <oub@mat.ucm.es>
<http://permalink.gmane.org/gmane.emacs.orgmode/105876>
2016-03-24 13:59:29 +01:00
Nicolas Goaziou 6f439a29b1 Remove failing test
* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes):
  Comment out failing test.
2016-03-17 17:15:17 +01:00
Nicolas Goaziou 261eadb9d4 Fix indentation bug
* lisp/org.el (org--get-expected-indentation): Fix indentation.
* testing/lisp/test-org.el (test-org/indent-line): Add test.
2016-03-17 16:50:54 +01:00
M. P. Ashton 9879c20a34 ox-confluence: Do not generate filled paragraphs
* contrib/lisp/ox-confluence.el: (org-confluence-paragraph): New function.
(confluence): Use new function.

ox-confluence was generating filled paragraphs.  Since Confluence treats
each newline as a line break, this caused unexpected formatting.  Added
a paragraph function to generate unfilled paragraphs (taken from
ox-md.el).
2016-03-16 22:36:32 +01:00
Nicolas Goaziou 9c2e8a7988 org-agenda: Fix bulk re-scheduling
* lisp/org-agenda.el (org-agenda-bulk-action): Fix rescheduling TODO items with `org-log-reschedule' set to `note'.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://permalink.gmane.org/gmane.emacs.orgmode/105591>
2016-03-16 22:07:16 +01:00
Rafael Laboissiere 3e79c60379 Document the lack of evaluation of inline code blocks in keyword lines
* doc/org.texi (Evaluating code blocks): Add footnote explaining that
inline code blocks are not evaluated inside keyword lines.
2016-03-14 15:34:47 +01:00
Kyle Meyer dd9be3a6ea Fix docstring typo
* lisp/org.el (org-align-all-tags): Fix typo in docstring.
2016-03-12 11:11:18 -05:00
Kyle Meyer 857b970b3a org.texi: Fix org-timer-pause-or-continue's key
* doc/org.texi (Timers): Fix keybinding for org-timer-pause-or-continue.

Reported-by: Tubo Shi <shitubo@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/105685>
2016-03-12 11:08:40 -05:00
Kaushal Modi ebacca39b4 Display quotes in key-bindings as straight quotes
* lisp/org-agenda.el (org-agenda-show-the-flagging-note):
* lisp/org-footnote.el (org-footnote-goto-definition):
* lisp/org-table.el (org-table-edit-formulas): Fix straight quotes
  rendered as curvy quotes in echoes messages (in emacs 25.1).
* lisp/org-table.el (org-table-align): Fix straight quotes rendered as
  curvy quotes in help echo (in emacs 25.1).

* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting.

The below thread discusses why these changes were needed especially when
using emacs 25.1 or newer emacsen (that added support for rendering
back-quotes and straight quotes as left/right curvy quotes by default):
http://thread.gmane.org/gmane.emacs.orgmode/105594

Fix the quote style displayed when key-bindings are shown in
the echo via (message .. (substitute-command-keys ..)).

So below will render that single quote as curly.

(message "C-c '")

The fix (Reference:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-10/msg00234.html)
is to print that quote verbatim using the "%s" modifier:

(message "%s" "C-c '")

Also an help-echo text property value was fixed in `org-table-align'.
`substitute-command-keys' should not be used in that.  Instead \\[COMMAND]
should be used directly in the string.
2016-03-11 22:40:30 -05:00
Nicolas Goaziou 5a735b0b80 ox: Fix smart quotes within tables
* lisp/ox.el (org-export--smart-quote-status): Handle smart quotes
  within objects.

* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes): Add
  tests.

Reported-by: Philipp Middendorf <pmi@hacon.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/105586>
2016-03-10 10:10:29 +01:00
Nicolas Goaziou cb5f323b0d org-crypt: Decrypt entries with a properties drawer
* lisp/org-crypt.el (org-decrypt-entry): Decrypt entries with
  a properties drawer.

This commit propagates changes made to `org-encrypt-entry' in the
previous commit.
2016-03-10 09:52:53 +01:00
Nicolas Goaziou 11d2b3c3f8 org-crypt: Do not encrypt properties drawers
* lisp/org-crypt.el (org-encrypt-entry): Do not encrypt properties
  drawer, as specified in the manual.

Reported-by: "Daniel E. Doherty" <ded@ddoherty.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/105587>
2016-03-10 09:43:36 +01:00