Commit Graph

381 Commits

Author SHA1 Message Date
Nicolas Goaziou 0155441358 Merge branch 'maint' 2018-01-19 18:22:00 +01:00
Tim Landscheidt b289a65be7 Use https for links to orgmode.org
TINYCHANGE
2018-01-19 18:14:58 +01:00
Nicolas Goaziou 000b943ebd Re-order visibility functions in "org.el"
* lisp/org-macs.el (org-outline-overlay-data):
(org-set-outline-overlay-data): Moved from "org.el".
* lisp/org.el (org-remove-empty-overlays-at):
(org-show-empty-lines-in-parent):
(org-files-list):
(org-entry-beginning-position):
(org-entry-end-position):
(org-subtree-end-visible-p):
(org-first-headline-recenter):
(org-flag-region):
(org-show-entry):
(org-show-children):
(org-show-subtree):
(org-hide-block-toggle-maybe):
(org-hide-block-toggle):
(org-hide-block-toggle-all):
(org-hide-block-all):
(org-cycle-hide-drawers):
(org-flag-drawer):
(org-previous-block):
(org-next-block): Move functions.
2018-01-13 14:15:53 +01:00
Kyle Meyer d94f7024bc Merge branch 'maint' 2018-01-07 00:28:35 -05:00
Kyle Meyer 3e1641ef0a Update copyright years 2018-01-07 00:27:54 -05:00
Nicolas Goaziou fdb2eb6701 Preserve file local variables during some operations
* lisp/org-macs.el (org-preserve-local-variables): New macro.
* lisp/org-footnote.el (org-footnote--clear-footnote-section):
(org-footnote--goto-local-insertion-point):
(org-footnote-create-definition):
(org-footnote-delete):
(org-footnote-renumber-fn:N):
(org-footnote-sort):
(org-footnote-normalize):
* lisp/org.el (org-move-subtree-down):
(org-copy-subtree):
(org-sort-entries):
(org-refile): Use new macro.
* testing/lisp/test-org-footnote.el (test-org-footnote/normalize):
(test-org-footnote/delete):
(test-org-footnote/sort):
(test-org-footnote/normalize):
* testing/lisp/test-org.el (test-org/sort-entries): Add tests.

Operations affected include copying, killing, refiling, archiving and
moving subtrees.  It also affects sorting, creating and deleting
footnotes.
2017-12-18 16:01:41 +01:00
Nicolas Goaziou 6f89177ee6 Move `org-unlogged-message' to "org-macs.el"
* lisp/org.el (org-unlogged-message): Move function to...
* lisp/org-macs.el: ... here.
2017-12-10 23:37:59 +01:00
Nicolas Goaziou 04e0532ef5 Merge branch 'maint' 2017-11-15 18:59:05 +01:00
Nicolas Goaziou 696ec60341 org-macs: Fix typos in docstrings
* lisp/org-macs.el (org-split-string):
(org-string-width): Fix typo in docstring.
2017-11-15 18:58:44 +01:00
Nicolas Goaziou 966af419f9 Merge branch 'maint' 2017-11-15 18:14:44 +01:00
Nicolas Goaziou 40f73953f6 Fix `org-string-display'
* lisp/org-macs.el (org-string-display): Preserve original string's
  display property when computing displayed width.

* testing/lisp/test-org-macs.el (test-org/string-display): Add test.

Reported-by: Ruy Exel <ruyexel@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00160.html>
2017-11-15 18:13:34 +01:00
Nicolas Goaziou 87116700e6 Move some invisibility check functions to "org-macs.el"
* lisp/org.el (org-invisible-p):
(org-truely-invisible-p):
(org-invisible-p2): Move...

* lisp/org-macs.el: ... there.
2017-10-22 16:20:58 +02:00
Nicolas Goaziou fc551191a7 Silence byte-compiler 2017-10-22 15:41:02 +02:00
Nicolas Goaziou 59d21881b1 Revert "Move `org-key' and `org-defkey' into "org-macs.el""
This reverts commit 7f56a9920f.

`org-key' is specific to Org keybinding, therefore not generic enough
to fit in "org-macs.el". So is `org-defkey'.
2017-10-22 15:38:35 +02:00
Nicolas Goaziou 486331e323 Move some generic functions into "org-macs.el"
* lisp/org.el (org-do-wrap): Remove function.
(org-base-buffer):
(org-find-base-buffer-visiting):
(org-overlay-display):
(org-overlay-before-string):
(org-find-overlays):
(org-reverse-string):
(org-shorten-string):
(org-remove-tabs):
(org-wrap):
(org-remove-indentation):
(org-do-remove-indentation):
(org-uniquify-alist):
(org-combine-plists):
(org-skip-whitespace):
(org-in-regexp):
(org-point-in-group):
(org-get-at-eol):
(org-find-text-property-in-string):
(org-display-warning):
(org-eval):
* lisp/org-compat.el (org-add-props): Move ...

* lisp/org-macs.el: ... there.
(org--do-wrap): New function.
2017-10-22 15:34:26 +02:00
Nicolas Goaziou 7f56a9920f Move `org-key' and `org-defkey' into "org-macs.el"
* lisp/org.el (org-key):
(org-defkey): Move...

* lisp/org-macs.el: ... there.
2017-10-22 15:05:48 +02:00
Nicolas Goaziou 7ac8883394 Move `org-completing-read' into "org-macs.el"
* lisp/org-macs.el (org-completing-read): Moved here...
* lisp/org.el: ... from there.
2017-10-17 10:11:21 +02:00
Nicolas Goaziou 45a1918efe Move `org-xor' into "org-macs.el"
* lisp/org.el (org-xor): Move...
* lisp/org-macs.el: ... there.
2017-10-17 09:37:34 +02:00
Nicolas Goaziou 6e7d152699 Move `org-get-at-bol' into "org-macs.el"
* lisp/org.el (org-get-at-bol): Move...
* lisp/org-macs.el: ... here.
2017-09-18 21:26:18 +02:00
Nicolas Goaziou 32890ea5a5 Move `org-uniquify' into "org-macs.el"
* lisp/org.el (org-uniquify): Move function...
* lisp/org-macs.el: ... here.
2017-09-18 21:25:15 +02:00
Nicolas Goaziou 794dfaa6e0 org-macs: Re-order functions and macros 2017-09-18 21:24:23 +02:00
Nicolas Goaziou 442a2b430d Move `org-trim' in "org-macs.el"
* lisp/org.el (org-trim): Move function...
* lisp/org-macs.el: ... here.
2017-09-18 21:07:13 +02:00
Paul Eggert ff0dcf52a5 Backport commit bc511a64f from Emacs
Prefer HTTPS to FTP and HTTP in documentation
bc511a64f6da9ab51acc7c8865e80c4a4cb655c2
Paul Eggert
Wed Sep 13 15:54:37 2017 -0700
2017-09-17 00:28:38 -04:00
Nicolas Goaziou bd9f63a22a Merge branch 'maint' 2017-08-07 10:53:22 +02:00
Nicolas Goaziou e8fe579a17 Silence byte-compiler
* lisp/org-macs.el (org-unique-local-variables):
(org-get-local-variables):
(org-clone-local-variables): Moved from "org.el".
2017-08-07 10:52:37 +02:00
Nicolas Goaziou 90f606d9c2 org-macs: Fix `org-string-width' with `display' property
* lisp/org-macs.el (org-string-display): New function.
(org-string-width): Use new function.

* testing/lisp/test-org-macs.el: New file.
2017-07-28 12:15:47 +02:00
Nicolas Goaziou 9a60db0ec3 Move `org-string-width' to "org-macs.el"
* lisp/org.el (org-string-width): Move from here...
* lisp/org-macs.el (org-string-width): ... to here.
2017-07-27 15:23:31 +02:00
Nicolas Goaziou f776e65373 Move `org-split-string' to "org-macs.el"
* lisp/org.el (org-split-string): Move the function...
* lisp/org-macs.el (org-split-string): ... here.  Also clarify
  docstring with regards to `split-string'.
2017-07-27 13:39:52 +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
Kyle Meyer 713f785017 Update copyright years 2017-01-05 20:19:37 -05:00
Nicolas Goaziou 7856018d78 org-macs: Tiny refactoring
* lisp/org-macs.el (org-match-line): Use (beginning-of-line) instead
  of (goto-char (point-at-bol)).
2016-12-15 00:02:58 +01:00
Nicolas Goaziou 7612fb2b9a Remove compatibility code for subr-x.el defsubsts
* lisp/org-compat.el: Remove compatibility code for subr-x.el defsubsts.
* lisp/org-footnote.el (org-footnote-normalize-label):
* lisp/org-macs.el (org-unbracket-string): Avoid using subr-x.el
  functions.
2016-09-06 00:08:32 +02:00
Aaron Ecay a3adfb062b Introduce new function for removing paired delimiters from string.
* lisp/org-macs.el (org-unbracket-string): New function.
* lisp/ob-core.el (org-babel-strip-quotes):
* lisp/ob-lua.el (org-babel-lua-read-string):
* lisp/ox-beamer.el (org-beamer--normalize-argument): Use it.
2016-09-03 01:55:45 +01:00
Nicolas Goaziou ba4831bba8 Fix `org-no-properties' called with an optional argument
* lisp/org-macs.el (org-no-properties): Fix function so that optional
  argument `restricted' is not ignored.
2016-06-23 15:55:39 +02:00
Nicolas Goaziou 89d2006e84 Remove `org-substitute-posix-classes'
* lisp/org-macs.el (org-substitute-posix-classes): Remove function.

This function is unused throughout the code base and not part of any
public API.
2016-06-23 15:28:45 +02:00
Nicolas Goaziou aae0b22a0c Deprecate `org-format-seconds' in favor of `format-seconds'
* lisp/org-macs.el (org-format-seconds): Remove function.
* lisp/org-compat.el (org-format-seconds): Mark function as an obsolete
  alias.
* lisp/org-table.el (org-table-time-seconds-to-string):
* lisp/ox.el (org-export-stack-refresh): Apply removal.
2016-06-23 15:26:17 +02:00
Nicolas Goaziou ee7aa9878f Deprecate `org-no-warnings' in favor of `with-no-warnings'
* lisp/org-macs.el (org-no-warnings): Rewove macro.
* lisp/org-compat.el (org-no-warnings): Mark `org-no-warnings' as
  obsolete.
* contrib/lisp/org-contacts.el (defvar):
* contrib/lisp/org-wl.el (org-wl-open):
* lisp/org-agenda.el (defvar):
(org-anniversary):
(org-cyclic):
(org-block):
(org-date):
* lisp/org-bbdb.el (defvar):
* lisp/org-clock.el (org-clock-out):
(org-clock-cancel):
* lisp/org-mouse.el (org-mouse-show-context-menu):
* lisp/org.el (org-modify-ts-extra):
(org-order-calendar-date-args): Small refactoring.
* lisp/ox-odt.el (org-odt-htmlfontify-string):
2016-06-23 15:20:32 +02:00
Nicolas Goaziou 28ba698262 org-macs: Remove `org-replace-match-keep-properties'
* lisp/org-macs.el (org-replace-match-keep-properties): Remove function.

This function is unused through the code base and doesn't specifically
belong to a public API.
2016-06-23 15:13:14 +02:00
Nicolas Goaziou 999f224299 Deprecate `org-called-interactively-p' in favor of `called-interactively-p'
* lisp/org-compat.el (org-called-interactively-p): Make it an obsolete
  alias for `called-interactively-p'.
* lisp/org-macs.el (org-called-interactively-p): Remove function.
* contrib/lisp/org-expiry.el (org-expiry-insinuate):
(org-expiry-deinsinuate):
(org-expiry-process-entry):
(org-expiry-process-entries):
(org-expiry-archive-subtree):
(org-expiry-add-keyword):
* lisp/ob-core.el (org-babel-expand-src-block):
(org-babel-sha1-hash):
* lisp/org-agenda.el (org-toggle-sticky-agenda):
(org-agenda-write):
(org-agenda-dim-blocked-tasks):
(org-agenda-redo):
(org-agenda-show-1):
(org-agenda-set-tags):
* lisp/org-lint.el (org-lint):
* lisp/org-table.el (org-table-blank-field):
(org-table-current-column):
(org-table-current-dline):
(org-table-sort-lines):
(org-table-sum):
(org-table-rotate-recalc-marks):
(org-table-eval-formula):
(orgtbl-send-table):
* lisp/org.el (org-mode):
(org-copy-subtree):
(org-paste-subtree):
(org-store-link):
(org-todo):
(org-occur):
(org-create-math-formula):
(org-toggle-inline-images):
(org-mark-subtree):
(org-mark-element): Apply removal.
2016-06-23 15:08:03 +02:00
Nicolas Goaziou 75f61e11c3 Remove `org-inhibit-invisibility'
* lisp/org-macs.el (org-inhibit-invisibility): Remove function.
* lisp/org.el (org-set-tags): Apply removal.
2016-06-23 14:28:20 +02:00
Nicolas Goaziou 5721fd890a Remove `org-maybe-intangible'
* lisp/org-macs.el (org-maybe-intangible): Remove macro.
* lisp/org.el (org-activate-bracket-links):
(org-hide-wide-columns): Apply removal.
2016-06-23 14:25:51 +02:00
Nicolas Goaziou ff80654617 Mark `org-bound-and-true-p' as obsolete
* lisp/org-macs.el (org-bound-and-true-p): Remove macro.
* lisp/org-compat.el (org-bound-and-true-p): Deprecated alias for
  `bound-and-true-p'.
* lisp/ob-core.el (org-babel-confirm-evaluate):
* lisp/org-agenda.el (org-agenda-write):
(org-agenda-add-entry-text):
(org-agenda-todo):
* lisp/org-clock.el (org-clocktable-defaults):
(org-clocktable-write-default):
* lisp/org-colview.el (org-columns):
(org-columns--compute-spec):
(org-agenda-columns):
* lisp/org-indent.el (org-indent-set-line-properties):
* lisp/org-inlinetask.el (org-inlinetask-fontify):
* lisp/org-mobile.el (org-mobile-write-agenda-for-mobile):
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):
(pcomplete/org-mode/file-option/infojs_opt):
* lisp/org-src.el (org-src-mode-configure-edit-buffer):
(org-edit-table.el):
* lisp/org.el (org-store-link):
(org-refile):
(org-get-export-keywords):
(org-set-tags):
(org-order-calendar-date-args):
(org-mode-restart):
(org-tbl-menu):
(org-beginning-of-line):
(org-end-of-line):
(org-kill-line):
(org-truely-invisible-p):
(org-remove-flyspell-overlays-in): Use `bound-and-true-p' instead of
`org-bound-and-true-p'.
2016-06-23 14:23:52 +02:00
Nicolas Goaziou 23d84285bf Deprecate `org-char-to-string' in favor of `char-to-string'
* lisp/org-macs.el (org-char-to-string): Remove function.
* lisp/org-compat.el (org-char-to-string): Declare function as obsolete.
* lisp/org.el (org-link-unescape-compound): Apply removal.
2016-06-23 14:10:34 +02:00
Nicolas Goaziou d13b0745dc Mark a few functions as obsolete
* lisp/ob-R.el (org-babel-variable-assignments:R):
* lisp/ob-ref.el (org-babel-ref-goto-headline-id):
* lisp/org-agenda.el (org-agenda-prepare-window):
(org-agenda-switch-to):
* lisp/org-capture.el (org-capture-goto-target):
* lisp/org-clock.el (org-clock-goto):
(org-clock-special-range):
* lisp/org-ctags.el (org-ctags-visit-buffer-or-file):
* lisp/org-eshell.el (org-eshell-open):
* lisp/org-feed.el (org-feed-show-raw-feed):
* lisp/org-id.el (org-id-goto):
* lisp/org-irc.el (org-irc-visit-erc):
* lisp/org-macs.el (org-string-nw-p):
* lisp/org-mobile.el (org-mobile-apply):
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org.el (org-get-location):
(org-tree-to-indirect-buffer):
(org-mark-ring-goto):
(org-refile):
(org-add-log-note):
(org-revert-all-org-buffers):
(org-switchb):
(org-cycle-agenda-files):
(org-submit-bug-report):
(org-goto-marker-or-bmk):
* lisp/ox-html.el (org-html-htmlize-generate-css): Silence byte
  compiler.

The following functions are marked as obsolete:
- `org-string-match-p'
- `org-number-sequence'
- `org-floor*'
- `org-pop-to-buffer-same-window'
- `org-delete-directory'
- `org-buffer-narrowed-p'
2016-06-23 10:00:00 +02:00
Nicolas Goaziou 994fe3e566 org-macs: Silence byte-compiler
* lisp/org-macs.el (org-save-outline-visibility): Remove unused symbol.
2016-06-21 23:02:35 +02:00
Nicolas Goaziou 5fcb15d976 org-macs: Use lexical binding
* lisp/org-macs.el (org-save-outline-visibility): Small refactoring.
2016-06-21 22:56:46 +02:00
Nicolas Goaziou 0ac099a6f8 Remove final parts of XEmacs compatibility code
* lisp/org-compat.el: Declare `org-add-hook', `org-decompose-region',
  `org-detach-overlay', `org-file-equal-p', `org-float-time',
  `org-indent-line-to', `org-indent-to-column', `org-looking-at-p',
  `org-looking-back', `org-propertize', `org-re' and
  `org-select-frame-set-input-focus' as obsolete.
(org-overlay-display, org-overlay-before-string, org-find-overlays):
Move to "org.el"
(org-xemacs-key-equivalents, org-xemacs-p): Remove variables.
(org-region-active-p): Drop XEmacs support.
(org-xemacs-without-invisibility): Remove macro.
(org-get-x-clipboard-compat): Remove function.
* lisp/org-macs.el (org-match-string-no-properties): Remove function.

* lisp/ob-core.el:
* lisp/org-agenda.el:
* lisp/org-archive.el:
* lisp/org-clock.el:
* lisp/org-colview.el:
* lisp/org-crypt.el:
* lisp/org-element.el:
* lisp/org-faces.el:
* lisp/org-feed.el:
* lisp/org-footnote.el:
* lisp/org-habit.el:
* lisp/org-id.el:
* lisp/org-indent.el:
* lisp/org-inlinetask.el:
* lisp/org-lint.el:
* lisp/org-list.el:
* lisp/org-mouse.el:
* lisp/org-pcomplete.el:
* lisp/org-src.el:
* lisp/org-table.el:
* lisp/org-timer.el:
* lisp/org.el:
* lisp/ox-ascii.el:
* lisp/ox-odt.el:
* lisp/ox.el:
* contrib/lisp/org-notify.el:
* contrib/lisp/ox-taskjuggler.el:
* contrib/lisp/org-wikinodes.el:
* testing/lisp/test-org-src.el:
* testing/lisp/test-org.el: Silence byte-compiler.
2016-05-26 13:56:25 +02:00
Nicolas Goaziou 4129ae6737 Remove some XEmacs compatibility layer
* lisp/ob-calc.el (calc-trail):
* lisp/ob-python.el (org-babel-python-mode):
* lisp/org-agenda.el (org-agenda-tags-column):
(org-agenda-show-new-time):
* lisp/org-clock.el (org-clock-update-mode-line):
(org-clock-put-overlay):
(org-clock-resolve):
* lisp/org-faces.el (org-faces):
* lisp/org-indent.el (org-indent-mode):
* lisp/org-macs.el (org-load-noerror-mustsuffix):
* lisp/org-table.el (orgtbl-setup):
* lisp/org.el (org-key):
(org-self-insert-cluster-for-undo):
(org-tags-column):
(org-emphasis-alist):
(org-mode):
(org-set-font-lock-defaults):
(org-cycle-internal-local):
(org-tree-to-indirect-buffer):
(org-set-frame-title):
(org-priority):
(org-set-tags):
(org-set-current-tags-overlay):
(org-toggle-time-stamp-overlays):
(org-display-custom-time):
(org-diary-to-ical-string):
(org--format-latex-make-overlay):
(org-dvipng-color):
(org-latex-color):
(org-mode-map):
(org-speed-commands-default):
(org-reload):
(org-display-warning):
(org-end-of-line):
* lisp/ox-man.el (org-man-inline-src-block):
* contrib/lisp/org-vm.el (org-vm-follow-link):
* contrib/lisp/ox-groff.el (org-groff-inline-src-block):
(org-groff-src-block): Remove some XEmacs compatibility layer.
2016-05-26 11:30:11 +02:00
Kyle Meyer 4925d5be7b Merge branch 'maint' 2016-05-15 19:00:30 -04:00
Paul Eggert 1f046ea4b1 Backport commit 65c8c7c from Emacs
* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-exp.el (org-element-context):
* lisp/ob-gnuplot.el (org-time-string-to-time)
(orgtbl-to-generic):
* lisp/ob-haskell.el (org-export-to-file):
* lisp/ob-latex.el (org-create-formula-image)
(org-latex-compile):
* lisp/ob-python.el (run-python):
* lisp/ob-tangle.el (org-link-escape, org-back-to-heading):
* lisp/org-colview.el (org-agenda-redo):
* lisp/org-feed.el (url-retrieve-synchronously):
* lisp/org-info.el (Info-find-node):
* lisp/org-list.el (org-previous-line-empty-p):
* lisp/org-macs.el (org-string-match-p):
* lisp/org.el (org-beamer-mode):
Fix prototype to match current definition.
* lisp/ob-comint.el (tramp-flush-directory-property):
* lisp/ob-tangle.el (org-babel-update-block-body):
* lisp/org-bibtex.el (org-babel-trim):
* lisp/org-pcomplete.el (org-export-backend-options):
* lisp/org-protocol.el (org-publish-get-project-from-filename):
Fix file name in declare-function.
* lisp/ob-comint.el (with-parsed-tramp-file-name)
* lisp/ob-core.el (with-parsed-tramp-file-name):
* lisp/org.el (org-beamer-mode):
Append ‘t’ to declare-function, since the declaration isn’t a defun.
* lisp/ob-core.el (org-save-outline-visibility):
Remove; not needed.
* lisp/ob-scheme.el (run-geiser, geiser-mode)
(geiser-eval-region, geiser-repl-exit):
* lisp/ox-org.el (htmlize-buffer):
Prepend "ext:" to file name, since it is not part of Emacs.
* lisp/org-gnus.el (nnimap-group-overview-filename):
Remove decl, since function was removed.
* lisp/org-macro.el (org-with-wide-buffer):
Omit unnecessary (and mismatching) decl.
* lisp/org-clock.el (calendar-iso-to-absolute):
Declare calendar-iso-to-absolute instead, since it is the
non-obsolete version of this function.
* lisp/org-compat.el (w32-focus-frame):
Remove decl, since function is now obsolete.

Pacify ‘make check-declare’
65c8c7cb96c14f9c6accd03cc8851b5a3459049e
Paul Eggert
Sat May 14 19:57:44 2016 -0700
2016-05-15 18:59:16 -04:00