From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rahguzar Newsgroups: gmane.emacs.devel Subject: Re: An emacs based `xdg-desktop-portal` filechooser Date: Mon, 12 Jun 2023 17:28:04 +0200 Message-ID: <87352w4riw.fsf@zohomail.eu> References: <87leh4p7ni.fsf@zohomail.eu> <87a5x5rlfj.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20687"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.3; emacs 29.0.91 Cc: emacs-devel@gnu.org To: James Thomas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 12 17:50:48 2023 Return-path: Envelope-to: ged-emacs-devel@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 1q8joe-0005Cx-7m for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Jun 2023 17:50:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q8jo2-00084v-On; Mon, 12 Jun 2023 11:50:10 -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 1q8jfn-0005u4-DT for emacs-devel@gnu.org; Mon, 12 Jun 2023 11:41:39 -0400 Original-Received: from sender11-pp-o91.zoho.eu ([31.186.226.249]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q8jfj-00056q-SY for emacs-devel@gnu.org; Mon, 12 Jun 2023 11:41:39 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1686584491; cv=none; d=zohomail.eu; s=zohoarc; b=kVcikNdF0Hcf+/L2eRH08Uqmd+PmvAdTe2fTahQAbrvFTGna2xhSn9jQNfSS9BmDlIZ5KhuLh5todRUQqzXLR/E+9kgpcZdGIIErq8kWMdT7WhecumhXlO4bkwrucgQhz21rDGuqZ7Ht2Wo2t8mgea3BJogH511jLWeQEji7CSY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1686584491; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ejcakU+O3dXFgmbSBydgIsW8GvKUQSzwc+bcdQjpWPE=; b=Jtu0Olg6Q+0VRXNexlRM6ZD+ixfvHVoaj1WuTW5zIIkiZgO96adHHvRAYH5aAxXndGQu+v9YI0b+mKJ20KOYMzEG0wTb69zYnyavF4l4gxJB12EzJHW9WgBD8y3X/oYFiY2JjCgkqw4mnDhEX209OdvXLZR7vSfHumd2zgp/k+o= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=zohomail.eu; spf=pass smtp.mailfrom=rahguzar@zohomail.eu; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1686584491; s=zoho; d=zohomail.eu; i=rahguzar@zohomail.eu; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=ejcakU+O3dXFgmbSBydgIsW8GvKUQSzwc+bcdQjpWPE=; b=UFlniWZGmClROx7sZXVgXUhFZ4pPmB6ZQmnD1qaAlO1VGpmNzaIeyw+RkIu7rRk0 xOi6YpyWrnYNBUcDzU9CmChVakd3gecCziQjcSdZJrYFKdL3zpmK8PoX2QEnW/jGsmZ gPTc9PoyvjnQt7xP39I6aovBvMfzM7+HZbmOC8+k= Original-Received: from localhost (emp-89-216.eduroam.uu.se [130.238.89.216]) by mx.zoho.eu with SMTPS id 1686584489614719.9930206467844; Mon, 12 Jun 2023 17:41:29 +0200 (CEST) In-reply-to: <87a5x5rlfj.fsf@gmx.net> X-ZohoMailClient: External Received-SPF: pass client-ip=31.186.226.249; envelope-from=rahguzar@zohomail.eu; helo=sender11-pp-o91.zoho.eu 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 12 Jun 2023 11:50:07 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306752 Archived-At: James Thomas writes: > Rahguzar wrote: > >> Hi All, >> During the past few weeks, I have been working on an Emacs based >> implementation of filechooser backend of `xdg-desktop-portal`. It is >> very rough around the edges but I have working version at >> https://codeberg.org/rahguzar/filechooser. > > Thanks! This is great news for us EXWM users. My 2c below: > >> The choices combo boxes are not implemented. I don't what would be a >> good interface for them (suggestions welcome) and I have in my >> (limited) experience. > > Ideas: You could ask for it sequentially before or after specifying the > file name. Or in case of choosing a file extension, you could check the > extension in the user input and ask the user to confirm. > I am generally not too fond of serial prompting so I was looking for something like a buffer which could show all the choices and the user could then choose not to interact with it if the defaults are ok. However since the choices seem rare in my experience (I see that I missed some words in my sentence saying this above), I think what you are proposing will be alright. However I am unlikely to work on it myself anytime soon. PR on the repository implementing this are welcome. >> In my opinion minor compared to these is the fact the filechooser >> dialogues are not modal, i.e. you can still freely interact with the >> window that sent the file selection request. > > Perhaps you could temporarily rebind 'C-x o', 'mouse-1' etc. This is not about an Emacs window but the window for the application which sent the request. To see this in action you can do `C-o` from a Firefox window and by default this will show a GTK file picker dialog. While the dialog is active, you can't interact with the Firefox window. I don't think it is possible to achieve this from Emacs and I am not sure behavior is even desirable. Related to keybinding, I don't use vanilla Emacs keybindings so if you are using this and the few bindings provided don't mesh well with the default Emacs ones, feel free to suggest alternatives or make a PR. Rahguzar