From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#57752: 28.1.91; emacsclient-mail.desktop doesn't work for me Date: Fri, 16 Sep 2022 18:26:48 +0000 Message-ID: <84acc36e7e3accb7055f@heytings.org> References: <87r10gcum8.fsf@cassou.me> <87bkrj31r0.fsf@gnus.org> <87y1unxv15.fsf@cassou.me> <83leqn4cji.fsf@gnu.org> <87v8prxtox.fsf@cassou.me> <878rmjy78x.fsf@gnus.org> <87bkrfiqbg.fsf@gmail.com> <878rmjqysp.fsf@cassou.me> <84acc36e7e9328ef2f76@heytings.org> <87zgezpebo.fsf@cassou.me> <84acc36e7e47f3fe9562@heytings.org> <7069638a-21b3-9777-215c-3ce4ec18ca37@froglet.home.mavit.org.uk> <84acc36e7e2d900b70c0@heytings.org> <4712c3c2-dfca-c6a4-2840-13d20cffb7b8@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28825"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Damien Cassou , Robert Pluim , Peter Oliver , 57752@debbugs.gnu.org, git@mavit.org.uk, Lars Ingebrigtsen , Eli Zaretskii To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 16 20:27:17 2022 Return-path: Envelope-to: geb-bug-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 1oZG3Z-0007N4-9A for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Sep 2022 20:27:17 +0200 Original-Received: from localhost ([::1]:37652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZG3X-0002oj-RU for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Sep 2022 14:27:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZG3K-0002nJ-OD for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 14:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZG3K-00075p-AH for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 14:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZG3K-00072v-5h for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 14:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Sep 2022 18:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57752 X-GNU-PR-Package: emacs Original-Received: via spool by 57752-submit@debbugs.gnu.org id=B57752.166335281627073 (code B ref 57752); Fri, 16 Sep 2022 18:27:02 +0000 Original-Received: (at 57752) by debbugs.gnu.org; 16 Sep 2022 18:26:56 +0000 Original-Received: from localhost ([127.0.0.1]:44303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZG3C-00072X-MH for submit@debbugs.gnu.org; Fri, 16 Sep 2022 14:26:56 -0400 Original-Received: from heytings.org ([95.142.160.155]:44870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZG38-00072K-4w for 57752@debbugs.gnu.org; Fri, 16 Sep 2022 14:26:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1663352808; bh=8GFftRdubd3FO8kEmoWc6/tIKTEoiMzQHyhUg+9BQTU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=3vFKcM0TGeinJKLfKxxhUsGqomLSyJc9EumtCLTTlDBE+QprDxiWChAs0AWtD6Ey8 qoxTwh5JMC8683Xv+n6KdGxIXb2gHo2greL1F9QHZPosO/aQSzzfg3TmeeI3F3eDl8 haPFV8hzPMeJNGsN0zIrQt6BgoWG3tMkDMaKAiH8eqMoigucxH2dvFd7l8RtSyrF3S 1fFTugqGPCzC0L4LAYJeWzFuEiOld/e6glmPYsHa6DBlbh5SdJKRDxJ9b0kJNlEasa dTMMjJAGYnEqrimcYGhwZOdo/efXpaGwVZlGVhOAumP7Dc1BDMZb5kPMfUKnfAhRJf YCkjZYjUSR0Jw== In-Reply-To: <4712c3c2-dfca-c6a4-2840-13d20cffb7b8@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242796 Archived-At: > > I'm not convinced that '--function-arg' is necessary, but I do think > that adding '--function' to emacsclient would be the best solution of > the ones presented so far. > It's not very adaptable, whereas --eval allows you to run an arbitrary form. > > That would allow both of the following in .desktop files: > > emacsclient --function my-function-taking-one-url %u > emacsclient --function my-function-taking-many-urls %U > Sure, and how would you use it say in shell scripts, in which these %u/%U/%f/%F constructs do not exist? > > '--setq' has the disadvantage that you'd need some way to prepend *each* > URL/filename with it in the %U/%F cases. > What about --setq args "(list %U)"? > > The functions above would need to be able to consume command-line > arguments (like 'message-mailto' does), but that's not a big deal. We > could even add an 'apply-from-command-line' function that adapts any > existing function to do this: > > emacsclient --function apply-from-command-line func arg1 arg2 > > 'apply-from-command-line' could look at the arity of 'func' and consume > the appropriate number of command-line arguments. > That's over-engineering IMO. > > Adding '--function' to emacsclient also has the advantage that it's > already available for emacs, > No, emacs only has --funcall: call Emacs Lisp function FUNC with no arguments.