[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 940df63d2da: Port arc to Android
From: |
Po Lu |
Subject: |
master 940df63d2da: Port arc to Android |
Date: |
Sat, 7 Oct 2023 22:46:28 -0400 (EDT) |
branch: master
commit 940df63d2daf50b899a66cd1542bec0c0f3eaebf
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Port arc to Android
* lisp/arc-mode.el (archive-zip-extract): Default to -q and -p
when the Android system unzip is being employed.
---
lisp/arc-mode.el | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 81d3dfc3432..c861c835966 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -231,13 +231,27 @@ Archive and member name will be added."
:group 'archive)
(defcustom archive-zip-extract
- (cond ((executable-find "unzip") '("unzip" "-qq" "-c"))
+ (cond ((executable-find "unzip")
+ (if (and (eq system-type 'android)
+ ;; Mind that the unzip provided by Android
+ ;; does not understand -qq or -c, their
+ ;; functions being assumed by -q and -p
+ ;; respectively. Furthermore, the user
+ ;; might install an unzip executable
+ ;; distinct from the system-provided unzip,
+ ;; and such situations must be detected as
+ ;; well.
+ (member (executable-find "unzip")
+ '("/bin/unzip"
+ "/system/bin/unzip")))
+ '("unzip" "-q" "-p")
+ '("unzip" "-qq" "-c")))
(archive-7z-program `(,archive-7z-program "x" "-so"))
((executable-find "pkunzip") '("pkunzip" "-e" "-o-"))
(t '("unzip" "-qq" "-c")))
"Program and its options to run in order to extract a zip file member.
-Extraction should happen to standard output. Archive and member name will
-be added."
+Extraction should happen to standard output. Archive and member
+name will be added."
:type '(list (string :tag "Program")
(repeat :tag "Options"
:inline t
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 940df63d2da: Port arc to Android,
Po Lu <=