Commit Graph

4614 Commits

Author SHA1 Message Date
Nicolas Goaziou 9d6a9e1739 Merge branch 'master' into next 2018-10-14 09:58:55 +02:00
Nicolas Goaziou f12f9b4f28 Fix fontification of links within verbatim markup
* lisp/org.el (org-do-emphasis-faces): Prevent fontification of links
  within verbatim markup.
2018-10-14 09:57:47 +02:00
Nicolas Goaziou 36c7bada28 Merge branch 'master' into next 2018-10-13 16:54:39 +02:00
Michaël Cadilhac d9fdc204cc org.el: Fix typo
* lisp/org.el (org-enforce-todo-checkbox-dependencies): Fix typo.

TINYCHANGE
2018-10-13 16:54:01 +02:00
Nicolas Goaziou 100541b53c Bump version keyword to 9.3 2018-10-06 12:12:13 +02:00
Nicolas Goaziou ffad253307 Merge branch 'master' into next 2018-10-06 09:50:52 +02:00
Nicolas Goaziou 1fbae137da Silence byte-compiler 2018-10-06 09:50:32 +02:00
Nicolas Goaziou 0954d4c258 Merge branch 'master' into next 2018-10-04 22:52:53 +02:00
Nicolas Goaziou 2ada40b796 Fix `org-paste-subtree' when called at the end of a headline
* lisp/org.el (org-paste-subtree): Fix `org-paste-subtree' when called
  at the end of a headline.

Reported-by: Dale Sedivec <dale@codefu.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00050.html>
2018-10-04 22:50:09 +02:00
Nicolas Goaziou bb36c0c8ab Refactor `org-babel-load-file'
* lisp/org.el (org-babel-load-file): Refactor code.
2018-10-03 18:44:34 +02:00
Nicolas Goaziou 144c27e39d org-keys: Extract key bindings into their own library
* lisp/org.el (org-replace-disputed):
(org-use-extra-keys):
(org-disputed-keys):
(org-key):
(org-defkey):
(org-use-speed-commands):
(org-speed-commands-user):
(org-follow-link-hook):
(org-tab-follows-link):
(org-return-follows-link):
(org-return-follows-link):
(org-mouse-1-follows-link):
(org-mouse-map):
(org-read-date-minibuffer-local-map):
(org-remap):
(org-speed-commands-default):
(org-print-speed-command):
(org-speed-command-help):
(org-speed-move-safe):
(org-speed-command-activate):
(org-babel-speed-command-activate):
(org-speed-command-hook): Move to "org-keys.el".
* lisp/org-keys.el: New file.
* lisp/ob-keys.el: Remove file.
2018-10-03 18:44:34 +02:00
Nicolas Goaziou 0266c36645 Do not use `org-refresh-effort-properties' when initializing Org
* lisp/org.el (org-mode): Do not call `org-refresh-effort-properties'.
(org-set-effort): Avoid using `effort' text property.
* lisp/org-timer.el (org-timer-set-timer): Avoid using
  `effort-minutes' text property.

Limit use of `effort' and `effort-minutes' properties to "org-agenda".
2018-10-03 18:44:34 +02:00
Nicolas Goaziou 0dd2985509 `org-fill-paragraph' leaves buffer unmodified when doing nothing
* lisp/org.el (org-fill-paragraph): Leave buffer unmodified when
  nothing was filled.
* lisp/org-compat.el: Add forward compatibility with `buffer-hash'
  function.
2018-10-03 18:44:34 +02:00
Chris Kauffman 09f9507238 Added keybindings for `org-table-move-cell-*' functions
* lisp/org.el (org-shiftup):
(org-shiftdown):
(org-shiftright):
(org-shiftleft): Dispatch `org-table-move-cell-*' commands.
2018-10-03 18:44:34 +02:00
Nicolas Goaziou 77aadd569c Improve a docstring
* lisp/org.el (org-complete-tags-always-offer-all-agenda-tags):
  Improve docstring.

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00027.html>
2018-10-03 12:40:58 +02:00
Marco Wahl d3e286257b org: Fix dangling parens in org-info-find-node 2018-10-03 09:21:58 +02:00
Marco Wahl 4ec502fc98 Merge branch 'master' into contextual-docu 2018-10-02 16:34:58 +02:00
Marco Wahl 3be61dff2f org: Unify a few settings in the org-mode-map 2018-10-02 15:05:59 +02:00
Marco Wahl 9968e66b64 org: Dropped one non-functional keybinding 2018-10-01 23:40:27 +02:00
Marco Wahl b19e7737dd org,org-agenda: New: open info depending on context
* lisp/org.el (org-info-find-node): Function to jump to info depending
  on context.  For an org file the context is the element type at point.
2018-10-01 22:47:33 +02:00
Marco Wahl 3f8b1b0265 org: Enable planning lines for special edit
* lisp/org.el (org-edit-special): Add a case for element type
  'planning.
2018-09-27 13:46:19 +02:00
Marco Wahl 7ae1230816 Merge remote-tracking branch 'origin/master' 2018-09-26 22:22:46 +02:00
Marco Wahl 6e584d06fd org: Show planning type in prompt when editing
* lisp/org.el (org-add-planning-info): Call `org-read-date' with either
  DEADLINE or SCHEDULED as value for the prompt.
2018-09-26 22:20:15 +02:00
Marco Wahl fe72a05ba5 org: Show planning type in prompt when editing
* lisp/org.el (org-add-planning-info): Call `org-read-date' with either
  DEADLINE or SCHEDULED as value for the prompt.
2018-09-26 14:15:34 +02:00
Nicolas Goaziou 17edaf8c14 "src block" -> "source block" in documentation and comments
* etc/ORG-NEWS (Maxima: new headers ~:prologue~ and ~:epilogue~):
(Texinfo exports inline source blocks as ~@code{}~):
(Default lexical evaluation of emacs-lisp source blocks):
* lisp/ob-clojure.el (org-babel-clojure-default-ns):
* lisp/ob-core.el (org-babel-named-src-block-regexp-for-name):
(org-babel-current-src-block-location):
(org-babel-mark-block):
(org-babel-insert-result):
* lisp/ob-emacs-lisp.el (org-babel-default-header-args:emacs-lisp):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/ob-lob.el (org-babel-lob-ingest):
* lisp/ob-ref.el:
* lisp/org-element.el (org-element-object-restrictions):
(org-element-src-block-parser):
(org-element-inline-src-block-parser):
* lisp/org-lint.el:
(org-lint--checkers):
* lisp/org-pcomplete.el (pcomplete/org-mode/block-option/src):
* lisp/org-src.el (org-edit-inline-src-code):
* lisp/org.el (org-ctrl-c-ctrl-c):
(org-in-src-block-p):
(org-fill-element):
* lisp/ox-html.el (org-html--textarea-block):
(org-html-format-code):
* lisp/ox-latex.el (org-latex-minted-options):
(org-latex-custom-lang-environments):
* lisp/ox-md.el:
* lisp/ox-odt.el (org-odt-format-code):
* lisp/ox.el (org-export-collect-listings):
* testing/lisp/test-ob-exp.el (ob-exp/src-block-with-affiliated-keyword):
* testing/lisp/test-ob.el (test-ob/preserve-results-indentation):
  Correct "src block" occurrences when they do not specifically refer
  to the element type `src-block'.
2018-09-20 11:23:49 +02:00
Marco Wahl 13090d114b org: Add special edit on timestamps
* lisp/org.el (org-edit-special): Added a case to call a suitable
  function to edit the timestamp at hand.
2018-09-18 17:59:52 +02:00
Nicolas Goaziou 5fe1650034 Fix `org-copy-visible'
* lisp/org.el (org-copy-visible): Deactivate region before adding
  visible part to kill ring.

See https://lists.gnu.org/archive/html/emacs-devel/2018-09/msg00476.html
2018-09-11 12:06:22 +02:00
Matt Lundin 5e27b2fd32 Ensure that org-get-tags returns all local tags
* lisp/org.el: (org-get-tags) Create a clearer separation between
  local and inherited tags in the function, so that
  org-remove-uninherited tags is only run on inherited tags. This is
  important to avoid destroying existing tags when adding new tags.
* testing/lisp/test-org.el: (test-org/get-tags) Add regression test
2018-08-19 10:28:27 +02:00
Nicolas Goaziou d975b44fd4 Fix `org-kill-line' on tag lines
* lisp/org.el (org-kill-line): Preserve tags when `org-special-ctrl-k'
  is non-nil.
* testing/lisp/test-org.el (test-org/kill-line): New test.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-07/msg00122.html>
2018-07-17 22:24:01 +02:00
Nicolas Goaziou d3774fba77 Limit `org-open-at-point'
* lisp/org.el (org-open-at-point): Do not open everything that looks
  like a link, in particular in verbatim or code objects.  However,
  still conveniently open links in comments, node properties and
  keywords.
2018-07-05 13:35:26 +02:00
Nicolas Goaziou 120f871f41 Small refactoring
* lisp/ob-core.el (org-babel-open-src-block-result): Fix docstring,
  refactor code.
* lisp/org.el (org-open-at-point): Refactor so as to not call
  `org-babel-open-src-block-result' unconditionally.
2018-07-05 13:15:30 +02:00
Nicolas Goaziou accf99cbc0 Deprecate `org-effort-durations'
* lisp/org.el (org-effort-duration): Remove unused variable.
* lisp/org-compat.el (org-effort-durations): Make
  `org-effort-duration' an alias for `org-duration-units'.
* lisp/org-clock.el (org-clock-modify-effort-estimate): Fix docstring.
* doc/org-manual.org (Footnotes): Clarify footnote.

The variable is inactive since introduction of "org-duration" library.
2018-06-25 17:13: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
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
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
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 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
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
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
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 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
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 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