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#59388: Open emacsclient file at last line Date: Sun, 20 Nov 2022 11:37:51 -0800 Message-ID: <3cd2d38d-d6ad-31bc-0126-314a3cdd686b@gmail.com> References: <835yfb7xo6.fsf@gnu.org> <518ded72c33c3608e35a@heytings.org> <83zgcm7rfg.fsf@gnu.org> <518ded72c37782cf8af5@heytings.org> <4dff4be5-8c53-8d8b-e912-1cf2bb3dff98@gmail.com> <83k03q7khf.fsf@gnu.org> <834juu6qfg.fsf@gnu.org> <83leo54fjv.fsf@gnu.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="3491"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, xerusx@pm.me, 59388@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 20 20:39:15 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 1owq9r-0000d3-9d for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Nov 2022 20:39:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owq9h-000809-3L; Sun, 20 Nov 2022 14:39:05 -0500 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 1owq9f-0007zn-3h for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 14:39:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1owq9e-0005L7-S1 for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 14:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owq9e-0008Ev-HL for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 14:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Nov 2022 19:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59388 X-GNU-PR-Package: emacs Original-Received: via spool by 59388-submit@debbugs.gnu.org id=B59388.166897308231557 (code B ref 59388); Sun, 20 Nov 2022 19:39:02 +0000 Original-Received: (at 59388) by debbugs.gnu.org; 20 Nov 2022 19:38:02 +0000 Original-Received: from localhost ([127.0.0.1]:44681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owq8f-0008Cr-RE for submit@debbugs.gnu.org; Sun, 20 Nov 2022 14:38:02 -0500 Original-Received: from mail-pl1-f174.google.com ([209.85.214.174]:46006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owq8d-0008By-3V for 59388@debbugs.gnu.org; Sun, 20 Nov 2022 14:38:00 -0500 Original-Received: by mail-pl1-f174.google.com with SMTP id w23so8775755ply.12 for <59388@debbugs.gnu.org>; Sun, 20 Nov 2022 11:37:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=qmGGpew4g57hFAyc2EP/Roj/VAit+aLuDlUHNukP6Pw=; b=ntS5U2VigUG03TbC2ffhu0sLGeTwiUkA9JIdjol449ZGL2HyNZt5l7I/el1K9y5elY aaZl3g1f91CtBycHyhV+PbB7vUUrgW35Arv+6LF8I8DrExVNB/PsLyKkqmbzYFrlVNdg omEUfbP5ehXCKgAzNaiTs5huadFo8mYZb6PLvji4QFgLGbL+L5Jks4JMrUMgWqJg1VEU ozi5+zD+dUA3lE8RwWYVYIxTHxa+FBeDQ7laEpfTP5Z9DWGz7+EvKM4nR4jv1TWtqunn uKoFmk0mPxIzwLWV4SEUPVkzvlAJ60WFSSehXQEM38PLWgS8LKzlexor82qvskn9NQfu azpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qmGGpew4g57hFAyc2EP/Roj/VAit+aLuDlUHNukP6Pw=; b=ykKsIRnPy4BIGHkzeD3z0L7XptbFzSGHsm1o6dSSTPexUhceKjSBbVlajKn4uPa8of gf91UANdqduy63/n0PoIDrLRriXSvgEltPZ2qy+CPwf4XMXibBamdX/z4a3CJ71/+B8q +Jb6L50QWGyxdGZh4Y5LLbqwEUd90otPLUGDJh4b2OMpFPCG9FL7nQwrBm4dbirvAnxY /E2dg3wqp3QOT6PxF5z2FovCcWgYCCQ+qVf11+GQVtAiZr+OmPjpNpwGRDljJaxM0X6g 5LUOXKSWDdJYiOKCydXAMjXXGYuIsjGysPq2iA8qJnyh/HqedmIUM5VcSTjzQDNSbGyX bfNQ== X-Gm-Message-State: ANoB5pkIf5ALTVirZWvDIrpO4OGTcd+tihwkXgMHXkycIZpK9e6lOvfy 8fX+rEKJiFrAjo+EzAs6hk4= X-Google-Smtp-Source: AA0mqf4moiQTsQ+2rO+orjGU/Ir4i+ZtTquUQdipMhOtrNYX1/ZGhzqJwLzsC3u3jTKlac73pUqxjw== X-Received: by 2002:a17:902:eb8b:b0:188:f881:c9d0 with SMTP id q11-20020a170902eb8b00b00188f881c9d0mr8558828plg.93.1668973073283; Sun, 20 Nov 2022 11:37:53 -0800 (PST) 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 mn23-20020a17090b189700b002187a4dd830sm6086470pjb.46.2022.11.20.11.37.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Nov 2022 11:37:52 -0800 (PST) Content-Language: en-US In-Reply-To: <83leo54fjv.fsf@gnu.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248464 Archived-At: On 11/20/2022 11:00 AM, Eli Zaretskii wrote: >> Date: Sun, 20 Nov 2022 10:49:10 -0800 >> Cc: gregory@heytings.org, xerusx@pm.me, 59388@debbugs.gnu.org >> From: Jim Porter >> >>> Then I think I'm okay with adding --funcall to emacsclient, as a solution >>> for this feature request. With the proviso that the named function will be >>> called _after_ visiting the named FILE, right? >> >> Assuming it's possible, I think the most flexible, obvious, and >> consistent[1] way for it to work would be to obey the order of the >> arguments. So "emacsclient --funcall func file.txt" calls func and then >> visits file.txt, whereas "emacsclient file.txt --funcall func" visits >> file.txt and then calls func. > > This won't work, because emacsclient thinks everything after the first FILE > cannot be an option. Which is why +LINE:COLUMN FILE works, although LINE > and COLUMN refer to FILE that comes after it. Ok, then I think your proposal is fine. (Though these surprising differences between how "emacs" and "emacsclient" handle arguments are making me wonder about reimplementing the client, perhaps as "emacs-client" with a hyphen. Maybe it's worth an experiment at least. That obviously doesn't have to happen as part of this bug though.)