From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Pushing the mark from a primitive like goto-char Date: Tue, 05 Jan 2021 14:19:37 -0500 Message-ID: References: <9815d21d-b20e-c6d8-aae0-77aa65a4138a@gmx.at> <87sg7pq2bx.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3232"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: martin rudalics , Philipp Stephani , Juri Linkov , Stefan Kangas , Daniel =?windows-1252?Q?Mart=EDn?= To: Daniel =?windows-1252?Q?Mart=EDn?= via "Emacs development discussions." Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 05 20:22:49 2021 Return-path: Envelope-to: ged-emacs-devel@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 1kwruq-0000jh-5O for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Jan 2021 20:22:48 +0100 Original-Received: from localhost ([::1]:45538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwrun-0005MK-Kz for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Jan 2021 14:22:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwrrt-000321-QG for emacs-devel@gnu.org; Tue, 05 Jan 2021 14:19:45 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwrrr-0006Aa-Di for emacs-devel@gnu.org; Tue, 05 Jan 2021 14:19:45 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C92DB1002B8; Tue, 5 Jan 2021 14:19:39 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 889ED10022E; Tue, 5 Jan 2021 14:19:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1609874378; bh=dist44isSm92ydiArgepCJo3Ev2Q5Cd1LFm/8SRvICU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=I3Wi7MkKhUTCVtSC+maD/LfbSSPgk/fvaiHaIi6V+0RDF7UqPjZKOkPQEezMYixO2 SC4AKloEnUu8VrkjtARX0keonOCdqCNU8UXYSpl7sd+nfUyv/ixywuM4mngtmTEdsF JydDiEQmaTfgcl2viQR8qvkuwnE+j0mhTt/paGQCV2NaczOPyU4/Yt58LrD2ST6lJU 30zVpyqfN3JU1lMMwk96qikNlZetgvQ+EQQTh65olYXbup08wIG+f6U1DJoOABXA34 twwdCmmjNOAH7DkJvOuIiqTRhPNy37qsznVqbNrYveIXugXZyOF4tBC8oVw+cA3WVV f3ryuZ/T23rRQ== Original-Received: from alfajor (unknown [104.247.243.191]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3E5E3120323; Tue, 5 Jan 2021 14:19:38 -0500 (EST) In-Reply-To: ("Daniel =?windows-1252?Q?Mart=EDn?= via \"Emacs development discussions.\""'s message of "Tue, 05 Jan 2021 20:06:28 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262540 Archived-At: >>>> I'd then try to make it behave like 'M-g g' in this regard. >>> >>> Some interactive versions of low-level primitives have the suffix >>> `...-command' in their names, so a command like 'M-g g' and bound to >>> 'M-g c' could be named 'goto-char-command'. >> >> I was more concerned about not pushing the mark when the region is >> already active so one can use M-g c to extend the region. BTW, is there >> a reason why 'goto-map' is so terribly unpopulated? >> > > This sounds like a good idea: > > - Create a 'goto-char-command' command in ELisp. > > - Move the interactive spec that is in 'goto-char' to this new command > and make it push the mark smartly (e.g. be careful when a region is > active). Then call 'goto-char'. > > - Rebind 'M-g c' to 'goto-char-command'. > > - Announce the new command. > > What do you think? Could it break something? Thanks. Actually, now that I think about it: do we really need a new command, or can we instead arrange to do all the mark-handling from within the interactive spec? Stefan