From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.devel Subject: Re: Make register insertion consistent with other insertion Date: Sat, 13 Sep 2014 13:27:53 +0200 Message-ID: References: <54110847.50204@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d043c08e885abba0502f0b27b X-Trace: ger.gmane.org 1410607722 4069 80.91.229.3 (13 Sep 2014 11:28:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Sep 2014 11:28:42 +0000 (UTC) Cc: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 13 13:28:36 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XSlVJ-0004uI-Mp for ged-emacs-devel@m.gmane.org; Sat, 13 Sep 2014 13:28:33 +0200 Original-Received: from localhost ([::1]:49292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSlVJ-0006uI-8r for ged-emacs-devel@m.gmane.org; Sat, 13 Sep 2014 07:28:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSlV4-0006uD-Q0 for emacs-devel@gnu.org; Sat, 13 Sep 2014 07:28:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSlV3-0008VP-EN for emacs-devel@gnu.org; Sat, 13 Sep 2014 07:28:18 -0400 Original-Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:34173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSlV3-0008Ud-4b for emacs-devel@gnu.org; Sat, 13 Sep 2014 07:28:17 -0400 Original-Received: by mail-wi0-f171.google.com with SMTP id bs8so1891497wib.16 for ; Sat, 13 Sep 2014 04:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc :content-type; bh=JD1IOkvJHdDqOgbJUIqhllZS2PlaX//ceVlStCD7p6o=; b=mTRu0HCm2dEC7+gnQ/RRHJsfKoM2F+yDYdKvcig4haPEa0cjuqJhMS9kZOzMsuMzRz kEbb6bunPhT7gloTOSemECyxqC+zIxzwQHfgGMwD6Ae0PseejNTolwv1ER/KeoMviSKm gW3BghEHjThpv2DNH8UbZ/5cTJI21UmJgXCwH8e1cB3Eb7cf/YgqbRr8HwWs1rpIeBxJ eTDvQLfN7V+y/2NQhg7eEaEERn98CJwBVhKDOPEmG3H0jn5IM5fdjLP4Ah/zc8B0JBZ5 AbI0Ji+GbhucfKV/iQpotG2qLjYhayM+9KjBxBqZwJwtzPaUECrOhqksi1ALypIdMEcq 1FaA== X-Received: by 10.180.93.99 with SMTP id ct3mr10150045wib.0.1410607694062; Sat, 13 Sep 2014 04:28:14 -0700 (PDT) Original-Received: by 10.194.152.4 with HTTP; Sat, 13 Sep 2014 04:27:53 -0700 (PDT) In-Reply-To: <54110847.50204@dancol.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174269 Archived-At: --f46d043c08e885abba0502f0b27b Content-Type: text/plain; charset=UTF-8 > > > I'd like to apply the following patch to flip the sense of the prefix > > argument to interact calls to insert-register. I find the current > > default behavior of putting point before the inserted text annoying; I > > want it after more often and don't want to add C-u to an already long > > key sequence. > I seldom use registers but I tried this out right now. I can say for a fact that I know that, in the way I would use it, if I got into the habit of using it, would be to prefer point after the inserted text. So, for what it's worth: +1. /Mathias On Thu, Sep 11, 2014 at 4:26 AM, Daniel Colascione wrote: > I'd like to apply the following patch to flip the sense of the prefix > argument to interact calls to insert-register. I find the current > default behavior of putting point before the inserted text annoying; I > want it after more often and don't want to add C-u to an already long > key sequence. > > Of course, this is an incompatible change to a very old interface, but > the breakage should be limited to muscle memory and recorded macros. > > === modified file 'lisp/register.el' > --- lisp/register.el 2014-06-03 09:06:18 +0000 > +++ lisp/register.el 2014-09-11 02:24:53 +0000 > @@ -425,13 +425,14 @@ > "Insert contents of register REGISTER. (REGISTER is a character.) > Normally puts point before and mark after the inserted text. > If optional second arg is non-nil, puts mark before and point after. > -Interactively, second arg is non-nil if prefix arg is supplied. > +Interactively, second arg is nil if prefix arg is supplied and t > +otherwise. > > Interactively, reads the register using `register-read-with-preview'." > (interactive (progn > (barf-if-buffer-read-only) > (list (register-read-with-preview "Insert register: ") > - current-prefix-arg))) > + (not current-prefix-arg)))) > (push-mark) > (let ((val (get-register register))) > (cond > > > > --f46d043c08e885abba0502f0b27b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> I'd like to app= ly the following patch to flip the sense of the prefix
> argument to = interact calls to insert-register. I find the current
> default behav= ior of putting point before the inserted text annoying; I
> want it a= fter more often and don't want to add C-u to an already long
> ke= y sequence.

I seldom use registe= rs but I tried this out right now. I can say for a fact that I know that, i= n the way I would use it, if I got into the habit of =C2=A0using it, would = be to prefer point after the inserted text.

So, fo= r what it's worth: +1.

/Mathias

=

On Th= u, Sep 11, 2014 at 4:26 AM, Daniel Colascione <dancol@dancol.org> wrote:
I'd like to apply the fo= llowing patch to flip the sense of the prefix
argument to interact calls to insert-register. I find the current
default behavior of putting point before the inserted text annoying; I
want it after more often and don't want to add C-u to an already long key sequence.

Of course, this is an incompatible change to a very old interface, but
the breakage should be limited to muscle memory and recorded macros.

=3D=3D=3D modified file 'lisp/register.el'
--- lisp/register.el=C2=A0 =C2=A0 2014-06-03 09:06:18 +0000
+++ lisp/register.el=C2=A0 =C2=A0 2014-09-11 02:24:53 +0000
@@ -425,13 +425,14 @@
=C2=A0 =C2=A0"Insert contents of register REGISTER.=C2=A0 (REGISTER is= a character.)
=C2=A0Normally puts point before and mark after the inserted text.
=C2=A0If optional second arg is non-nil, puts mark before and point after.<= br> -Interactively, second arg is non-nil if prefix arg is supplied.
+Interactively, second arg is nil if prefix arg is supplied and t
+otherwise.

=C2=A0Interactively, reads the register using `register-read-with-preview&#= 39;."
=C2=A0 =C2=A0(interactive (progn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(barf-if-buff= er-read-only)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(list (regist= er-read-with-preview "Insert register: ")
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 current-prefix-arg)))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (not current-prefix-arg))))
=C2=A0 =C2=A0(push-mark)
=C2=A0 =C2=A0(let ((val (get-register register)))
=C2=A0 =C2=A0 =C2=A0(cond




--f46d043c08e885abba0502f0b27b--