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: Mon, 19 Sep 2022 09:05:52 -0700 Message-ID: <976cc188-6910-ad73-b3ed-60838ed7d2e5@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> <9e796c00-92e2-37fd-a90e-6ef615296b9e@gmail.com> <87zgex56bw.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10003"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Damien Cassou , Eli Zaretskii , git@mavit.org.uk, 57752@debbugs.gnu.org To: Gregory Heytings , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 19 18:14:03 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 1oaJPG-0002Of-5h for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 18:14:02 +0200 Original-Received: from localhost ([::1]:54664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaJPE-00053H-T6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 12:14:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaJIW-0004op-I4 for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 12:07:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaJIU-0003XI-Av for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 12:07:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaJIU-00054L-5L for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 12:07: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: Mon, 19 Sep 2022 16:07: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.166360356319389 (code B ref 57752); Mon, 19 Sep 2022 16:07:02 +0000 Original-Received: (at 57752) by debbugs.gnu.org; 19 Sep 2022 16:06:03 +0000 Original-Received: from localhost ([127.0.0.1]:54970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaJHW-00052e-SL for submit@debbugs.gnu.org; Mon, 19 Sep 2022 12:06:03 -0400 Original-Received: from mail-pg1-f177.google.com ([209.85.215.177]:45693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaJHU-000526-GA for 57752@debbugs.gnu.org; Mon, 19 Sep 2022 12:06:00 -0400 Original-Received: by mail-pg1-f177.google.com with SMTP id h188so27155008pgc.12 for <57752@debbugs.gnu.org>; Mon, 19 Sep 2022 09:06:00 -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=GYtcvTVCrBEqEI96akxvvu+RX4m4Dun4elq5eXvS5Xo=; b=lf/sVho5jWl68O1USKOPRA7DW6rHeZYCxDfOwQ8VPk7JJqKbC9Twp12CElyr2Y9bx3 isq5OCnQDDr3w4CIMuydUHXIcl90tKN8BTC+oEyevw42Mz1ZWZgAtV9ytVlh5BVeHRB8 OzfHwp8r/gx9Xi96NdRQZvYBOwd4DWuPHZ3MJYd1juk4Lso4jpUcViCWLPm1HdKIqIi9 2QwMrazd/ZGyzjlkb6ev+cdvmuoLP/AX44DEobFlNwNnpuvQQ6UT8G9QLZmFoIB3pW8c yY/tt2SCAdmizHe30fejRR922ImuuuRwhEHSJmppV62cqHUg/p1W7AIT/SW+UYS3kGXf YPsw== 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=GYtcvTVCrBEqEI96akxvvu+RX4m4Dun4elq5eXvS5Xo=; b=HMt9KMKvUXLTizc5aUw1R003cEmtPAF3EbDVHiOGVgBTl85CwReibrTNaIlr+nUFsu D8hPpk169D8XIVYY4lALZ6CShtmqtOo6vJNMRUqQ99PJsh7DcaAoLEwm2PB9DjGzN4JZ Qw2EsebRcU2A5m3Z5n67k2rq/AfLJTlrRALcV8A0m1DHxHxZ5uHM3ddNaQs/BFWgeG+m VM0kMAahd9pDXZC50ltz0P3wSVH4XO0ZgjNAidFPS5ccSjPD5sJV7qdqk0p1Sxf1WjCc gZP1IK/bqv72sSTeEvcYSdltwIRmOyojmfNJ3QcDf5oumcsZqjKngo3g42cydgk64lic Lxeg== X-Gm-Message-State: ACrzQf12iAbmKnOEG/rktIc/ZB2Vb3sWXkr9JMweNgAAgmCfcqIkqJp/ Rg336jLKK9Xv0uzSQ8Wz+X54AsoWUjsziQ== X-Google-Smtp-Source: AMsMyM7fJTtushRjm6ARRVVXNru7QQ0VE8wTXa0uIF90gEtyYcRbbIhpmqWssRYf3/DlIroZ+j32lA== X-Received: by 2002:aa7:8a49:0:b0:53e:6a9c:9a04 with SMTP id n9-20020aa78a49000000b0053e6a9c9a04mr19437243pfa.85.1663603554601; Mon, 19 Sep 2022 09:05:54 -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 b77-20020a621b50000000b00545b91e78d3sm14751638pfb.89.2022.09.19.09.05.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Sep 2022 09:05:52 -0700 (PDT) In-Reply-To: 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:243093 Archived-At: On 9/19/2022 1:56 AM, Gregory Heytings wrote: > 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)' If Emacs gained a 'set-arg' function (similar to 'setarg1' in your message) that does the right thing, you could say: --apply set-arg args arg -- --eval '(some-func 1 (car args) t)' Another way would be a function that "intelligently" converts arguments to other types. This is similar to how Eshell command forms work: if you're calling a Lisp function with sh-like syntax, it will automatically convert arguments that look like numbers into actual numbers. So maybe you could do something like: --apply autoconvert-strings-and-apply some-func 1 arg t That seems clumsier to me than 'set-arg', but since these could all be written as Lisp functions, users or package authors should be able to do whatever they need. Of course, core Emacs could add whichever helper function(s) seem generally useful. > One case in which --apply is better is when the function is already > defined by Emacs... Yeah, for more-complex forms, you'd still need to fall back to --eval or something similar. But a Lisp function like 'set-arg' could let us reuse the --apply machinery. I think it could be as simple as this: (defun set-arg (name &rest value) (set (intern name) value)) That should give us '--set', except that it's spelled '--apply set-arg'.