From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.help Subject: Re: [Emacs for Android] How to open file with an external app? Date: Wed, 23 Aug 2023 07:45:51 +0800 Message-ID: References: <87edjv8e8k.fsf@yahoo.com> <87a5uj8dw2.fsf@yahoo.com> <0d6e01a7-7591-4187-8a3d-b3be6cae78fc@pm.me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32922"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Antonio Romano Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 23 01:46:53 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qYb5J-0008Nx-AV for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 23 Aug 2023 01:46:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYb4g-0002AZ-IZ; Tue, 22 Aug 2023 19:46:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYb4e-0002AM-KT for help-gnu-emacs@gnu.org; Tue, 22 Aug 2023 19:46:12 -0400 Original-Received: from sonic314-21.consmr.mail.ne1.yahoo.com ([66.163.189.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYb4Z-0000bU-EQ for help-gnu-emacs@gnu.org; Tue, 22 Aug 2023 19:46:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692747965; bh=1z08j6rY8zHodBJLfNWWPAv5eyiK2hA1CxPdQU5AlNI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Ri/8RXlwCBH178gH2+XCvhVqp6M1xC043GMyNehC5IHTeVggAjgriBs2LBpsu+pbsbOpbUnCKFRGs6BY8CN7u755ToAZa/5TKm2lAHeS3ko7gDKb86g+lfh0JdOlcnVcBNIWQ4GUb5CbGNTNUleM6BbNSHkwTd7xMjH07adbUB7z+eeRosBpbot0jDfB5c7WQOCcZUQCb/KxwLIBEdSswc6C4OCowQvwC96ufqzpRJsKFctmp6Axt2TTDQRyEGw0jEf8ueki5t8hrl7C57lgLDEFVxlhdl35oIMCCaV/8kxgBCS73e3S9cCwpfhTr3Xg45nuSy3u8p9HYpBwmjesyw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692747965; bh=kRFZRzLym4hDqLi7D/uDgUYSL+BmmrWbkgTlcU4Mlda=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=DMusHDDKyLigeyVSO3sNlMsz9MB/SmJja3QqYPogw8/cDh1d6IXaJglDSPtpYsJvI49jFy9ou6xDWdWBQzt4Pi4psAUMnGa/w+mWewato7M7EA3Vuye6Vb1EWSv1IwQvmNFRpDz6dvyzimqi9YZvnXAFCK1aWCJxZnDle3dtcn1DqyFl5On8zHVAnLy8QgoQ260Uh1FGgcMsRQ40AK39r6fW3/tqWeezDdz6knjNLNlTVyzGNjESPCiY/qRNc5RnEAlntSjGYxagvNMH/MCk80PC9lVbvhZSLiNQxeBrcOLa68Fy+JEVzz8pLiy1Ee/pf+pky/tPpM0hpjGIFp7Rgw== X-YMail-OSG: ctdyOosVM1mHM8m0uH9MCmfjOMl.1Bu1TmDHDMnP_nfFYVocEQ5jj3ctnCFEbkf 8oVRR_fdHzYqO0j7wzBcZvr79f3i_M1Cf3RChzbB0VIzVWAP_B52T5ZuuRbvey7d3u4EiT49sjGR pXJFMBJdH_7flY9C_22sgLImmibsondOk0A.PyKQcwDsOS3dsEarT9IaGpCToZySdqDS2mTWPYAw eFyQYti9GwtlxdbnjI6rhoOErryynCPp7YOyXuDf3qi3SDRT7MM8AiDPMk4LN3JmQyAo1xFojTca pk9HYAqywKIluq9Q4eVMDUHLN1iNpqsWWUkrYW8mvkNs0SorXggCUmq4OodWfb3LLpk9vdBf7Mtt j9gSPIAetMQrz6LX7ylu_Uf.y2qqUUQKWnWwMCAu6r9DeSX8pHu5QoclBnEDEiLfjOg7lTwyAr_y Mg7CVYUEl5iBpJDpTKkL6wGq5Pa8oiVYxoJIzP8pOl_OCozKKgUmF5xxP_YrRJfi8z6SPxoQWzNc odvZ8cXOEPW6q8mBVPoX9omDDrq6vKUn.i3C_rzUw0c8ezTHqw_wqM9YR6wih43_ITh2EsiXZpiW x4aUIshDr2AIrVWI01yXr37MWxJuyqVHkI54836q8rCLo3Ubl9JJMjL7.DP3D7agXsPnW9qIAMPh 34bc8geVdNGLIC5kNx8v1ee3K6_Yh2spGURdjhojHM9RjrbLE_3t9cVx605MKzlbRjGOY_v5t_Sv _UkVdtoI0O01pRfBH0_VBacOCq9JYPMsemBKMn7waKoRRPykN5q9SDS3T_emLh1nixy_jCysNkJ5 eIzbRA2V1Ds6Hu2weMEG5gSW0B7PtOqSc4x18IvvtN X-Sonic-MF: X-Sonic-ID: b8281d7f-e84f-4e01-a518-4479682d3331 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Tue, 22 Aug 2023 23:46:05 +0000 Original-Received: by hermes--production-sg3-69654d8bd-lxqd4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d7e837ad9bca87e7196baaf51aa32fd7; Tue, 22 Aug 2023 23:46:00 +0000 (UTC) In-Reply-To: <0d6e01a7-7591-4187-8a3d-b3be6cae78fc@pm.me> (Antonio Romano's message of "Tue, 22 Aug 2023 14:49:07 +0000") X-Mailer: WebService/1.1.21732 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.189.147; envelope-from=luangruo@yahoo.com; helo=sonic314-21.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144932 Archived-At: Antonio Romano writes: > I tried the following > (android-browse-url > "content://org.nextcloud.documents/2a368.../Ebooks/effectiveawk.epub") > > and got the following error: > > java.lang.SecurityException: UID 10713 does not have permission to > "/content/storage/org.nextcloud.documents/2a3683ac919807f000715758ea81ef61%2F665/Ebooks/effectiveawk.epub" > > [user 0]; you could obtain access using ACTION_OPEN_DOCUMENT > or related > apis > > But I'm pretty sure Emacs has the permission to access the Nextcloud > document provider, since i can open buffers in it without any > trouble. Maybe i got the URI wrong? These permissions are granted exclusively to Emacs, and transferring them to other programs is not possible. > I can also open document provider in a file manager called MiXplorer: > i navigated Nextcloud through it and, strangely enough, it seems that > MiXplorer gives its own content URIs to files: > > "content://com.mixplorer.file/1409260714!/Ebooks/effectiveawk.epub" It's probably copying the file to a temporary location, which is subsequently made available to other programs. > > which, if gives as argument to (android-browse-url), makes the "Open > with..." menu appear. > > Document providers look like a mess to me. What's the easiest way to > externally open files in "/content/storage/org.nextcloud/documents/"? Probably what I outlined above: copy the file to a location in the Unix VFS (outside /content or /assets), before providing the copy to other programs.