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: Mon, 19 Sep 2022 08:56:13 +0000 Message-ID: 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> <9e796c00-92e2-37fd-a90e-6ef615296b9e@gmail.com> <87zgex56bw.fsf@gnus.org> 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="12304"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Damien Cassou , Jim Porter , 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 Mon Sep 19 11:33:34 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 1oaD9h-0002z4-EU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 11:33:33 +0200 Original-Received: from localhost ([::1]:34268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaD9g-0005oX-7w for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 05:33:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaCaM-0003L4-By for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53305) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaCaM-0006zM-2g for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaCaL-0005DP-N5 for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 08:57:01 +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.166357777819994 (code B ref 57752); Mon, 19 Sep 2022 08:57:01 +0000 Original-Received: (at 57752) by debbugs.gnu.org; 19 Sep 2022 08:56:18 +0000 Original-Received: from localhost ([127.0.0.1]:52383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaCZe-0005CQ-CQ for submit@debbugs.gnu.org; Mon, 19 Sep 2022 04:56:18 -0400 Original-Received: from heytings.org ([95.142.160.155]:48650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaCZa-0005C9-Rf for 57752@debbugs.gnu.org; Mon, 19 Sep 2022 04:56:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1663577773; bh=7paV6y7ub93HGdvdVUUSvdjJOd85v8h2zAsCNbx4DpY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=ySPmJE4cMldkvnn1zQ6mMELKhKJMHpHYN5Sq3/F50alGIlPkknmztXOKqQCVV4gSk luyl0lCQd+3j6ciNlqUAcNrTKK2CwTmQH4etmG3WbE9J7fLVdc4lkr1UkzRDSKV1Lb oiqpS3kqW0TtGYr0L4J1/2MaVn40Ad3Vdj3Vlru1QA5XF7n+WvrkY4AGDZjBFv3zkZ F4CyzNatU8Eh4oWN62jyAU1EM3/G3waadimR37CZWmd+nOX22shOq2eynCk2o1aBny rBQrHzlakItxQM52fKHS/kB+aTYOl0qp6LaT3/aSiyqAkGsw/UkBvaz3vn2okjLj1K bGqqtwdbN7Iwg== In-Reply-To: <87zgex56bw.fsf@gnus.org> 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:243061 Archived-At: >> emacs --apply func arg1 arg2 > > Yes, that sounds good. > Hmm... I did not see the --apply proposal earlier, it's nice and lispy indeed. I think I would prefer to separate the two concerns (stuffing argument strings into the Lisp environment on the one hand, and forms on the other hand), but it seems good enough, and perhaps it's the best compromise. One disadvantage I see is that it becomes a bit more complex to write function calls with arguments that are not strings. E.g. to call (some-func 1 "arg" t) one would have to do something like --eval '(defun tmp-func (arg) (some-func 1 arg t))' --apply tmp-func arg instead of something like --set args arg -- --eval '(some-func 1 (car args) t)' Likewise, if we want to use the arguments in multiple --eval forms, something like --eval '(defun setarg1 (arg) (setq arg1 arg))' --apply setarg1 arg -- --eval '(... arg1 ...)' --eval '(... arg1 ...)' will be necessary. Yet another example is that to loop over all arguments, one would have to do something like --eval '(defun loop-fun (args) (dolist (arg args) ...))' --apply loop-fun args instead of something like --set args arg -- --eval '(dolist (arg args) ...)' One case in which --apply is better is when the function is already defined by Emacs, e.g. (with the .desktop example mentioned upthread, and assuming that find-many-files is defined by Emacs) --apply find-many-files %F is probably clearer than --set files %F -- --eval '(find-many-files files)' > > (But we'd still need "--" to say that the arguments have ended.) > Except for the last argument(s), of course. IOW, except if there are no arguments that must not be passed to the function after the function arguments.