From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#57752: 28.1.91; emacsclient-mail.desktop doesn't work for me Date: Fri, 16 Sep 2022 08:17:33 -0700 Message-ID: <9e796c00-92e2-37fd-a90e-6ef615296b9e@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1097"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Damien Cassou , Eli Zaretskii , git@mavit.org.uk, 57752@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 16 17:18:52 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 1oZD7E-00007X-Lg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Sep 2022 17:18:52 +0200 Original-Received: from localhost ([::1]:50530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZD7D-0003BF-1C for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Sep 2022 11:18:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZD6R-000390-30 for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 11:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZD6Q-0006f7-NO for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 11:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZD6Q-0002GP-3N for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2022 11:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Sep 2022 15:18: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.16633414638674 (code B ref 57752); Fri, 16 Sep 2022 15:18:02 +0000 Original-Received: (at 57752) by debbugs.gnu.org; 16 Sep 2022 15:17:43 +0000 Original-Received: from localhost ([127.0.0.1]:43978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZD66-0002Fp-KO for submit@debbugs.gnu.org; Fri, 16 Sep 2022 11:17:42 -0400 Original-Received: from mail-pg1-f171.google.com ([209.85.215.171]:46776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZD64-0002Fb-3V for 57752@debbugs.gnu.org; Fri, 16 Sep 2022 11:17:41 -0400 Original-Received: by mail-pg1-f171.google.com with SMTP id 78so20618053pgb.13 for <57752@debbugs.gnu.org>; Fri, 16 Sep 2022 08:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:from:to:cc:subject :date; bh=hJ+ksHd/F6FhaocQL6v0pMOdWnOovBxx2SgYL5Pf8zU=; b=H8QB4lJZL+WrvnyiKU/oQfyj5uRe6wwIb+Ey5M8FZXl/Y3ReZb1ya8BWX90XCzvMjX YX2kiRvI1QMLLIzvNS+8mOJnAn/iROEIxdxml+6p5URaiL54+KvITjnxE3vUpvBLl/TB 2Hd/G0M7KZf/lTOagZ4uggFQAsk207x66Md1xFYmWunoQaVPwgycDGnemtIpi7spk+ka RksNOYkwEPLTZCo3/WODClgVJr2pzOKuk/J8Yyx9djYKG9RBjKPyZsaOC0G9Z/sYIp5j z1G569AGhFTMRqlSt+fWx5IF6hwzNcfIvZsd3HX5AQcpUv3KZDyUOJQ8pgQ52g6q+UZF Ifkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:x-gm-message-state :from:to:cc:subject:date; bh=hJ+ksHd/F6FhaocQL6v0pMOdWnOovBxx2SgYL5Pf8zU=; b=OHuq9pBYEOr5Ej/v6hdkkUlWz7tBrm2OR1vbM4EXjNfisrarQtyhWAtCKGUb+2ek+d lFyQ8JGsPeO6y18PzAg25QS8UCv/r+MePb02lGsmHWN9vpDrFmzgULlHetdV6FrC4rqA GkUIh+xbsgXDLoqiMzutocC+1S2VzMMqMY+fOZMsGUWVtSjOMEbnDLVoWC4J1Y9MNz+u L9P+6X0VBzp8FJo7iGwJ29yz7tA6PxiUmlyHm1ZnUJVbz+08Z8XOZuCdDtTiKG37B0+s LQig/mEsgn1Y3mThXTUtBacrRwzD9Rlxr2gnlICFitTXDfvYJjzn2jxto00g4WCC4KGj 4Urw== X-Gm-Message-State: ACrzQf0qpUDQVwiKzKw2CUmXd+2MXr721FlIs42UHG9wB3/UnL5eP2Ba KC5JoZLDPe1bqlrRk0Br6U8hwDnrTQU= X-Google-Smtp-Source: AMsMyM7DspyJstmGNSClpki9QxWZ912NXGN7y55lPEbewVZ6bbbV8FgVz2KDhJwyA2h8HuD8PxHkcw== X-Received: by 2002:a05:6a00:230d:b0:53d:c198:6ad7 with SMTP id h13-20020a056a00230d00b0053dc1986ad7mr5954704pfh.67.1663341454161; Fri, 16 Sep 2022 08:17:34 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id f16-20020a17090a121000b00202dc1416bfsm1613813pja.31.2022.09.16.08.17.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Sep 2022 08:17:33 -0700 (PDT) In-Reply-To: <878rmjy78x.fsf@gnus.org> Content-Language: en-US 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:242780 Archived-At: On 9/16/2022 2:54 AM, Lars Ingebrigtsen wrote: > I've idly wondered before whether we should add a general mechanism for > this to avoid having to create functions that look at > `command-line-args-left' themselves. (And --eval is problematic in > circumstances like this.) > > So something like > > --function foo --function-args bar zot gazonk > > would result in calling `foo' with those arguments. > > Hm... would we need some way to say "here's the end of > --function-args", perhaps? "--"? So: > > --function foo --function-args bar zot gazonk -- > > Anybody have any thoughts here? I have two thoughts: 1) Instead of specifying the function args with a flag, I think I'd go the other way and specify the function as being special, e.g.: emacs --apply func arg1 arg2 2) Even better, why not just use --function and pass some higher-order function: emacs --function apply-from-command-line func arg1 arg2 That way, it's easy to substitute in some other higher-order function if you want. emacsclient would still need to add a --function flag though, and probably some changes to how it forwards arguments to the main emacs so that you can do stuff like this.