0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 04:16:26 +00:00
Commit graph

14701 commits

Author SHA1 Message Date
Marco Wahl d6ebe38e2c Merge branch 'keep-some-local-variables-at-rebuild' into keep-text-scale-in-agenda-at-reload 2018-06-23 20:36:04 +02:00
Nicolas Goaziou 62dd2cc829 Fix regression in tags alignment
* lisp/org.el (org--align-tags-here): Correctly preserve column.
* testing/lisp/test-org.el (test-org/tag-align): Add test.

The regression was introduced in
593058e4a6.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00245.html>
2018-06-22 18:49:11 +02:00
Henry Blevins 9c8de985a5 ob-scheme: Fix scheme blocks ignoring :results in formatting
* ob-scheme.el (org-babel-execute:scheme): Process the :result header
argument to conditionally and appropriately format output.

Currently, `org-babel-execute:scheme' ignores the user specified :result header
argument found in the :result-param parameter and process all output as a table.
The fix is to pass the `result' and :result-param to the `org-babel-result-cond'
function to invoke the corresponding formatting.

For example, the following block incorrectly formats its output as a table:

(list 1 2 3)

| 1 | 2 | 3 |

This patch results in the correct behavior:

(list 1 2 3)

: (1 2 3)

Bringing it inline with the result using Emacs lisp:

(list 1 2 3)

: (1 2 3)
2018-06-21 22:00:19 +02:00
Nicolas Goaziou fbd138f527 org-agenda: Fix SPC in agenda
* lisp/org-agenda.el (org-agenda-show-and-scroll-up): Properly display
  drawers when SPC is pressed.  Hide them again with a universal
  prefix argument.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00254.html>
2018-06-21 20:25:03 +02:00
Nicolas Goaziou 9b7191001c org-capture: Silence byte-compiler 2018-06-21 18:13:31 +02:00
Nicolas Goaziou 031c53103a org-capture: Fix formulas when capturing rows
* lisp/org-capture.el (org-capture-finalize): Possibly update formula
  when inserting the captured rows in the table.

* testing/lisp/test-org-capture.el (test-org-capture/table-line): Add
  tests.

Reported-by: "Holst Thomas (PS-EC/ESE4)" <Thomas.Holst@de.bosch.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00276.html>
2018-06-21 18:09:40 +02:00
Nicolas Goaziou 547b431e70 org-capture: Fix row insertion in a table with a formula
* lisp/org-capture.el (org-capture-place-table-line): Insert new row
  above the formula, not below.
* testing/lisp/test-org-capture.el (test-org-capture/table-line): Add
  test.
2018-06-21 12:17:07 +02:00
Nicolas Goaziou c891b840d2 org-table: `org-table-fix-formulas-confirm' is not safe.
* lisp/org-table.el (org-table-fix-formulas-confirm): Funcall'ing
  a symbol is never safe, no matter what the symbol is.
2018-06-21 11:48:54 +02:00
Marco Wahl 00c1184a04 org-agenda: Keep local-variables defining text-scale
* lisp/org-agenda.el (org-agenda-mode): Save and restore local
	   variables text-scale-mode-amount, text-scale-mode,
	   text-scale-mode-lighter, face-remapping-alist.  In effect
	   this keeps the text-scale at agenda rebuild and redo.

This commit is predicated on the newsgroup post of Samuel Wales "point
moves and zoom level reverts when refreshing agenda" at Sun, 27 May
2018.
2018-06-20 17:22:52 +02:00
Nicolas Goaziou 460d83831a Silence byte-compiler 2018-06-19 22:53:59 +02:00
Nicolas Goaziou 6c3ce3c17b org-macs: Fix `provide' location 2018-06-19 22:42:11 +02:00
Nicolas Goaziou 7fbb705d13 org-capture: Do not force newline on empty capture templates
* lisp/org-capture.el (org-capture-fill-template): Do not force
  newline on empty capture templates.

Reported-by: xristos <xristos@sdf.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00052.html>
2018-06-19 16:38:09 +02:00
Nicolas Goaziou 075e79de4f org-archive: Do not create multiple archive subtrees
* lisp/org-archive.el (org-archive-subtree): Fix regexp.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00056.html>
2018-06-19 13:44:38 +02:00
Nicolas Goaziou 9ff77b1e57 org-info: Fix path parsing
* lisp/org-info.el (org-info-follow-link):
(org-info-export): Manual is separated from node name by either "#" or
"::", not ":".
2018-06-19 10:44:56 +02:00
Nicolas Goaziou 593058e4a6 `org-set-tags' modifies buffer only when necessary
* lisp/org.el (org--align-tags-here):
(org-set-tags): Modify buffer only when necessary.

* testing/lisp/test-org.el (test-org/set-tags): Add tests.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00242.html>
2018-06-19 09:40:00 +02:00
Nicolas Goaziou 2e1daf14e0 Update "Version" keyword 2018-06-17 10:25:35 +02:00
Nicolas Goaziou 54abd0f0ea org-capture: Fix last commit
* lisp/org-capture.el (org-capture-fill-template): Properly handle
  allowed values when target sets them.
2018-06-16 23:15:34 +02:00
Christian Schwarzgruber 7fcceecf5d Improve org-log-reschedule and `org-log-redeadline' docstrings
* lisp/org.el (org-log-reschedule):
(org-log-redeadline): Improve docstring.

TINYCHANGE
2018-06-16 21:51:37 +02:00
Nicolas Goaziou 42a2c248eb org-capture: Fix completion for properties in capture buffer
* lisp/org.el (org-read-property-value):
* lisp/org-capture.el (org-capture-fill-template): Sidestep
  `org-set-property'.  Use previous function and `org-entry-put'
  instead.

Reported-by: Eric Danan <eric.danan@u-cergy.fr>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00061.html>
2018-06-16 17:03:22 +02:00
stardiviner dcf1796636 ob-shell: Initialize header arguments for other shell names
* lisp/ob-shell.el (org-babel-shell-initialize) Initialize
  org-babel-default-header-args: for shell names.
2018-06-15 22:46:11 +02:00
Nicolas Goaziou b3981d6ad0 Fix org-metaup' and org-metadown' on regions
* lisp/org.el (org-metaup): Do not leave a character behind when
  transposing regions.
(org-metadown): Fix "Transposed regions overlap" error.

Reported-by: Adam Porter <adam@alphapapa.net>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00184.html>
2018-06-15 18:52:09 +02:00
Nicolas Goaziou 1704a25b98 org-tempo: Fix docstring
* lisp/org-tempo.el (org-tempo-keywords-alist): Fix docstring.
2018-06-14 16:39:28 +02:00
Nicolas Goaziou 956a5a4cb1 Ignore inlinetasks in `org-before-first-heading-p'
* lisp/org.el (org-before-first-heading-p): Ignore inlinetasks.
2018-06-13 22:20:27 +02:00
Nicolas Goaziou f50f373389 Add facility for commit log messages from Org documents
* lisp/org-compat.el (org-add-log-current-headline): New function.
* lisp/org.el (org-mode): Use new function.
2018-06-13 22:15:56 +02:00
Nicolas Goaziou 3f26c9bd2e `org-get-heading' returns nil instead of erroring out
* lisp/org.el (org-get-heading): Return nil instead of throwing an
  error before first headline.
2018-06-13 22:15:17 +02:00
Nicolas Goaziou f440ff0a6a Fix imenu compatibility with non-contiguous structure
* lisp/org.el (org-mode): Move imenu compatibility to "org-compat.el".
* lisp/org-compat.el (org-imenu-new-marker): Remove function.
(org-imenu-get-tree): Handle non-contiguous structure.

Reported-by: Thibault Polge <thibault@thb.lt>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00088.html>
2018-06-13 01:13:16 +02:00
Nicolas Goaziou 3745c0af9f Fix indentation when wrapping a block around a region
* lisp/org.el (org-insert-structure-template): Indent like the first
  line, not the line the point happens to be on.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00107.html>
2018-06-12 09:03:33 +02:00
Marco Wahl 842002f9f7 org-archive: Fix insert of extra blank line at archiving
* lisp/org-archive.el (org-archive-subtree): Remove insertion of extra
  blank line in case of org-archive-reversed-order.
2018-06-07 15:52:26 +02:00
Marco Wahl 13a09b3ba5 Merge branch 'maint' 2018-06-06 16:05:26 +02:00
Marco Wahl 2b76aebfc6 org-element: Fix interpretation as todo kwd when prefix of headline
* lisp/org-element.el (org-element-headline-parser): Check for space
  after todo-kwd.
* testing/lisp/test-org-element.el (test-org-element/headline-todo-keyword):
  Respective tests.
2018-06-06 15:58:20 +02:00
Nicolas Goaziou 8b9c1e15df ob-tangle: Fix `org-babel-detangle'
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Preserve position
  in source block only if it doesn't put point outside of the block.

Reported-by: Frederick Giasson <fred@curbside.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00008.html>
2018-06-05 11:55:55 +02:00
Nicolas Goaziou ed7d1dc6d7 Fix quirks in `org-insert-structure-template'
* lisp/org.el (org-insert-structure-template): Fix some issues.
  Refactor code.
* testing/lisp/test-org.el (test-org/insert-structure-template):
  Update tests.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00553.html>
2018-06-02 23:41:56 +02:00
Nicolas Goaziou 97fac41194 Revert "ob-C: Provide ob-C++' and ob-D'"
This reverts commit f35994b314.
2018-05-30 12:57:21 +02:00
Rasmus 7ac46c52b7 Check format of org-structure-template-alist
* org.el (org--check-org-structure-template-alist): New function
  yielding user-error if using old org-structure-template-alist
  format.
  (org--insert-structure-template-mks):
* org-tempo.el (org-tempo-add-templates): Use new function
2018-05-28 23:44:51 +02:00
Nicolas Goaziou dac180ea0d org-footnote: Improve :safe values
* lisp/org-footnote.el (org-footnote-auto-label):
(org-footnote-auto-adjust): Use simpler :safe value.

The point of the :safe value is to determine if the variable is safe,
not to check correctness of its value. Besides, lambda functions
appear as the following in *Help* buffer:

  This variable is safe as a file local variable if its value
  satisfies the predicate which is a byte-compiled expression.

which is not particularly clear.  Let's keep :safe values simple.
2018-05-28 21:18:28 +02:00
Aaron Ecay c32938b7fd Revert "Un-fontlock sub/superscripts when point enters them"
This reverts commit 102832e66f.

See <https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=%2Bmessage-id%3A%3C87y3g43mjy.fsf%40nicolasgoaziou.fr%3E&submit=Search&idxname=emacs-orgmode>
2018-05-27 21:29:57 +01:00
Nicolas Goaziou f35994b314 ob-C: Provide ob-C++' and ob-D'
Reported-by: Van L <van@scratch.space>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00492.html>
2018-05-27 22:21:15 +02:00
Nicolas Goaziou c698c8e959 Fix tags completion
* lisp/org.el (org-tags-completion-function): Refactor function. Fix
  tag completion.

Reported-by: Alain.Cochard@unistra.fr
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00450.html>
2018-05-27 22:13:00 +02:00
Nicolas Goaziou 2086ea42cf org-footnote: Tiny refactoring
* lisp/org-footnote.el (org-footnote-section): Tiny refactoring.
2018-05-27 21:59:19 +02:00
Aaron Ecay c56bb9d59a org-footnote: add :safe properties to the defcustoms 2018-05-27 17:33:44 +01:00
Aaron Ecay 102832e66f Un-fontlock sub/superscripts when point enters them
* lisp/org.el (org-remove-font-lock-display-properties): Rename to
‘org-remove-font-lock-display-properties’.  It is a more
specific/accurate name.
(org-match-substring-with-braces-regexp):
(org-match-substring-regexp): Add a note to docstrings about what the
match groups are.
(org-raise-scripts--post-command-hook): New function, modeled on
‘prettify-symbols--post-command-hook’.
(org-raise-scripts): Use the above.

Inspired by
<https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=%2Bmessage-id%3A%3C518DCC34-E435-42F7-A15E-FAE7727033F8%40scratch.space%3E&submit=Search&idxname=emacs-orgmode>
2018-05-27 17:13:59 +01:00
Aaron Ecay 5192e810ae Add “summary” to ‘org-html-html5-elements’
* lisp/ox-html.el (org-html-html5-elements): Add “summary”

As suggested by Kaushal Modi in
<https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=%2Bmessage-id%3A%3CCAFyQvY2YoLDpM9PWLV86FwvPOVkuxg9O8KdryG3z%3D5QRm7Aujg%40mail.gmail.com%3E&submit=Search&idxname=emacs-orgmode>
2018-05-27 16:59:15 +01:00
Aaron Ecay 1117d65622 org.el: remove trailing whitespace 2018-05-27 16:58:39 +01:00
Nicolas Goaziou 2c5a8740ad Remove spurious colon in tags view
* lisp/org.el (org-scan-tags): Remove spurious colon in tags view.
  Small refactoring.

The regression was introduced in
be31a0c459.

Reported-by: Rainer Stengele <rainer.stengele@online.de>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00478.html>
2018-05-26 12:30:46 +02:00
Nicolas Goaziou 2918894f36 org-table: Tiny refactoring
* lisp/org-table.el (org-table-get-formula): Tiny refactoring.
(org-table-get-stored-formulas): Fix string.
2018-05-22 10:46:57 +02:00
Nicolas Goaziou 9d51a8b5a0 org-capture: Fix table line capture with custom location
* lisp/org-capture.el (org-capture-place-table-line): Fix error when
  a precise location is given, e.g. with `file+function' target.

* testing/lisp/test-org-capture.el (test-org-capture/table-line): Add
test.

Reported-by: Thomas Holst <thomas_holst@gmx.de>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00359.html>
2018-05-17 22:57:49 +02:00
Nicolas Goaziou 1cfd5d04e3 Fix a docstring
* lisp/org.el (org-store-link): Use "link" instead of puzzling
  "org-link".
2018-05-17 16:55:31 +02:00
Nicolas Goaziou 463664bdd0 Merge branch 'maint' 2018-05-16 22:07:33 +02:00
Nicolas Goaziou 2b26644b3a Fix `org-skip-over-state-notes'
* lisp/org.el (org-skip-over-state-notes): Allow empty TODO states.

Reported-by: Michael Brand <michael.ch.brand@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00337.html>
2018-05-16 22:06:39 +02:00
Nicolas Goaziou c46fcd9874 org-lint: Add checker for spurious colons in tags
* lisp/org-lint.el (org-lint--checkers): Add checker.
(org-lint-spurious-colons): New function.
* testing/lisp/test-org-lint.el (test-org/spurious-colons): New test.
2018-05-14 17:41:04 +02:00