Commit Graph

13193 Commits

Author SHA1 Message Date
Nicolas Goaziou 9f5c252f93 org-src: Fix footnote reference remote editing
* lisp/org-src.el (org-edit-footnote-reference): Do not collapse
  footnote definitions after editing remotely one of them.

* testing/lisp/test-org-src.el (test-org-src/footnote-references): New
  test.
2017-06-08 00:57:38 +02:00
Nicolas Goaziou 3b8037f316 org-src: Raise an error when source buffer is unreachable
* lisp/org-src.el (org-edit-src-exit): Raise an error when source
  buffer is unreachable.
2017-06-08 00:57:23 +02:00
Nicolas Goaziou 84cfa58d4a org-element: Fix footnote definition parser
* lisp/org-element.el (org-element-footnote-definition-parser):
* testing/lisp/test-org-element.el (test-org-element/footnote-definition-parser):
  Add tests.
2017-06-07 23:45:17 +02:00
Nicolas Goaziou 1c71172c54 ox-texinfo: Tolerate indicating commands without @-sign
* lisp/ox-texinfo.el (org-texinfo-def-table-markup): Improve
  docstring.
(org-texinfo-plain-list): Tolerate indicating commands without @-sign.
2017-06-07 22:38:02 +02:00
Nicolas Goaziou 8305c9381e ox-texinfo: Remove spurious blank line in fixed width areas
* lisp/ox-texinfo.el (org-texinfo-fixed-width): Remove spurious blank
  line.
2017-06-07 12:23:20 +02:00
Nicolas Goaziou b13e672977 ox-texinfo: More fixes to cross-referencing
* lisp/ox-texinfo.el (org-texinfo--sanitize-title): New function.
(org-texinfo--get-node): Use new function.  Tiny improvement over
aesthetics of duplicate node names.
(org-texinfo--sanitize-node): Fix docstring.
(org-texinfo-headline): Use new function
(org-texinfo--@ref): Remove colons and protect commas in description.
(org-texinfo-link): Use new function.  Better handling of targets
within headings.
(org-texinfo--format-entries): Use new function.  Remove colons from
menu entries.
2017-06-06 23:48:33 +02:00
Nicolas Goaziou 93bc1b7c7e ox-texinfo: Improve algorithm to make node names unique
* lisp/ox-texinfo.el (org-texinfo--get-node): Use numbers to
  differentiate between common base node names instead of "x".
2017-06-06 02:18:40 +02:00
Nicolas Goaziou d44cadbe3e ox-texinfo: Fix conflicts between @node and @anchor names
* lisp/ox-texinfo.el (org-texinfo--get-node): Prevent using reserved
  "Top" node.
(org-texinfo-radio-target):
(org-texinfo-src-block):
(org-texinfo-table):
(org-texinfo-target): Use `org-texinfo--get-node' instead of
`org-export-get-reference'.
2017-06-06 02:18:40 +02:00
Nicolas Goaziou c822329faf ox-texinfo: Additional fix to @ref commands
* lisp/ox-texinfo.el (org-texinfo--@ref): New function.
(org-texinfo-link): Use new function.

When node name doesn't correspond to actual title, use the third @ref
argument to ensure the node name is not printed nor displayed.
2017-06-06 02:18:40 +02:00
Nicolas Goaziou 6f12dfbcb0 ox-texinfo: Fix @ref{...} handling
* lisp/ox-texinfo.el (org-texinfo-link): Fix @ref{...} handling.  Use
  third argument as description.  Without description, use
  one-argument @ref.
2017-06-06 00:21:53 +02:00
Nicolas Goaziou 439fcfbbf2 Fix link fontification
* lisp/org.el (org-activate-links): Delegate to
  `org-element-link-parser' to handle blanks and link expansion.
2017-06-05 23:39:42 +02:00
Nicolas Goaziou 82db669de6 org-macro: Expand macros only within narrowed part of buffer
* lisp/org-macro.el (org-macro-replace-all): Expand macros only within
  narrowed part of buffer.
* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Update
  test.

Expanding macros outside in the whole buffer could make sense, e.g.,
if a macro expands to some Babel code, which, in turn, is evaluated
prior to export.  However, by principle of least surprise, it is
better to limit expansion to current accessible part of the buffer.
2017-06-05 18:08:42 +02:00
Nicolas Goaziou faace6f05d Fix last commit
* lisp/org-agenda.el (org-agenda-mode):
* lisp/org.el (org-clone-local-variables): Fix match pattern.
2017-06-04 09:17:07 +02:00
Nicolas Goaziou 355b0012d1 Fix local variable handling
* lisp/org.el (org-clone-local-variables):
* lisp/org-agenda.el (org-agenda-mode): Do not assume
  `buffer-local-variables' returns only cons cells.

Reported-by: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113793>
2017-06-03 22:43:35 +02:00
Nicolas Goaziou 57d0a7453d org-capture: Fix visibility of planning line in capture buffer
* lisp/org-capture.el (org-capture-place-entry): Make sure planning
  line is visible when added in a narrowed capture buffer.  Refactor
  code.

Reported-by: Detlef Steuer <steuer@unibw-hamburg.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113756>
2017-06-02 09:21:44 +02:00
Nicolas Goaziou 2b95b40b31 org-agenda: Fix `org-tags-view'
* lisp/org-agenda.el (org-tags-view): Do not set global value for
  `org--matcher-tags-todo-only'.

Reported-by: Samuel Loury <konubinix@gmail.com>
2017-05-30 18:56:56 +02:00
Nicolas Goaziou 444d2673bb org-colview: Fix `org-columns' with a prefix argument
* lisp/org-colview.el (org-columns): Fix `org-columns' with a prefix
  argument.
* testing/lisp/test-org-colview.el (test-org-colview/columns-scope):
  Update test.

Reported-by: Hendrik Tews <hendrik@askra.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113721>
2017-05-30 13:38:54 +02:00
Nicolas Goaziou 400cd95bba org-clock: Fix german translations
* lisp/org-clock.el (org-clock-clocktable-language-setup): Fix german
  translations.

Suggested-by: Jens Lange <jens.lange.de@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113714>
2017-05-30 08:56:25 +02:00
Chunyang Xu 1afcf2c9aa Exclude '[' and ']' in `org-plain-link-re'
* lisp/org.el (org-make-link-regexps): Do it.

TINYCHANGE
2017-05-28 09:39:29 +02:00
Nicolas Goaziou 75e9fdac6c org-clock: Fix number of time columns in clock table
* lisp/org-clock.el (org-clocktable-write-default): Limit number of
  time columns to the deepest headline level.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable/maxlevel):
  Update tests.
2017-05-27 18:12:38 +02:00
Nicolas Goaziou 2d29269bb1 Fix link fontification
* lisp/org.el (org-activate-links): New function.
(org-set-font-lock-defaults): Use new function.
(org-activate-angle-links):
(org-activate-bracket-links):
(org-activate-plain-links): Remove functions.
* lisp/org-agenda.el (org-agenda-get-some-entry-text):
(org-agenda-finalize): Use new function.

Reported-by: 林镇国 <mistkafka@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113485>
2017-05-26 11:56:53 +02:00
Kyle Meyer 6d4c188e3e Silence byte-compiler under "make single" 2017-05-26 00:03:29 -04:00
Nicolas Goaziou 89bd7ad871 org-colview: Silence byte-compiler
* lisp/org-colview.el (org-columns--displayed-value): Silence
  byte-compiler.
2017-05-25 20:54:39 +02:00
Nicolas Goaziou 118ec40c53 ox-publish: Fix symlink publishing
* lisp/ox-publish.el (org-publish-file): Do not expand symlinks so as
  to get proper publishing directory.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/113611>
2017-05-25 11:08:02 +02:00
Bastien f4803cfad4 org-list.el (org-sort-list): Fix typo in prompt string
* lisp/org-list.el (org-sort-list): Fix typo in prompt string.
2017-05-23 20:46:42 +02:00
Nicolas Goaziou d6f096546e org-capture: Fix number of blank lines with :unnarrowed option
* lisp/org-capture.el (org-capture-finalize): Remove blank lines
  number fix, which only applies to narrowed capture buffers.
(org-capture-insert-template-here):
(org-capture-place-plain-text):
(org-capture-place-item):
(org-capture-place-entry): Do not hard-code number of blank lines
after entry.

Reported-by: Igor Perepelytsya <igorquail@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113093>

Reported-by: Jay Dresser <jay@jaydresser.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/113449>
2017-05-23 18:10:06 +02:00
Nicolas Goaziou 7f0391cfe0 org-colview: Remove error upon summarizing non-numbers with a format string
* lisp/org-colview.el (org-columns--displayed-value): Remove check.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Remove a test.

Reported-by: Hendrik Tews <hendrik@askra.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113600>
2017-05-22 15:27:17 +02:00
Nicolas Goaziou 9fd562f35a org-colview: Update new summarized value only when necessary
* lisp/org-colview.el (org-columns--compute-spec): Make sure current
  and new values do not differ only by leading or trailing blanks
  before replacing the former by the latter.

Reported-by: Hendrik Tews <hendrik@askra.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113597>
2017-05-22 14:17:01 +02:00
Nicolas Goaziou d7599e3f27 Preserve targets order according to rules
* lisp/org.el (org-refile-get-targets): Keep targets grouped according
  to `org-refile-targets' value.
2017-05-22 08:24:56 +02:00
Nicolas Goaziou 7560a49459 Remove duplicates in refile targets
* lisp/org.el (org-refile-get-targets): Remove duplicates in refile
  targets.
2017-05-22 08:16:42 +02:00
Kyle Meyer 0de7ad0430 org-store-link: Don't roll C-u behavior into C-u C-u behavior
* lisp/org.el (org-store-link): When a double C-u prefix argument is
given, do not reverse the meaning of the org-context-in-file-links
option.
* testing/lisp/test-org.el (test-org/store-link): Add tests.

This allows the user to fall back to the core link storing functions
without also reversing their org-context-in-file-links preference,
because wanting to do the former does not mean a user also wants to do
the latter.

Reported-by: York Zhao <gtdplatform@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-05/msg00254.html>
2017-05-21 14:52:30 -04:00
Nicolas Goaziou 39b3f45a7d org-colview: Fix {X%} and {X/} on recursive summaries
* lisp/org-colview.el (org-columns--summary-checkbox-count):
(org-columns--summary-checkbox-percent): Handle own output for higher
level summaries.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Add tests.
2017-05-21 11:08:11 +02:00
Nicolas Goaziou 3e3e4e621b org-colview: Fix estimate's summary
* lisp/org-colview.el (org-columns--summary-estimate): Per last
  commit, do not make use of printf, since values are not numbers.
2017-05-21 00:06:31 +02:00
Nicolas Goaziou ec5df01bd8 org-colview: Properly apply operator format strings on leaf nodes
* lisp/org-colview.el (org-columns--displayed-value): When value is
a number and a format string is specified, apply it.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Add tests.

Reported-by: Hendrik Tews <hendrik@askra.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113547>
2017-05-20 22:11:45 +02:00
Nicolas Goaziou 85a26f0cfe Fix "Stack overflow in regexp matcher" in `org-refresh-stats-properties'
* lisp/org.el (org-refresh-stats-properties): Simplify regexp.  Small
  refactoring.

Reported-by: Kevin Zettler <kevzettler@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113555>
2017-05-20 09:09:03 +02:00
Nicolas Goaziou c848ade014 org-element: Fix suprious "nil" in dynamic-block interpreter
* lisp/org-element.el (org-element-dynamic-block-interpreter): Ignore
  empty arguments instead of displaying "nil".

Reported-by: John Kitchin <jkitchin@andrew.cmu.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/113551>
2017-05-19 16:29:12 +02:00
Nicolas Goaziou f70eb7d2e8 org-clock: Fix missing properties in Clock table
* lisp/org-clock.el (org-clocktable-write-default): Do not ignore
  properties specified by :properties parameter.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable/properties):
  New test.

The regression was introduced in b897ab722.

Reported-by: Dale <dale@codefu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112219>
2017-05-19 09:09:32 +02:00
Kyle Meyer 9d9f5179e7 org-sort: Read compare-func in interactive calls
* lisp/org-macs.el (org-read-function): New function.
* lisp/org-table.el (org-table-sort-lines): Make WITH-CASE an optional
argument to match org-sort-entries and org-sort-list.
* lisp/org.el (org-sort-entries):
* lisp/org-table.el (org-table-sort-lines):
* lisp/org-list.el (org-sort-list): Read COMPARE-FUNC when called
interactively rather than being restricted to the default behavior of
sort-subr's PREDICATE parameter.  Only prompt for for GETKEY-FUNC and
COMPARE-FUNC during an interactive call, like org-table-sort-lines
already did for GETKEY-FUNC, but use an argument rather than relying
on the brittle called-interactively-p.

Suggested-by: Zhitao Gong <zhitaao.gong@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-05/msg00040.html>
2017-05-18 14:46:33 -04:00
Nicolas Berthier 2c9f6fcef9 Fontify inline source blocks when exporting to HTML
* lisp/ox-html.el (org-html-inline-src-block): Fontify inline source
blocks.
2017-05-15 18:28:34 +02:00
Philipp Stephani 5eeccc7230 Backport commit 3c4c8ca06 from Emacs
* lisp/ob-ref.el (org-babel-ref-resolve): Fix unescaped character
literal.

Fix all unescaped character literals
3c4c8ca06e3306ccbcd07e354eb51abe53b52d22
Philipp Stephani
Sun May 7 13:22:34 2017 +0200
2017-05-15 00:02:53 -04:00
Nicolas Goaziou 93e5d92383 org-clock: Disambiguate character syntax
* lisp/org-clock.el (org-clock-put-overlay): Escape character in
  character syntax.
2017-05-15 00:34:58 +02:00
Nicolas Goaziou c0369a7984 org-element: Fix $...$ fragments followed by an apostrophe
* lisp/org-element.el (org-element-latex-fragment-parser):
* lisp/org.el (org-latex-regexps): Allow an apostrophe right after
  a fragment.

* testing/lisp/test-org-element.el (test-org-element/latex-fragment-parser):
  Add test.

In Text mode, and, as a consequence, in Org mode, "'" is not treated
as punctuation, but as word constituent.  The apostrophe isn't caught
by "\s." regexp.

Reported-by: Joe Corneli <holtzermann17@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113464>
2017-05-13 09:18:07 +02:00
Nicolas Goaziou 0255538701 org-agenda: Fix logging with bulk-deadlining
* lisp/org-agenda.el (org-agenda-bulk-action): Do not request logging
  writing a note when multiple entries are being re-deadline'd at the
  same time.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://permalink.gmane.org/gmane.emacs.orgmode/113426>
2017-05-12 00:39:06 +02:00
Nicolas Goaziou ffa5a93764 org-agenda: Fix consecutive bulk marks on the same task
* lisp/org-agenda.el (org-agenda-bulk-unmark-all): Do not reset
  markers stored in `org-agenda-bulk-marked-entries'.  These markers
  are not specific to bulk actions and need not be modified by
  side-effect.

Reported-by: Adrian Bradd <adrian.bradd@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112895>
2017-05-12 00:13:09 +02:00
Thierry Banel e89ca9c5d2 ob-gnuplot: escape % character in output
lisp/ob-gnuplot.el (org-babel-execute:gnuplot): escape % percent
character in output messages coming from GnuPlot.
2017-05-08 11:38:45 +02:00
Nicolas Goaziou f1da21f7d9 ob-core: Fix regression
* lisp/ob-core.el (org-babel-balanced-split): Fix regression
  introduced in 500abcd7fb.

* testing/lisp/test-ob.el (test-ob/balanced-split): Add tests.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/113401>
2017-05-08 11:25:17 +02:00
Nicolas Goaziou 250b64b3cb ox-publish: Consistently cache properties
* lisp/ox-publish.el (org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Use `file-truename' so that
caching keys do not depend on links in the file name.
2017-05-05 23:22:23 +02:00
Nicolas Goaziou d9c0a810f7 ox-publish: Use file true name as reference
* lisp/ox-publish.el (org-publish-file): Use file true name as
  reference.
2017-05-05 17:47:30 +02:00
Nicolas Goaziou 018ce94d88 ox-publish: Small refactoring
* lisp/ox-publish.el (org-publish-file): Use function dedicated to
  files instead of string related ones.  Small refactoring.
(org-publish-cache-get-file-property): Small refactoring.
2017-05-05 17:47:30 +02:00
Nicolas Goaziou 6539c41589 ox-publish: Fix publishing filenames with symbolic links
* lisp/ox-publish.el (org-publish-get-project-from-filename):
(org-publish-attachment):
(org-publish-projects):
(org-publish-org-sitemap): Use file comparison functions instead of
string ones so as to properly handle symbolic links in filenames.
2017-05-05 17:47:30 +02:00