From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#16050: 24.3; let copy-to-register choose default location of point for insert-register Date: Tue, 10 May 2022 17:59:36 +0200 Message-ID: <875ymdfkev.fsf@gnus.org> References: <87y540r8df.fsf@fleche.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18393"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 16050@debbugs.gnu.org To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 10 18:01:24 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 1noSId-0004XB-E5 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 May 2022 18:01:23 +0200 Original-Received: from localhost ([::1]:43606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noSIc-0003wZ-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 May 2022 12:01:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noSHL-0003a6-QA for bug-gnu-emacs@gnu.org; Tue, 10 May 2022 12:00:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noSHL-0003bQ-Cg for bug-gnu-emacs@gnu.org; Tue, 10 May 2022 12:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1noSHL-00070c-Bh for bug-gnu-emacs@gnu.org; Tue, 10 May 2022 12:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 May 2022 16:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16050 X-GNU-PR-Package: emacs Original-Received: via spool by 16050-submit@debbugs.gnu.org id=B16050.165219838826872 (code B ref 16050); Tue, 10 May 2022 16:00:03 +0000 Original-Received: (at 16050) by debbugs.gnu.org; 10 May 2022 15:59:48 +0000 Original-Received: from localhost ([127.0.0.1]:34921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noSH5-0006zM-VU for submit@debbugs.gnu.org; Tue, 10 May 2022 11:59:48 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:56874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noSH3-0006z8-W5 for 16050@debbugs.gnu.org; Tue, 10 May 2022 11:59:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LCg/gxqUyRJ7EML7wFuUor7YA3OHsBByF0iSgthZXTA=; b=KOLwHNTV/bpRBton+HXy3bwfCs fhsTt/suRm2IAihqiOkV1xfCNWLA5EbilWSIN3miGn/FYx5xbYwK39hpLN5S1gKGLvIviCVy2dn1z OMLeoSlRrvG00ZfTwuAdf6CW7mN8puQuRLlFx1W9fQl5wCDJGA3FEES9Vt07yHQscrw4=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noSGv-0005TY-5X; Tue, 10 May 2022 17:59:39 +0200 X-Now-Playing: Joni Mitchell's _Mingus_: "Happy Birthday 1975 (Rap)" In-Reply-To: <87y540r8df.fsf@fleche.redhat.com> (Tom Tromey's message of "Wed, 04 Dec 2013 07:36:12 -0700") 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:231850 Archived-At: Tom Tromey writes: > I sometimes use registers for repetitive insertion of text. > > Sometimes I want point to end up at the end of the insertion. > I know I can do this with a prefix argument, but it would be nicer if I > could specify this automatically for a given register, say when creating > the contents. > > For example, when I invoke copy-to-register, if point is at the end of > the region, then that could indicate that I want point to be at the end > of the region at insertion time. (I'm going through old bug reports that unfortunately weren't resolved at the time.) I don't think we can change the behaviour of these commands, because that would be annoying to many users that are used to the current way they work. > Or, perhaps a prefix argument to copy-to-register would work ok as well. Unfortunately, the prefix argument is already taken there. In addition, "remembering" this data is kinda tricky -- we allow saving registers to file, and we'd have to extend the on-file format, etc. Everything's possible with a little programming, of course, but the interface problems are more difficult -- I don't immediately see any good way for the user to specify that it's a point-at-the-end register. We could add a special command for that, but... Hm... perhaps we could make `C-u' for insert-register "sticky" for that register? That is, if you `C-u C-x r i a', then that "a" register would keep that behaviour for the rest of the session (until toggled off with a subsequent `C-u C-x r i a', perhaps). But that's a pretty convoluted interface, and changes the current behaviour. Anybody got any ideas here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no