From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59388: Open emacsclient file at last line Date: Sat, 19 Nov 2022 22:33:16 +0200 Message-ID: <83k03q7khf.fsf@gnu.org> References: <835yfb7xo6.fsf@gnu.org> <518ded72c33c3608e35a@heytings.org> <83zgcm7rfg.fsf@gnu.org> <518ded72c37782cf8af5@heytings.org> <4dff4be5-8c53-8d8b-e912-1cf2bb3dff98@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9133"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, xerusx@pm.me, 59388@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 19 21:34:23 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 1owUXe-0002GR-QF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Nov 2022 21:34:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owUXN-0006Bj-3n; Sat, 19 Nov 2022 15:34: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 1owUXL-0006BZ-65 for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 15:34: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 1owUXK-0008Ub-QD for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 15:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owUXK-0008G1-Gc for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 15:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Nov 2022 20:34: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.166888999731691 (code B ref 59388); Sat, 19 Nov 2022 20:34:02 +0000 Original-Received: (at 59388) by debbugs.gnu.org; 19 Nov 2022 20:33:17 +0000 Original-Received: from localhost ([127.0.0.1]:41510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owUWb-0008F5-JX for submit@debbugs.gnu.org; Sat, 19 Nov 2022 15:33:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owUWa-0008Es-EW for 59388@debbugs.gnu.org; Sat, 19 Nov 2022 15:33:16 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owUWU-0008Rd-VF; Sat, 19 Nov 2022 15:33:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NPIrif+7azqctQlovsRlJfiXxrTrt05HeRi2+zGSKMQ=; b=Gcc6/CbSQhTQ z9QXefW+yDLYd2/YVYny+KsQLv7v57kKs3gbQSfqfWUs+TwyZJNfLywmVNOZggjoNGvQQcqw3dOBK O65yLHicqPCTThuPPhgGXDkkaeUyOiA1+FPm7WhfQHZVPZjuWlme90Odr4bbzWwJGx7XpaR7qjUp1 8FSbuwLVSOXrdOD03xU3+XS0eWhO00ccKhzjo8SUdtG2c2S+KvytMJ1/SrQcJS9QOJKSUhRBNLGmq a8Z9dTMeYeKzwNbVfwVFJmgyzz3ppASQsxgSWk0m5fwDADG+d3JYPmcjrUaFM22DPDlwEegc3/ZY+ bq046pwjiHBiAh+xOXLnEw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owUWU-0000mv-D0; Sat, 19 Nov 2022 15:33:10 -0500 In-Reply-To: <4dff4be5-8c53-8d8b-e912-1cf2bb3dff98@gmail.com> (message from Jim Porter on Sat, 19 Nov 2022 12:08:06 -0800) 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:248378 Archived-At: > Date: Sat, 19 Nov 2022 12:08:06 -0800 > Cc: xerusx@pm.me, 59388@debbugs.gnu.org > From: Jim Porter > > 1. Why does --eval do that? You can mix filenames and --eval with the > regular emacs program: > > emacs -Q foo.txt --eval '(message "hi")' > > Why doesn't emacsclient work similarly? (On the other hand, changing > this might break compatibility, so we should be careful here.) I don't think we can change the semantics of --eval. > 2. Assuming we don't change --eval as above, maybe the proposed --apply > option discussed in bug#57752 could work: > > emacsclient --apply end-of-buffer -- foo.c > > I believe this would even work if you defined a shell alias like so: > > alias edit=end="emacsclient --apply end-of-buffer --" > edit-end foo.txt > > That said, adding --apply to emacsclient (and emacs, too!) seemed > like a fair bit of work when I looked at it... Maybe we don't need to go as far as that discussion led us? Just adding a switch --funcall, to mimic what Emacs has, could be enough? Then we'd be able to say emacsclient -f eob FILE (assuming we also add a function 'eob' to Emacs).