0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-24 22:32:53 +00:00
Commit graph

14719 commits

Author SHA1 Message Date
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
Nicolas Goaziou 7143ae0355 Fix typo
* lisp/org.el (org-tag-alist): Fix typo in docstring.
2018-05-14 15:38:05 +02:00
Nicolas Goaziou ac21151c4a Fix typo in docstring
* lisp/org.el (org-tag-persistent-alist): Fix typo.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00293.html>
2018-05-13 22:36:09 +02:00
Nicolas Goaziou 640e05523a org-agenda: Fix the last fix...
* lisp/org-agenda.el (org-tags-view): Fix last commit.
2018-05-11 21:55:23 +02:00
Nicolas Goaziou 68b376dee0 org-agenda: Fix "org-agenda: one-armed “if” -> “when”"
* lisp/org-agenda.el (org-tags-view): Re-instate delete `else' part.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00286.html>
2018-05-11 21:49:25 +02:00
Nicolas Goaziou 92b03d161a ox-texinfo: Change sentence ending
* lisp/ox-texinfo.el (org-texinfo-plain-text): Sentences can end with
  a capital letter without a special symbol in Org.

It is simpler to provide a non-breaking space when a capital letter
followed by a period should not end than providing a way to force
ending a sentence.
2018-05-11 19:40:10 +02:00
Nicolas Goaziou 13fb6a3fae Move obsolete declarations into "org-compat.el" 2018-05-10 15:41:50 +02:00
Aaron Ecay 7106eab974 Many small code improvements
* lisp/org-capture.el (org-capture-member): Make obsolete; the old
definition was identical to ‘org-capture-get’ anyway.
(org-capture-mode-map): Move the calls to ‘define-key’ up to where the
variable is defined.
(org-capture-mode-hook): Small docstring tweak.
(org-capture-mode): Fix typo in mode lighter.
(org-capture-set-target-location, org-capture-place-item):
(org-capture-place-plain-text, org-capture-narrow):
(org-capture-empty-lines-after):
(org-capture-import-remember-templates): ‘if’ without else -> ‘when’
* lisp/org-colview.el (org-columns-edit-value): Change an error to a
user-error.
(org-columns-uncompile-format): Improve docstring.
* lisp/org-compat.el (org-remove-from-invisibility-spec): Make
obsolete, the underlying emacs function exists since 1997, commit 31aa282e.
(org-in-invisibility-spec-p, org-count-lines): ‘if’ without else -> ‘when’.
* lisp/org-element.el (org-element-swap-A-B):
* lisp/org-entities.el (org-entities-create-table):
* lisp/org-list.el (org-insert-item):
* lisp/org-macs.el (org-with-point-at, org-base-buffer):
(org-preserve-local-variables, org-overlay-display):
(org-overlay-before-string): ‘if’ without else -> ‘when’.
* lisp/org-eshell.el (org-eshell-open): Fix docstring typo.
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/language):
(pcomplete/org-mode/file-option/startup):
(pcomplete/org-mode/file-option/options):
(pcomplete/org-mode/file-option/infojs_opt):
(pcomplete/org-mode/link, pcomplete/org-mode/tex):
(pcomplete/org-mode/todo, pcomplete/org-mode/searchhead):
(pcomplete/org-mode/tag, pcomplete/org-mode/prop): Avoid the formerly
misspelled ‘pcomplete-uniqify-list’ function.  It has a defalias in
emacs >= 27; we add our own for older emacsen.
(pcomplete/org-mode/file-option/bind): ‘if’ without else -> ‘when’.
* lisp/org-protocol.el (org-protocol-capture):
(org-protocol-convert-query-to-plist): ‘if’ without else -> ‘when’.
(org-protocol-do-capture): Pacify byte compiler, simplify conditional
logic.
* lisp/org-table.el (org-table-create-with-table.el): Simplify conditional
logic.
(org-table-create, org-table-convert-region, org-table-next-field):
(org-table-beginning-of-field, org-table-end-of-field):
* lisp/org-w3m.el (org-w3m-copy-for-org-mode): ‘if’ without else ->
‘when’.
* lisp/org.el (org-babel-do-load-languages, org-previous-link):
(org-refile): Use ‘(foo ...)’ instead of ‘(funcall 'foo ...)’.
(org-add-log-note): Convert a long cond into a cl-case.
(org-priority): Improve docstring, show a deprecation warning if the
‘show’ argument is passed (which was previously silently ignored).
Also, use ?\s instead of ?\ as a character literal for space.
(org-fast-tag-insert): Fix docstring typo.
(org-fill-element): ‘if’ without else -> ‘when’.
(org-on-target-p): Remove ancient compatibility alias.
2018-05-10 04:22:30 +01:00
Aaron Ecay 9d5852e3b8 org-agenda: misc code improvements
* lisp/org-agenda.el:
(org-agenda-todo-nextset, org-agenda-set-tags): Use “(foo ...)”
instead of “(funcall 'foo ...)”.
(org-agenda-add-entry-to-org-agenda-diary-file): Convert a cond to a
cl-case.

Also remove some compatibility code to work around an emacs feature
that was changed in 2005 (emacs commit 9a20c79b)
2018-05-10 04:22:30 +01:00
Aaron Ecay c9dd7a6a9d org-agenda: one-armed “if” -> “when”
* lisp/org-agenda.el (org-agenda-mode):
(org-agenda-undo, org-agenda):
(org-agenda-get-restriction-and-command):
(org-batch-agenda-csv, org-fix-agenda-info):
(org-agenda-get-some-entry-text):
(org-agenda-prepare, org-agenda-finalize):
(org-agenda-fontify-priorities, org-agenda-entry-text-hide):
(org-agenda-list, org-agenda-ndays-to-span):
(org-search-view, org-todo-list):
(org-tags-view, org-modify-diary-entry-string):
(org-agenda-get-day-entries, org-agenda-get-progress):
(org-agenda-get-deadlines, org-prefix-category-max-length):
(org-agenda-format-item, org-agenda-fix-displayed-tags):
(org-compile-prefix-format):
(org-agenda-before-sorting-filter-function):
(org-agenda-limit-interactively, org-cmp-time):
(org-agenda-set-restriction-lock-from-agenda):
(org-agenda-get-represented-tags, org-agenda-filter-apply):
(org-agenda-filter-top-headline-apply):
(org-agenda-remove-filter, org-agenda-compute-starting-span):
(org-unhighlight, org-unhighlight-once):
(org-agenda-show-tags, org-agenda-check-no-diary):
(org-agenda-date-later-minutes, org-agenda-diary-entry-in-org-file):
(org-agenda-add-entry-to-org-agenda-diary-file):
(org-agenda-bulk-unmark, org-agenda-to-appt): Convert ‘if’ without
‘else’ to ‘when,’ or ‘unless’ in the case of “(if (not ...))”
(org-batch-agenda-csv): Also convert while-catch to dolist.
(org-agenda-prepare): Also simplify a quasiquoted structure.
(org-agenda-entry-text-hide): Also convert a bogus ‘mapcar’ to ‘mapc’.
(org-compile-prefix-format): Also convert sequential ‘if’s to ‘cl-case’.
2018-05-10 04:22:30 +01:00
Aaron Ecay 673165c035 ox-*: single-armed “if” -> “when”
* lisp/ox-html.el (org-html-htmlize-generate-css):
(org-html-template, org-html-final-function):
* lisp/ox-publish.el (org-publish-cache-set-file-property):
* lisp/ox-texinfo.el (org-texinfo-quote-block): Transform ‘if’ with no
else to ‘when’.
2018-05-10 01:17:12 +01:00
Aaron Ecay ccfe51d83c ob-*: single armed “if” -> “when”
* lisp/ob-C.el (org-babel-C-val-to-base-type):
* lisp/ob-comint.el (org-babel-comint-buffer-livep):
* lisp/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/ob-octave.el (org-babel-octave-import-elisp-from-file):
* lisp/ob-scheme.el (org-babel-scheme-get-repl): Transform ‘if’ with
no else branch to ‘when’
* lisp/ob-lua.el (org-babel-lua-evaluate-external-process):
* lisp/ob-python.el (org-babel-python-evaluate-external-process):
Simplify conditional logic slightly.
2018-05-10 01:14:24 +01:00
Aaron Ecay 2b7677c097 ob-js.el: fix declare-function calls for external library fns
Otherwise, check-declare gives us errors if these dependencies are not
installed.
2018-05-10 01:10:52 +01:00
Aaron Ecay 581fd90645 Fix declare-function and friends in org.el
* lisp/org-table.el (org-table-with-shrunk-field): Move from here...
* lisp/org-macs.el: ...to here

The move is necessary because this macro is used (at compile time) in
org.el.  We cannot leave its definition in org-table, because that
would lead to a require loop.  So we need to put it in org-macs, and
require the latter file in org.el also at compile time.

Finally, update and sort the declare-function calls.
2018-05-10 01:07:57 +01:00
Aaron Ecay 4afb7f747b Update declare-function calls for functions that have moved.
In cases where functions have moved from org.el into org-macs.el, it
is often possible to replace declare-function by (require 'org-macs)
2018-05-10 01:04:12 +01:00
Nicolas Goaziou 0dda9bf1c1 Mark `org-get-indentation' as obsolete
* lisp/org-macs.el (org-get-indentation): Move function...
* lisp/org-compat: ... here.
* lisp/ob-core.el (org-babel-demarcate-block):
(org-babel-insert-result):
(org-babel-update-block-body):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/org-agenda.el (org-agenda-get-some-entry-text):
* lisp/org-capture.el (org-capture-place-item):
* lisp/org-clock.el (org-clock-in):
* lisp/org-element.el (org-element-swap-A-B):
* lisp/org-feed.el (org-feed-format-entry):
* lisp/org-indent.el (org-indent-add-properties):
* lisp/org-list.el (org-in-item-p):
(org-list-struct):
(org-list-struct-apply-struct):
(org-list-item-body-column):
(org-toggle-item):
* lisp/org-src.el (org-src--edit-element):
* lisp/org.el (org-fixup-indentation):
(org-cdlatex-environment-indent):
(org--get-expected-indentation):
(org-indent-region):
(org-toggle-fixed-width):
* lisp/ox.el (org-export-expand-include-keyword): Use
  `current-indentation' instead.
2018-05-09 01:26:31 +02:00
Nicolas Goaziou 0c03971b09 org-list: Avoid unnecessary call to `org-in-item-p'
* lisp/org-list.el (org-list-insert-item): Compute item containing POS
  based on the list structure instead of the buffer.
2018-05-07 23:23:12 +02:00
Kyle Meyer 1dbc506086 Merge branch 'maint' 2018-05-06 02:33:55 -04:00
Kyle Meyer 732aa477b0 Update version keyword 2018-05-06 02:28:09 -04:00
Nicolas Goaziou e8a4f39e73 Merge branch 'maint' 2018-05-04 00:26:37 +02:00
Nicolas Goaziou 064caac937 ox-html: Make use of :html-preamble/postamble-format
* lisp/ox-html.el (org-html--build-pre/postamble): Use
`:html-preamble-format' and `:html-postamble-format' instead of
relying on the global variables.

Reported-by: Brady Trainor <mail@bradyt.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00073.html>
2018-05-04 00:24:36 +02:00
Carsten Dominik ee336b8cf7 Fix typo in docstring 2018-05-03 09:25:56 +02:00
Nicolas Goaziou b148cb0864 Merge branch 'maint' 2018-05-02 23:55:12 +02:00
Nicolas Goaziou 631c4b703e org-src: Clear overlay in Org buffer after major mode change
* lisp/org-src.el (org-src--allow-write-back):
(org-src--auto-save-timer):
(org-src--babel-info):
(org-src--beg-marker):
(org-src--block-indentation):
(org-src--end-marker):
(org-src--from-org-mode):
(org-src--overlay):
(org-src--preserve-indentation):
(org-src--remote):
(org-src--saved-temp-window-config):
(org-src--source-type):
(org-src--tab-width): Define as local and permanent variable.

(org-src--edit-element):
(org-edit-src-code):
(org-edit-inline-src-code): Use `setq' instead of `setq-local'.

When major mode is changed in an edit buffer, the variables above
would be cleared and the overlay in the source buffer could not be
removed anymore.
2018-05-02 23:52:35 +02:00
Nicolas Goaziou eacf403172 org-src: Do not use `setq-local' when not necessary
* lisp/org-src.el (org-src--contents-for-write-back):
(org-src-mode):
(org-src-mode-configure-edit-buffer): Use `setq' instead of
`setq-local' on variable automatically buffer-local when set.
2018-05-02 23:35:00 +02:00
Nicolas Goaziou cac45d5469 ox-beamer: Fix `org-beamer-select-environment'
* lisp/ox-beamer.el (org-beamer-select-environment): Fix thinko.

The error prevents the function to complete: only the tag is added,
not the property.
2018-05-01 23:27:37 +02:00
Nicolas Goaziou 8efcb62dc4 org-src: Add association between beamer and `latex-mode'
* lisp/org-src.el (org-src-lang-modes): Add an entry for "beamer".
  Improve docstring.
2018-05-01 23:17:40 +02:00
Nicolas Goaziou 9ab45860a6 Merge branch 'maint' 2018-05-01 15:06:57 +02:00
Nicolas Goaziou 80eb69b648 org-list: Proper error message when trying to indent top level item
* lisp/org-list.el (org-list-struct-indent): Return proper error
  message upon trying to indent a top-level item.  Use `user-error'.
* testing/lisp/test-org-list.el (test-org-list/indent-item): Add test.
2018-05-01 15:06:08 +02:00
Nicolas Goaziou ede4b999b8 Silence byte-compiler 2018-04-30 14:23:26 +02:00
Nicolas Goaziou 4a3c1a414b org-macs: Silence byte-compiler 2018-04-30 13:59:34 +02:00
Nicolas Goaziou 6d4e0b3dd1 Move `org-no-popups' to "org-macs.el"
* lisp/org-compat.el (org-no-popups): Move function...
* lisp/org-macs.el : ... here.
2018-04-30 13:58:25 +02:00
Nicolas Goaziou 5c12c21a73 org-capture: Narrow to current captured row
* lisp/org-capture.el (org-capture-place-table-line): Narrow to
  current captured row and obey :unnarrowed property, like every other
  target type.
2018-04-30 11:42:01 +02:00
Nicolas Goaziou cbb48611ef org-capture: Fix aborting a captured row
* lisp/org-capture.el (org-capture-place-table-line): Add missing
  `org-capture-mark-kill-region'.
2018-04-30 01:01:54 +02:00
Nicolas Goaziou ab53ee2c3d org-capture: Fix capturing in a table
* lisp/org-capture.el (org-capture-place-table-line): Rewrite function.
* testing/lisp/test-org-capture.el (test-org-capture/table-line): New
  test.
2018-04-30 00:52:57 +02:00
Bastien 6dea0de7ca org.el: Add a new `org-browse-news' menu entry
* lisp/org.el (org-browse-news): New command to browse the
news for the latest major release.
(org-org-menu): New menu entry to use the new command.

Thanks to Thomas Dye and Tim Cross for suggesting this.
2018-04-30 00:27:16 +02:00
Bastien e11613b1c5 org.el: Add missing modules
* lisp/org.el (org-modules): Add missing modules.
2018-04-30 00:20:34 +02:00
Bastien 5c9bab29d4 Merge branch 'master' of code.orgmode.org:bzg/org-mode 2018-04-29 23:39:55 +02:00
Bastien 4697a19f6f org.el: Enhance a docstring
* lisp/org.el (org-babel-load-languages): Enhance docstring.
2018-04-29 23:39:32 +02:00
Nicolas Goaziou 70fc172191 Mark `org-file-remote-p' as obsolete
* lisp/org.el (org-file-remote-p): Move function...
* lisp/org-compat.el: ... here.
* lisp/ox.el (org-export--prepare-file-contents):
(org-export-file-uri): Use `file-remote-p'.
2018-04-29 16:28:25 +02:00
Nicolas Goaziou bc92f734cf org-macro: Remove unnecessary `declare-function' 2018-04-29 12:26:59 +02:00
Nicolas Goaziou 722f8a517f org-macs: Re-order sections alphabetically 2018-04-29 12:09:34 +02:00
Nicolas Goaziou 3c013ba24d Silence byte-compiler 2018-04-29 12:03:17 +02:00
Nicolas Goaziou 9d8aade7ec Mark `org-with-silent-modifications' as obsolete
* lisp/org-clock.el (org-clock-sum):
* lisp/org-colview.el (org-columns--display-here):
(org-columns-remove-overlays):
(org-columns-quit):
(org-columns-edit-value):
(org-columns--compute-spec):
(org-columns-compute-all):
(org-agenda-colview-compute):
* lisp/org-indent.el (org-indent-remove-properties):
(org-indent-add-properties):
* lisp/org.el (org-sort-entries):
(org-refresh-properties):
(org-refresh-category-properties):
(org-refresh-stats-properties):
(org-agenda-prepare-buffers): Do not use
`org-with-silent-modifications'.
2018-04-29 12:02:01 +02:00
Nicolas Goaziou a2994cb005 Mark "org-version-check" obsolete
* lisp/org-compat.el (org-version-check): Mark as obsolete.
(org-no-popups):
* testing/examples/babel.org: Remove use of `org-version-check'.
2018-04-29 11:54:40 +02:00
Nicolas Goaziou 31afe4b718 Move window-related function to "org-macs.el"
* lisp/org.el (org-switch-to-buffer-other-window):
* lisp/org-compat.el (org-fit-window-to-buffer): Move functions...
* lisp/org-macs.el: ... here.
2018-04-29 10:31:24 +02:00
Nicolas Goaziou 4d568fc83c Move `org-parse-time-string' to "org-macs.el"
* lisp/org.el (org-parse-time-string): Move function...
* lisp/org-macs.el : ... here.  Remove obsolete FIXME.  Improve
  docstring.
2018-04-29 10:26:41 +02:00
Nicolas Goaziou 298eaa1c32 org-agenda: Fix last commit
* lisp/org-agenda.el (org-agenda-align-tags): Fix thinko in last
  commit.
2018-04-29 10:03:31 +02:00
Nicolas Goaziou 031b75f500 org-agenda: Fix tags alignment
* lisp/org-agenda.el (org-agenda-align-tags): Fix regexp.  Improve
  docstring.

The regression was introduced in "Use `org-tag-line-re'".

Reported-by: Xu Chunyang <mail@xuchunyang.me>
<http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00587.html>
2018-04-29 09:57:33 +02:00
Nicolas Goaziou cc9ae41738 Mark `org-preserve-lc' as obsolete
* lisp/org-macs.el (org-preserve-lc): Move function...
* lisp/org-compat.el (org-preserve-lc): ... here.

The function is no longer used in code base.
2018-04-29 00:44:26 +02:00
Nicolas Goaziou 89071f287f org-table: Fix failing tests
* lisp/org-table.el (org-table-copy-region): Preserve return value.
  Sligthly improve docstring.
2018-04-29 00:31:35 +02:00
Nicolas Goaziou f77f5b963d Add :safe keyword to `org-hide-emphasis-markers'
* lisp/org.el (org-hide-emphasis-markers): Add :safe keyword.
2018-04-29 00:19:55 +02:00
Nicolas Goaziou 0c58605f2f org-compat: Silence byte-compiler 2018-04-29 00:18:59 +02:00
Nicolas Goaziou c6d717cc89 Slightly speed up `org--align-tags-here'
* lisp/org.el (org--align-tags-here): Check if tags are already at the
  correct column before messing with the buffer.
2018-04-29 00:11:24 +02:00
Nicolas Goaziou 8785052735 `org-set-tags' cleans tag even when new tags are identical
* lisp/org.el (org-set-tags): Clean old tags unconditionally.

Even if the tags are the same, the line could contain noise, e.g.,
blanks after the tags, that could be cleaned up anyway.
2018-04-29 00:11:24 +02:00
Nicolas Goaziou 1615261cdc Preserve point when setting or aligning tags
* lisp/org.el (org--align-tags-here):
(org-set-tags-command):
(org-align-tags): Preserve point.
* testing/lisp/test-org.el (test-org/set-tags-command): Add test.
2018-04-28 23:45:04 +02:00
Nicolas Goaziou 7aadf4fe8c Improve `org-fix-tags-on-the-fly'
* lisp/org.el (org-fix-tags-on-the-fly): Improve docstring.  Skip more
  cases.
2018-04-28 23:45:04 +02:00
Nicolas Goaziou 4c13d0a1a8 Do not load Org Tempo by default
* lisp/org.el (org-modules): Do not load Org Tempo by default.

Org Tempo is a backward compatible substitute for the new expansion
mechanism.  It is only available for either die-hard "<s" users or
power users that need advanced templates.
2018-04-28 17:29:00 +02:00
Bastien 2b6004f57e org-agenda.el: Update the logic of regexp filters
* lisp/org-agenda.el (org-agenda-filter-by-regexp): Remove
existing regexp filter.  Only cumulate filters when called
with two prefix arguments.

It seems more common and reasonable to hit "=" to filter
then hit "=" again to remove the filter.  Cumulative filters
are still accessible through hitting `C-u C-u ='.
2018-04-28 14:12:37 +02:00
Bastien 2debcd5b22 org.el: New command `org-toggle-narrow-to-subtree'
* lisp/org.el (org-toggle-narrow-to-subtree): New command.
(org-speed-commands-default): Use the new command for the "s"
speed command.
2018-04-28 14:00:25 +02:00
Bastien f2af4a37a6 Fix commit 011f1c6 2018-04-28 13:53:06 +02:00
Bastien 0f83eac078 org.el: Enhance messages when (un)setting timestamps
* lisp/org.el (org--deadline-or-schedule): Enhance messages.
2018-04-28 13:31:45 +02:00
Bastien ed50e13e91 org-agenda.el: Only remove agenda restriction if it exists
* lisp/org-agenda.el (org-agenda-remove-restriction-lock):
Only remove agenda restriction if it exists.
2018-04-28 13:02:45 +02:00
Bastien 4c14e0d1f2 org.el: New speed command "k" to kill the subtree at point
* lisp/org.el (org-speed-commands-default): Add "k" to kill
the subtree at point.
2018-04-28 12:57:15 +02:00
Bastien 5c8cb1e733 Add messages for org-table-copy-region' and org-copy-visible'
* lisp/org-table.el (org-table-copy-region):
* lisp/org.el (org-copy-visible): Add a message.
2018-04-28 12:52:20 +02:00
Bastien b5b7bb8446 org.el: Display a message when a checkbox could not be updated
* lisp/org.el (org-ctrl-c-ctrl-c): Display a message when the
checkbox item at point could not be updated.

* lisp/org-list.el (org-list-write-struct): Return the updated
structure.
2018-04-28 12:43:14 +02:00
Bastien 1933d9ef26 org-clock.el (org-clock-jump-to-current-clock): Tiny enhancements
* lisp/org-clock.el (org-clock-jump-to-current-clock): Add a
docstring, do not use as a command and throw a user error
instead of an error when no clock is active.
2018-04-28 12:23:26 +02:00
Bastien 8f572aa23b Merge branch 'master' of code.orgmode.org:bzg/org-mode 2018-04-28 12:11:08 +02:00
Bastien 011f1c6181 Let `org-agenda-set-restriction-lock' remove restriction at point
* lisp/org-compat.el (org-speedbar-set-agenda-restriction):
* lisp/org-agenda.el (org-agenda-set-restriction-lock):
If there is an agenda restriction at point, remove it.

* doc/org-manual.org:
* etc/ORG-NEWS: Document the new feature.
2018-04-28 12:09:56 +02:00
Marco Wahl 2e2b083024 org-faces: Complete docstring for org-quote, org-verse
* lisp/org-faces.el (org-quote, org-verse): Note dependency on
  `org-fontify-quote-and-verse-blocks' in docstring.
* lisp/org-faces.el (org-block): Remove non-existant dependency on
  `org-fontify-quote-and-verse-blocks' from docstring.

This change emerged from question
https://emacs.stackexchange.com/questions/41182/change-background-color-of-quote-block/41260
2018-04-28 09:50:51 +02:00
Bastien 26f54050b6 Merge branch 'master' of code.orgmode.org:bzg/org-mode 2018-04-28 08:06:20 +02:00
Bastien 39b9a12bab org.el: Enhance a few docstrings
* lisp/org.el (org-structure-template-alist)
(org--insert-structure-template-mks)
(org--insert-structure-template-unique-keys)
(org-insert-structure-template): Enhance docstrings.
2018-04-28 08:05:54 +02:00
Nicolas Goaziou eab65c9cf8 Fix colview-related failing tests
* lisp/org-compat.el (org-line-number-display-width): New function.
* lisp/org-colview.el (org-columns--display-here-title): Use new
  function.
2018-04-28 02:17:44 +02:00
Nicolas Goaziou 031f362352 Fix `org-toggle-tag'
* lisp/org.el (org-toggle-tag): Fix weird behavior with inherited tags.

* testing/lisp/test-org.el (test-org/toggle-tag): Add test.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00537.html>
2018-04-28 02:10:44 +02:00
Bastien d48bff37ad Merge branch 'master' of code.orgmode.org:bzg/org-mode 2018-04-28 00:59:25 +02:00
Bastien 4e97d8621e org-tempo.el: Enhance a few docstrings
* lisp/org-tempo.el (org-tempo, org-tempo-keywords-alist)
(org-tempo-setup, org-tempo-add-templates)
(org-tempo--include-file): Enhance docstrings.
2018-04-28 00:46:25 +02:00
Nicolas Goaziou 9a1f208223 Merge branch 'maint' 2018-04-27 17:13:40 +02:00
Nicolas Goaziou 388254e0d0 Revert "org.el: Fix bug when links contain special characters"
This reverts commit b1d084c1ab.

The fix introduces a bug where `org-edit-special' throws an error on
INCLUDE keywords.
2018-04-27 17:12:18 +02:00
Bastien b08245a74e Merge branch 'maint' 2018-04-27 12:32:30 +02:00
Bastien e8c40b7a07 org.el: Update version keyword to 9.1.12
Thanks to Nicolas for reminding me.
2018-04-27 12:31:13 +02:00
Bastien 1a5ca5fa83 Merge branch 'maint' 2018-04-27 03:17:44 +02:00
Bastien 5d0792057d Fix commit f21fb8a 2018-04-27 03:17:12 +02:00
Bastien 8b6e5d5f2e Revert "org-agenda.el: Fix bug when getting the warning delay of a deadline"
This reverts commit f21fb8ad3b.
2018-04-27 03:09:28 +02:00