diff options
| author | Po Lu | 2025-03-04 14:24:56 +0800 |
|---|---|---|
| committer | Po Lu | 2025-03-04 14:29:37 +0800 |
| commit | b09bbf22afda57cbf96870c68eb31264a4ced482 (patch) | |
| tree | 3c74e0770e9598e0a596ecb85af2a7a8da261125 | |
| parent | 365a91622e093fe0fb74b7fee3ff7cc4a0025611 (diff) | |
| download | emacs-b09bbf22afda57cbf96870c68eb31264a4ced482.tar.gz emacs-b09bbf22afda57cbf96870c68eb31264a4ced482.zip | |
Document requirements respecting XDG MIME databases on Android
* doc/emacs/android.texi (Android Software): State that librsvg
requires a MIME database to display embedded images, and how to
acquire such a database.
| -rw-r--r-- | doc/emacs/android.texi | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 568fd8022d1..560c348db49 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 folder 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 | @code{/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. | ||