unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Make register insertion consistent with other insertion
@ 2014-09-11  2:26 Daniel Colascione
  2014-09-11 14:01 ` Tom
  2014-09-13 11:27 ` Mathias Dahl
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Colascione @ 2014-09-11  2:26 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

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




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make register insertion consistent with other insertion
  2014-09-11  2:26 Make register insertion consistent with other insertion Daniel Colascione
@ 2014-09-11 14:01 ` Tom
  2014-09-13 11:27 ` Mathias Dahl
  1 sibling, 0 replies; 4+ messages in thread
From: Tom @ 2014-09-11 14:01 UTC (permalink / raw)
  To: emacs-devel

Daniel Colascione <dancol <at> dancol.org> writes:

> 
> 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.
> 

+1

It's very annoying when the cursor stays before the inserted text.
In practice I pretty much always want it after it.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make register insertion consistent with other insertion
  2014-09-11  2:26 Make register insertion consistent with other insertion Daniel Colascione
  2014-09-11 14:01 ` Tom
@ 2014-09-13 11:27 ` Mathias Dahl
  2014-09-13 14:04   ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: Mathias Dahl @ 2014-09-13 11:27 UTC (permalink / raw)
  Cc: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 2020 bytes --]

>
> > 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 <dancol@dancol.org>
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
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2825 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make register insertion consistent with other insertion
  2014-09-13 11:27 ` Mathias Dahl
@ 2014-09-13 14:04   ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2014-09-13 14:04 UTC (permalink / raw)
  To: Mathias Dahl; +Cc: Emacs developers

>> 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.

Fine by me.  Please make sure you mention it in the NEWS.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-13 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11  2:26 Make register insertion consistent with other insertion Daniel Colascione
2014-09-11 14:01 ` Tom
2014-09-13 11:27 ` Mathias Dahl
2014-09-13 14:04   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).