all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* project prefix and mark-page
@ 2021-07-21  7:49 Manuel Uberti
  2021-07-21  9:20 ` Bozhidar Batsov
  0 siblings, 1 reply; 10+ messages in thread
From: Manuel Uberti @ 2021-07-21  7:49 UTC (permalink / raw)
  To: emacs-devel

Hi,

since this is more of a curiosity than a bug report I am asking it here.

I heavily rely on project.el so many of my daily Emacs interactions start with 
C-x p. However, if I do not release CTRL quick enough before hitting p I end up 
with C-x C-p, which is bound to mark-page.

Now, after C-x p I usually hit p to select a project or f to find a file in the 
current project. So it often happens that by mistake I hit C-x C-p p or C-x C-p 
f, which is not what I was after.

To avoid this, I disabled C-x C-p in my configuration since I never use it. But 
I was wondering: is this a "problem" only for me or are C-x p and C-x C-p too 
close to be bound to such different commands?


Thank you

-- 
Manuel Uberti
www.manueluberti.eu



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

* Re: project prefix and mark-page
  2021-07-21  7:49 project prefix and mark-page Manuel Uberti
@ 2021-07-21  9:20 ` Bozhidar Batsov
  2021-07-21 10:43   ` Manuel Uberti
  0 siblings, 1 reply; 10+ messages in thread
From: Bozhidar Batsov @ 2021-07-21  9:20 UTC (permalink / raw)
  To: emacs-devel

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

You bring up a valid point, but I think it's not prudent to mess with established keybindings (even if few people are using those). Given how few options we have in the global keymap, I guess we were quite lucky that `C-x p` was available in the first place. 

I think a simple solution for you would be to just rebind `C-x C-p` (I assume you don't need it) or add local bindings `C-c p`  and `C-c C-p`. I'm a big fan of such "symmetric" keybindings and I use them all the time.

On Wed, Jul 21, 2021, at 10:49 AM, Manuel Uberti wrote:
> Hi,
> 
> since this is more of a curiosity than a bug report I am asking it here.
> 
> I heavily rely on project.el so many of my daily Emacs interactions start with 
> C-x p. However, if I do not release CTRL quick enough before hitting p I end up 
> with C-x C-p, which is bound to mark-page.
> 
> Now, after C-x p I usually hit p to select a project or f to find a file in the 
> current project. So it often happens that by mistake I hit C-x C-p p or C-x C-p 
> f, which is not what I was after.
> 
> To avoid this, I disabled C-x C-p in my configuration since I never use it. But 
> I was wondering: is this a "problem" only for me or are C-x p and C-x C-p too 
> close to be bound to such different commands?
> 
> 
> Thank you
> 
> -- 
> Manuel Uberti
> www.manueluberti.eu
> 
> 

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

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

* Re: project prefix and mark-page
  2021-07-21  9:20 ` Bozhidar Batsov
@ 2021-07-21 10:43   ` Manuel Uberti
  2021-07-21 11:16     ` Bozhidar Batsov
  0 siblings, 1 reply; 10+ messages in thread
From: Manuel Uberti @ 2021-07-21 10:43 UTC (permalink / raw)
  To: emacs-devel

On 21/07/21 11:20, Bozhidar Batsov wrote:
> I think a simple solution for you would be to just rebind `C-x C-p` (I assume 
> you don't need it) or add local bindings `C-c p`  and `C-c C-p`. I'm a big fan 
> of such "symmetric" keybindings and I use them all the time.

Yes, like I said I am disabling C-x C-p in my configuration.

C-c p and C-c C-p are nice suggestions, though, thanks. I was using them with 
Projectile before, but I have to say nowadays I try to stick with the default 
key bindings as much as possible in order to better understand what is going 
before re-binding built-in functionalities to different keys.

Anyway, if there are historical reasons for C-x C-p I understand completely and 
I can work around my problem in my init.el.

-- 
Manuel Uberti
www.manueluberti.eu



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

* Re: project prefix and mark-page
  2021-07-21 10:43   ` Manuel Uberti
@ 2021-07-21 11:16     ` Bozhidar Batsov
  2021-07-21 12:28       ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Bozhidar Batsov @ 2021-07-21 11:16 UTC (permalink / raw)
  To: emacs-devel

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

The mark-* keybindings are all over the place and they are hardly consistent (e.g. check out the bindings for sexp, defun and paragraph), but I guess in the case of mark-page the "p" in C-x C-p does carry some meaning. It would have been nice if all of those used some consistent prefix (e.g. how easy-kill does things), but I think this ship has sailed, as a lot of people are quite used to the current keybindings.

On Wed, Jul 21, 2021, at 1:43 PM, Manuel Uberti wrote:
> On 21/07/21 11:20, Bozhidar Batsov wrote:
> > I think a simple solution for you would be to just rebind `C-x C-p` (I assume 
> > you don't need it) or add local bindings `C-c p`  and `C-c C-p`. I'm a big fan 
> > of such "symmetric" keybindings and I use them all the time.
> 
> Yes, like I said I am disabling C-x C-p in my configuration.
> 
> C-c p and C-c C-p are nice suggestions, though, thanks. I was using them with 
> Projectile before, but I have to say nowadays I try to stick with the default 
> key bindings as much as possible in order to better understand what is going 
> before re-binding built-in functionalities to different keys.
> 
> Anyway, if there are historical reasons for C-x C-p I understand completely and 
> I can work around my problem in my init.el.
> 
> -- 
> Manuel Uberti
> www.manueluberti.eu
> 
> 

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

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

* Re: project prefix and mark-page
  2021-07-21 11:16     ` Bozhidar Batsov
@ 2021-07-21 12:28       ` Eli Zaretskii
  2021-07-21 12:43         ` Bozhidar Batsov
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2021-07-21 12:28 UTC (permalink / raw)
  To: Bozhidar Batsov; +Cc: emacs-devel

> Date: Wed, 21 Jul 2021 14:16:54 +0300
> From: "Bozhidar Batsov" <bozhidar@batsov.com>
> 
> The mark-* keybindings are all over the place and they are hardly consistent (e.g. check out the bindings for
> sexp, defun and paragraph)

Are they really inconsistent?  Could you elaborate?



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

* Re: project prefix and mark-page
  2021-07-21 12:28       ` Eli Zaretskii
@ 2021-07-21 12:43         ` Bozhidar Batsov
  2021-07-21 13:05           ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Bozhidar Batsov @ 2021-07-21 12:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

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

mark-sexp - C-M-@ 
mark-defn - C-M-h
mark-paragraph - M-h
mark-page - C-x C-p

They don't seem very consistent to me. I also find it weird that the very useful mark-sexp has a pretty uncomfortable default keybinding.

On Wed, Jul 21, 2021, at 3:28 PM, Eli Zaretskii wrote:
> > Date: Wed, 21 Jul 2021 14:16:54 +0300
> > From: "Bozhidar Batsov" <bozhidar@batsov.com>
> > 
> > The mark-* keybindings are all over the place and they are hardly consistent (e.g. check out the bindings for
> > sexp, defun and paragraph)
> 
> Are they really inconsistent?  Could you elaborate?
> 

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

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

* Re: project prefix and mark-page
  2021-07-21 12:43         ` Bozhidar Batsov
@ 2021-07-21 13:05           ` Eli Zaretskii
  2021-07-21 15:02             ` Pankaj Jangid
  2021-07-21 15:40             ` Manuel Uberti
  0 siblings, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2021-07-21 13:05 UTC (permalink / raw)
  To: Bozhidar Batsov; +Cc: emacs-devel

> Date: Wed, 21 Jul 2021 15:43:03 +0300
> From: "Bozhidar Batsov" <bozhidar@batsov.com>
> Cc: emacs-devel@gnu.org
> 
> mark-sexp - C-M-@ C-M-SPC
  mark-word M-@
> mark-defn - C-M-h
> mark-paragraph - M-h
  mark-whole-buffer C-x h
> mark-page - C-x C-p
> 
> They don't seem very consistent to me.

I added mark-word, mark-whole-buffer, and some alternative bindings.

Variants of M-@ are used because C-@ sets the mark. For the same
reason you have C-M-SPC for mark-sexp. Variants of C-x h or M-h are
also somewhat consistent.

> I also find it weird that the very useful mark-sexp has a pretty
> uncomfortable default keybinding.

It isn't uncomfortable here, FWIW.



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

* Re: project prefix and mark-page
  2021-07-21 13:05           ` Eli Zaretskii
@ 2021-07-21 15:02             ` Pankaj Jangid
  2021-07-21 15:40             ` Manuel Uberti
  1 sibling, 0 replies; 10+ messages in thread
From: Pankaj Jangid @ 2021-07-21 15:02 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> mark-sexp - C-M-@ C-M-SPC
>   mark-word M-@
>> mark-defn - C-M-h
>> mark-paragraph - M-h
>   mark-whole-buffer C-x h
>> mark-page - C-x C-p

All of the above have gone into my muscle memory now. On macos, I had to
retrain my fingers for set-mark-command. To set mark, C-SPC doesn’t work
on mac (reserved for something else) so I now use C-@ i.e. C-Shift-@
... three keys.




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

* Re: project prefix and mark-page
  2021-07-21 13:05           ` Eli Zaretskii
  2021-07-21 15:02             ` Pankaj Jangid
@ 2021-07-21 15:40             ` Manuel Uberti
  2021-07-22  5:32               ` Bozhidar Batsov
  1 sibling, 1 reply; 10+ messages in thread
From: Manuel Uberti @ 2021-07-21 15:40 UTC (permalink / raw)
  To: emacs-devel

On 21/07/21 15:05, Eli Zaretskii wrote:
>> I also find it weird that the very useful mark-sexp has a pretty
>> uncomfortable default keybinding.
> 
> It isn't uncomfortable here, FWIW.

I use C-M-SPC all the time, mark-sexp is definitely a great command and that key 
binding is easier to type.

However, I do not use C-M-@ (nor M-@) because on my Italian keyboard the @ 
character requires AltGr to be typed and I find M-AltGr-@ not too comfortable a 
combination.

-- 
Manuel Uberti
www.manueluberti.eu



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

* Re: project prefix and mark-page
  2021-07-21 15:40             ` Manuel Uberti
@ 2021-07-22  5:32               ` Bozhidar Batsov
  0 siblings, 0 replies; 10+ messages in thread
From: Bozhidar Batsov @ 2021-07-22  5:32 UTC (permalink / raw)
  To: emacs-devel

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

Yeah, my point was that any keybindings that require an additional Shift (e.g. for @) are less convenient, at least for me.
I had totally forgotten about the other keybinding, mostly because Emacs advertises in the minibuffer the @ version.

As for the consistency point - while one can argue there's some degree of consistency (e.g. between a few of the mark commands and some mark commands and other related commands), I don't think there's full consistency across the mark commands. E.g. what does `C-x C-p` fit with? It would have been nice if the commands have a single prefix (e.g. M-h as the prefix and bindings like `M-h p`, `M-h s`; totally random example, my point is simply that keybindings orgnized is this manner are easier to remember/discover) and some additional convenience keybinding when needed (e.g. like `C-M-SPC`). 

On Wed, Jul 21, 2021, at 6:40 PM, Manuel Uberti wrote:
> On 21/07/21 15:05, Eli Zaretskii wrote:
> >> I also find it weird that the very useful mark-sexp has a pretty
> >> uncomfortable default keybinding.
> > 
> > It isn't uncomfortable here, FWIW.
> 
> I use C-M-SPC all the time, mark-sexp is definitely a great command and that key 
> binding is easier to type.
> 
> However, I do not use C-M-@ (nor M-@) because on my Italian keyboard the @ 
> character requires AltGr to be typed and I find M-AltGr-@ not too comfortable a 
> combination.
> 
> -- 
> Manuel Uberti
> www.manueluberti.eu
> 
> 

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

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

end of thread, other threads:[~2021-07-22  5:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-21  7:49 project prefix and mark-page Manuel Uberti
2021-07-21  9:20 ` Bozhidar Batsov
2021-07-21 10:43   ` Manuel Uberti
2021-07-21 11:16     ` Bozhidar Batsov
2021-07-21 12:28       ` Eli Zaretskii
2021-07-21 12:43         ` Bozhidar Batsov
2021-07-21 13:05           ` Eli Zaretskii
2021-07-21 15:02             ` Pankaj Jangid
2021-07-21 15:40             ` Manuel Uberti
2021-07-22  5:32               ` Bozhidar Batsov

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.