* 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.
* 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.
* org-table.el (org-table-sort-lines): Fix case sensitive sorting,
improve docstring.
* test-org-table.el (test-org-table/sort-lines): Enforce C locale when
testing alphabetic sorting.
‘sort-subr’ ignores ‘sort-fold-case’ when a predicate is provided. To
correctly handle case-sensitivity, we now bake it into the predicate.
Since we are now sorting according to the user’s locale, WITH-CASE
will not make a difference in most instances, since most locales
always sort case-insensitively (cf. how GNU sort ignores the ‘-f’
switch). We now mention this in the function docstring.
In order to meaningfully test case-sensitive sorting, we now enforce
the C locale in the respective unit test.
* lisp/org-table.el (org-table--shrunk-field): Fix function when on
a hline.
* testing/lisp/test-org-table.el (test-org-table/shrunk-columns): Add
tests.
Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00231.html>
* lisp/org-table.el (org-table-with-shrunk-field): New macro.
(org-table-get-field):
(org-table-toggle-column-width): Use new macro.
(org-table--shrunk-field): Update function.
(org-table--shrink-field): When there is a width cookie, leave first
characters editable.
* lisp/org.el (org-self-insert-command):
(org-delete-backward-char):
(org-delete-char): Small refactoring. Handle shrink overlays.
* testing/lisp/test-org-table.el (test-org-table/toggle-column-width):
Update tests.
* lisp/org-table.el (org-table-current-column): Return a meaningful
value also on hlines.
(org-table-toggle-column-width): Use `org-table-current-column'
instead of re-inventing wheel.
* testing/lisp/test-org-table.el (test-org-table/current-column): New
test.
* lisp/org-table.el (org-table-recalculate): Return an error when the
formula cannot create a necessary column.
(org-table-formula-create-columns): Fix docstring.
* testing/lisp/test-org-table.el (test-org-table/field-formula-outside-table):
Fix tests.
* lisp/org-table.el (org-table-check-inside-data-field): Add optional
argument.
(org-table-find-dataline): Do not call `org-at-table-p' needlessly.
(org-table-delete-column):
(org-table-move-column):
(org-table-copy-region):
(org-table-eval-formula): Use new argument.
(org-table-force-dataline): Small refactoring.
This patch limits the number of calls to `org-at-table-p'.
* lisp/org.el (org-return): Split the table before first column or
after last one.
* lisp/org-table.el (org-table-next-row): Remove code handling split.
* testing/lisp/test-org.el (test-org/return): Add test.
* lisp/org-table.el (org-table-insert-column): Insert new column to
the right instead of the left.
* testing/lisp/test-org-table.el (test-org-table/insert-column): New
test.
* lisp/org-table.el (org-table-recalculate): Fix typo in existing
`remove-text-properties' call instead of adding a new one.
Also, cleaning property before processing formulas is more robust,
e.g., if last process raised an error.
* lisp/org-table.el (org-table-recalculate): Clean `:org-untouchable'
property once we no longer need it.
* testing/lisp/test-org-table.el (test-org-table/formula-priority):
New test.
Reported-by: Ruy Exel <ruyexel@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00159.html>
* lisp/org-table.el (org-table-shrunk-column-indicator):
* lisp/org.el (org-startup-shrink-all-tables): Update Org version to 9.2
and Emacs version to 27.1.
(customize-package-emacs-version-alist): Map Org 9.2 to Emacs 27.1.
Emacs 26.1 is now in the pretest phase, and the version for Emacs's
development branch is 27.1.