diff options
| author | Po Lu | 2025-03-04 14:32:48 +0800 |
|---|---|---|
| committer | Po Lu | 2025-03-04 14:32:48 +0800 |
| commit | fe7a8c92be6269f8fc7933eb6c190178839d0f8a (patch) | |
| tree | d985e95c6954ea7a8fedfd6415d13f05970fcdd8 | |
| parent | d9f93e8fdcc00ab81b678c6f7d3f9b67cb14bd6d (diff) | |
| parent | 1b80bc67aadd01de00b7911ae32bf5d91b262a8a (diff) | |
| download | emacs-fe7a8c92be6269f8fc7933eb6c190178839d0f8a.tar.gz emacs-fe7a8c92be6269f8fc7933eb6c190178839d0f8a.zip | |
Merge from savannah/emacs-30
1b80bc67aad ; * doc/emacs/android.texi (Android Software): Minor mark...
dcfbf7d1863 ; * etc/PROBLEMS: Document the same problem here.
b09bbf22afd Document requirements respecting XDG MIME databases on An...
365a91622e0 ; (completion-preview--try-table): Propagate extra proper...
# Conflicts:
# lisp/completion-preview.el
| -rw-r--r-- | doc/emacs/android.texi | 42 | ||||
| -rw-r--r-- | etc/PROBLEMS | 10 | ||||
| -rw-r--r-- | lisp/completion-preview.el | 1 | ||||
| -rw-r--r-- | test/lisp/completion-preview-tests.el | 13 |
4 files changed, 66 insertions, 0 deletions
diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 568fd8022d1..c318373536a 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi | |||
| @@ -1203,3 +1203,45 @@ installation within Emacs's home directory. | |||
| 1203 | In addition to the projects mentioned above, statically linked | 1203 | In addition to the projects mentioned above, statically linked |
| 1204 | binaries for most Linux kernel-based systems can also be run on | 1204 | binaries for most Linux kernel-based systems can also be run on |
| 1205 | Android. | 1205 | Android. |
| 1206 | |||
| 1207 | @cindex XDG MIME database, Android | ||
| 1208 | @cindex displaying SVG images with embeds, Android | ||
| 1209 | Emacs can be configured with support for viewing SVG image files by | ||
| 1210 | means of the @code{librsvg} library. In SVG files, there may be | ||
| 1211 | references to other images on the file-system, whose format | ||
| 1212 | @code{librsvg} cannot detect by default, and which will be rendered as | ||
| 1213 | blank squares unless an XDG-compliant @dfn{MIME database} is installed | ||
| 1214 | into the directory @file{.local/share/mime} within your home directory. | ||
| 1215 | |||
| 1216 | As the XDG @code{shared-mime-info} tools must be available to generate | ||
| 1217 | such a database, it is recommended to produce this database in a | ||
| 1218 | temporary directory on a GNU/Linux or Unix system, before transferring | ||
| 1219 | the same to the recipient Android device. With the latest release of | ||
| 1220 | @code{shared-mime-info} installed, create a temporary directory in which | ||
| 1221 | to generate the MIME database, copy the default | ||
| 1222 | @file{freedesktop.org.in} MIME catalog to a directory named | ||
| 1223 | @file{packages}, and execute @code{update-mime-info} to generate the | ||
| 1224 | database: | ||
| 1225 | |||
| 1226 | @example | ||
| 1227 | $ mkdir -p my-mime-database/packages | ||
| 1228 | $ cp /usr/share/mime/packages/freedesktop.org.xml my-mime-database/packages | ||
| 1229 | $ update-mime-info my-mime-database | ||
| 1230 | @end example | ||
| 1231 | |||
| 1232 | This may print a series of notices stating that the MIME database | ||
| 1233 | specified is not in the search path on your host system, which are of no | ||
| 1234 | consequence. Proceed by transferring the contents of the MIME database | ||
| 1235 | to the recipient system, e.g., to | ||
| 1236 | @file{/sdcard/Download/my-mime-database.tar.gz}: | ||
| 1237 | |||
| 1238 | @example | ||
| 1239 | $ cd; mkdir -p .local/share | ||
| 1240 | $ tar xfz /sdcard/Download/my-mime-database.tar.gz | ||
| 1241 | $ mv my-mime-database .local/share/mime | ||
| 1242 | $ rm /sdcard/Download/my-mime-database.tar.gz | ||
| 1243 | @end example | ||
| 1244 | |||
| 1245 | If your Emacs session has already attempted to display an SVG image with | ||
| 1246 | embeds, Emacs must be restarted before the new MIME database will enter | ||
| 1247 | into effect. | ||
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index b8d00b7679e..0d61a3bc76e 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -3830,6 +3830,16 @@ executing: | |||
| 3830 | 3830 | ||
| 3831 | $ adb shell appops set --uid org.gnu.emacs MANAGE_EXTERNAL_STORAGE allow | 3831 | $ adb shell appops set --uid org.gnu.emacs MANAGE_EXTERNAL_STORAGE allow |
| 3832 | 3832 | ||
| 3833 | ** Images embedded in SVG files are invisible. | ||
| 3834 | |||
| 3835 | This is a product of librsvg's failing to locate a suitable MIME | ||
| 3836 | database enabling it automatically to detect image file formats. The | ||
| 3837 | procedure by which to obtain such a database is documented in the node | ||
| 3838 | '(emacs)Android Software' in the Emacs manual; you may also download a | ||
| 3839 | pre-compiled MIME database from this SourceForge repository: | ||
| 3840 | |||
| 3841 | https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/mime-database.tar.gz/download | ||
| 3842 | |||
| 3833 | * Build-time problems | 3843 | * Build-time problems |
| 3834 | 3844 | ||
| 3835 | ** Configuration | 3845 | ** Configuration |
diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el index 0119ddad1d6..8f7cba580ba 100644 --- a/lisp/completion-preview.el +++ b/lisp/completion-preview.el | |||
| @@ -473,6 +473,7 @@ candidates or if there are multiple matching completions and | |||
| 473 | (let* ((pred (plist-get props :predicate)) | 473 | (let* ((pred (plist-get props :predicate)) |
| 474 | (string (buffer-substring beg end)) | 474 | (string (buffer-substring beg end)) |
| 475 | (completion-ignore-case completion-preview-ignore-case) | 475 | (completion-ignore-case completion-preview-ignore-case) |
| 476 | (completion-extra-properties props) | ||
| 476 | (md (completion-metadata string table pred)) | 477 | (md (completion-metadata string table pred)) |
| 477 | (sort-fn (or (completion-metadata-get md 'cycle-sort-function) | 478 | (sort-fn (or (completion-metadata-get md 'cycle-sort-function) |
| 478 | (completion-metadata-get md 'display-sort-function) | 479 | (completion-metadata-get md 'display-sort-function) |
diff --git a/test/lisp/completion-preview-tests.el b/test/lisp/completion-preview-tests.el index 411a14a87ef..8ce2a30bb27 100644 --- a/test/lisp/completion-preview-tests.el +++ b/test/lisp/completion-preview-tests.el | |||
| @@ -445,4 +445,17 @@ instead." | |||
| 445 | (should (string= (buffer-string) "foobar")) | 445 | (should (string= (buffer-string) "foobar")) |
| 446 | (should (eq (get-text-property 6 'prop) 'val)))) | 446 | (should (eq (get-text-property 6 'prop) 'val)))) |
| 447 | 447 | ||
| 448 | (ert-deftest completion-preview-propagates-properties () | ||
| 449 | "Test the completion metadata handling of Completion Preview mode." | ||
| 450 | (with-temp-buffer | ||
| 451 | (setq-local | ||
| 452 | completion-preview-sort-function #'minibuffer-sort-alphabetically | ||
| 453 | completion-at-point-functions | ||
| 454 | (list (completion-preview-tests--capf '("foobaz" "foobar") | ||
| 455 | :display-sort-function #'identity))) | ||
| 456 | (insert "foo") | ||
| 457 | (let ((this-command 'self-insert-command)) | ||
| 458 | (completion-preview--post-command)) | ||
| 459 | (completion-preview-tests--check-preview "baz" 'completion-preview-common))) | ||
| 460 | |||
| 448 | ;;; completion-preview-tests.el ends here | 461 | ;;; completion-preview-tests.el ends here |