org-mode/testing/lisp
Karthik Chikmagalur 9cce40c94f
org-link: Customizable preview API for arbitrary link types
Add a customizable preview API for arbitrary link types.  Make
inline image previews a part of the more universal org-link
preview feature.  Each link type can now be previewed differently
based on a new link parameter.

* lisp/ol.el (org-link-parameters, org-link-preview-batch-size,
org-link-preview-delay, org-link-preview--timer,
org-link-preview--queue, org-link-preview-overlays,
org-link-preview--get-overlays, org-link-preview--remove-overlay,
org-link-preview, org-link-preview-region,
org-link-preview--process-queue, org-link-preview-clear,
org-link-preview-file, org-display-remote-inline-images,
org-image-align, org--create-inline-image,
org-display-inline-image--width, org-image--align): Add new
commands `org-link-preview', `org-link-preview-region' and
`org-link-preview-clear' for creating link previews for any kind
of link.  Add new org-link parameter `:preview' for specifying how
a link type should be previewed.  This link parameter is a
function called asynchronously to place previes.  File links and
attachments are previewed using inline image previews as before.
Move image handling utilities from lisp/org.el to lisp/ol.el.

* testing/lisp/test-org-fold.el: Use `org-link-preview'.

* lisp/org.el (org-toggle-inline-images,
org-toggle-inline-images-command, org-display-inline-images,
org--inline-image-overlays, org-inline-image-overlays,
org-redisplay-inline-images, org-image-align,
org-display-inline-remove-overlay, org-remove-inline-images,
org-startup-with-inline-images, org-startup-with-link-previews,
org-startup-options): Obsolete and move
`org-toggle-inline-images', `org-display-inline-images' and
`org-redisplay-inline-images' to org-compat.  These are obsoleted
by `org-link-preview' and `org-link-preview-region'.  Remove
`org-toggle-inline-images-command'.  Move the other internal
functions to org-link.  Rename `org-startup-with-inline-images' to
`org-startup-with-link-previews'.  Add new STARTUP options for
link previews to `org-startup-options': "linkpreviews" and
"nolinkpreviews".

* lisp/org-plot.el (org-plot/redisplay-img-in-buffer): Modify to
use `org-link-preview'.

* lisp/org-keys.el: Bind `C-c C-x C-v' to new command
`org-link-preview', which has the same prefix arg behaviors as
`org-latex-preview'.  In addition to these, it supports numeric
prefix args 1 and 11 to preview links with descriptions at
point/region (with 1) and across the buffer (with 11).

* lisp/org-cycle.el (org-cycle-display-inline-images,
org-cycle-display-link-previews, org-cycle-inline-images-display,
org-cycle-inline-link-previews): Use `org-link-preview' and
`org-link-preview-region'.  Rename inline-images functions and user
options to their link-previews equivalents:

- `org-cycle-display-inline-images' to `org-cycle-display-link-previews'
- `org-cycle-inline-images-display' to `org-cycle-inline-link-previews'

* lisp/org-compat.el (org-display-inline-remove-overlay,
org--inline-image-overlays, org-remove-inline-images,
org-inline-image-overlays, org-display-inline-images,
org-toggle-inline-images):

* lisp/org-attach.el (org-attach-preview-file): Add new `:preview'
link parameter for links of type "attachment", set to the new
function `org-attach-preview-file'.
2024-11-27 19:34:26 +01:00
..
test-duplicates-detector.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
test-ob-C.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-R.el Add options to skip extra processing in org-babel-comint-with-output 2024-11-12 19:54:28 -08:00
test-ob-awk.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-calc.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-clojure.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-comint.el testing/lisp/test-ob-comint.el: Make test for echo filter 2024-03-29 12:11:18 +01:00
test-ob-emacs-lisp.el Update remaining copyright years 2024-01-06 15:55:18 -05:00
test-ob-eshell.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-exp.el org-babel-exp-code: Fix exporting src blocks with :var arguments 2024-06-06 14:44:01 +02:00
test-ob-fortran.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-haskell-ghci.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
test-ob-header-arg-defaults.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-ob-java.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-julia.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-lilypond.el testing: Delete useless ert tests 2023-09-17 12:48:36 +03:00
test-ob-lob.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-ob-lua.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-maxima.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-octave.el ob-core: Unify Org Babel related buffer names using constant variable 2024-07-16 19:09:45 +02:00
test-ob-perl.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-plantuml.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-ob-python.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
test-ob-ruby.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-scheme.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-sed.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-shell.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
test-ob-sql.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-sqlite.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ob-table.el org-sbe: Allow quoting string values 2023-02-23 12:29:18 +03:00
test-ob-tangle.el org-babel-expand-noweb-references: Add trialing newline after comments 2024-05-04 14:30:25 +03:00
test-ob.el org-babel-demarcate-block: Fix keeping BEGIN_SRC/END_SRC case 2024-08-14 11:02:18 +02:00
test-oc-basic.el oc-basic.el: Drop {...} when rendering Bibtex entries 2024-02-29 12:21:08 +03:00
test-oc.el org-cite-list-bibliography-files: Preserve relative bibliography paths 2023-05-02 14:47:56 +02:00
test-ol-bbdb.el testing: Fix file names in file headers 2024-03-13 15:35:30 +03:00
test-ol.el Do not use org-fold to hide link parts 2024-05-02 12:29:27 +03:00
test-org-agenda.el org-agenda: Fix multi-day ranges with non-nil `org-agenda-default-appointment-duration' 2024-06-09 14:25:58 +02:00
test-org-archive.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-org-attach-git.el * testing/lisp/test-org-attach-git.el: Avoid using global git config 2023-08-18 12:03:58 +03:00
test-org-attach.el org-element: Defer more when parsing headings and inlinetasks 2023-07-01 14:35:36 +03:00
test-org-capture.el test-org-capture/entry: Fix Emacs 27 compatibility 2024-06-18 18:09:21 +02:00
test-org-clock.el test-org-clock: Fix typo in test name 2024-06-01 17:10:58 -04:00
test-org-colview.el org-columns-compile-format: Fix regexp 2024-08-31 15:31:13 +02:00
test-org-ctags.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-org-datetree.el lisp/org-datetree.el: Allow datetrees with TODO, priority, tags 2023-01-21 12:29:32 +03:00
test-org-duration.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-org-element.el org-element-timestamp-parser: Allow time in diary sexp timestamps 2024-05-03 13:42:06 +03:00
test-org-feed.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-fold.el org-link: Customizable preview API for arbitrary link types 2024-11-27 19:34:26 +01:00
test-org-footnote.el org-footnote--collect-references: Fix infinite recursion 2024-11-23 20:44:07 +01:00
test-org-info.el ol-info: Define :insert-description function 2022-08-26 21:09:39 +08:00
test-org-inlinetask.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-org-lint.el org-lint: Remove checker for #+name with colon 2023-12-17 14:57:03 +01:00
test-org-list.el org-list-struct-apply-struct: Fix item contents breaking out of the item 2024-07-10 15:39:26 +02:00
test-org-macro.el test-org-macro.el: Add test for CVE-2024-30202 2024-05-06 15:55:00 +03:00
test-org-macs.el Remove test introduced in 190f47222 2024-07-22 21:01:20 +02:00
test-org-num.el test-org-num.el: Do not rely on fixed overlay order in `overlays-in' 2022-11-09 10:12:44 +08:00
test-org-pcomplete.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-org-protocol.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-org-src.el test-org-src.el: Work around `current-column' bug in older emacs 2023-07-10 11:19:31 +03:00
test-org-table.el orgtbl-to-generic: Retain special rows in code block table output 2024-07-10 15:54:44 +02:00
test-org-tempo.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-org-timer.el testing: Make all files use `lexical-binding` 2022-09-15 19:17:19 +08:00
test-org.el org-indent-line: Fix indentation inside src blocks with `electric-indent-mode' 2024-07-09 18:05:41 +02:00
test-ox-ascii.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ox-beamer.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ox-html.el ox-html: Add an ability to specify :html-head as a string or function 2024-07-07 17:24:01 +02:00
test-ox-icalendar.el ox-icalendar: Fix export of diary-style timestamps 2024-09-22 12:22:33 +02:00
test-ox-latex.el testing/lisp/*.el: Fix second arg to `signal' 2024-06-15 16:27:24 +02:00
test-ox-md.el testing/lisp/test-ox-md.el (ox-md/headline-style): New test 2024-05-12 14:53:39 +03:00
test-ox-publish.el test-ox-publish.el: Add tests for publish cache 2024-09-17 20:32:15 +02:00
test-ox-texinfo.el ox-texinfo: Fix definitions containing Org markup 2024-10-26 10:36:59 +02:00
test-ox.el org-export--set-variables: Fix variable assignment 2024-06-13 17:26:44 +02:00
test-property-inheritance.el testing: Fix misleading file headers 2024-03-13 15:35:31 +03:00