GNU bug report logs - #43948
28.0.50; [PATHC][NS] Make s-<left/right> to move to beginning/end of line

Previous Next

Package: emacs;

Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>

Date: Mon, 12 Oct 2020 11:38:01 UTC

Severity: normal

Tags: patch

Found in version 28.0.50

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43948 in the body.
You can then email your comments to 43948 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Mon, 12 Oct 2020 11:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrii Kolomoiets <andreyk.mad <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 12 Oct 2020 11:38:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [PATHC][NS] Make s-<left/right> to move to beginning/end
 of line
Date: Mon, 12 Oct 2020 14:36:53 +0300
[Message part 1 (text/plain, inline)]
On macOS, 'Command-Left/Right Arrow' are the common shortcuts to move
the insertion point to the beginning/end of line.

See https://support.apple.com/en-us/HT201236, 'Document shortcuts'
section.

Considering that Emacs is the text editor (mostly), lets make it behave
more like TextEdit.app and not like Terminal.app about those shortcuts.

Patch attached.

Thanks!
[0001-NS-Make-s-left-right-to-move-to-beginning-end-of-lin.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Mon, 12 Oct 2020 18:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Mon, 12 Oct 2020 19:33:41 +0100
On Mon, Oct 12, 2020 at 02:36:53PM +0300, Andrii Kolomoiets wrote:
> On macOS, 'Command-Left/Right Arrow' are the common shortcuts to move
> the insertion point to the beginning/end of line.
> 
> See https://support.apple.com/en-us/HT201236, 'Document shortcuts'
> section.
> 
> Considering that Emacs is the text editor (mostly), lets make it behave
> more like TextEdit.app and not like Terminal.app about those shortcuts.
> 
> Patch attached.

Thanks for this.

> +;; (as in TextEdit.app)

As these bindings are standard for the OS, I don't think we really
need this comment. :)

I want to leave this a little while to see if anyone objects, then we
can put it into master and see if anyone objects then.

Feel free to remind me about this in a week or so if I forget and
nobody else responds.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Mon, 12 Oct 2020 22:39:02 GMT) Full text and rfc822 format available.

Message #11 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Martín <mardani29 <at> yahoo.es>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Tue, 13 Oct 2020 00:38:30 +0200
Andrii Kolomoiets <andreyk.mad <at> gmail.com> writes:

Thanks for the patch, I think it's a good addition. I only have a nit:

> +--
> +** On macOS, 's-<left>' and 's-<right> are now bound to
> +'move-beginning-of-line' and 'move-end-of-line' respectively.
> +

Maybe we should say here that the former commands for these keys can
still be invoked via M-x ns-prev-frame and M-x ns-next-frame,
respectively.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Tue, 13 Oct 2020 06:49:02 GMT) Full text and rfc822 format available.

Message #14 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Tue, 13 Oct 2020 09:48:13 +0300
Alan Third <alan <at> idiocy.org> writes:

> As these bindings are standard for the OS, I don't think we really
> need this comment. :)

Yes.  Will you be able to remove it while applying changes or should I
update the patch?

> Feel free to remind me about this in a week or so if I forget and
> nobody else responds.

Sure.  But I believe no bug report will go unattended nowadays thanks to
Lars :)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Tue, 13 Oct 2020 07:58:02 GMT) Full text and rfc822 format available.

Message #17 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Tue, 13 Oct 2020 10:57:11 +0300
Daniel Martín <mardani29 <at> yahoo.es> writes:

>> +** On macOS, 's-<left>' and 's-<right> are now bound to
>> +'move-beginning-of-line' and 'move-end-of-line' respectively.
>> +
>
> Maybe we should say here that the former commands for these keys can
> still be invoked via M-x ns-prev-frame and M-x ns-next-frame,
> respectively.

Former commands can be invoked with 's-`' and 's-~'.  Those are the
common shortcuts in macOS.  So maybe it is better to mention those keys
instead of M-x?  Though I'm not the experienced NEWS writer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Tue, 13 Oct 2020 20:36:02 GMT) Full text and rfc822 format available.

Message #20 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Tue, 13 Oct 2020 21:35:44 +0100
On Tue, Oct 13, 2020 at 09:48:13AM +0300, Andrii Kolomoiets wrote:
> Alan Third <alan <at> idiocy.org> writes:
> 
> > As these bindings are standard for the OS, I don't think we really
> > need this comment. :)
> 
> Yes.  Will you be able to remove it while applying changes or should I
> update the patch?

I can do it, although if you're wanting to change the NEWS entry I
suppose it would make sense to do it all at once.

-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Tue, 13 Oct 2020 20:37:02 GMT) Full text and rfc822 format available.

Message #23 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 43948 <at> debbugs.gnu.org,
 Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Tue, 13 Oct 2020 21:36:39 +0100
On Tue, Oct 13, 2020 at 10:57:11AM +0300, Andrii Kolomoiets wrote:
> Daniel Martín <mardani29 <at> yahoo.es> writes:
> 
> >> +** On macOS, 's-<left>' and 's-<right> are now bound to
> >> +'move-beginning-of-line' and 'move-end-of-line' respectively.
> >> +
> >
> > Maybe we should say here that the former commands for these keys can
> > still be invoked via M-x ns-prev-frame and M-x ns-next-frame,
> > respectively.
> 
> Former commands can be invoked with 's-`' and 's-~'.  Those are the
> common shortcuts in macOS.  So maybe it is better to mention those keys
> instead of M-x?  Though I'm not the experienced NEWS writer.

Yes, I think that mentioning those keys is better.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Wed, 14 Oct 2020 10:17:02 GMT) Full text and rfc822 format available.

Message #26 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 43948 <at> debbugs.gnu.org, Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Wed, 14 Oct 2020 13:15:51 +0300
[Message part 1 (text/plain, inline)]
Alan Third <alan <at> idiocy.org> writes:

> On Tue, Oct 13, 2020 at 10:57:11AM +0300, Andrii Kolomoiets wrote:
>> Daniel Martín <mardani29 <at> yahoo.es> writes:
>> 
>> >> +** On macOS, 's-<left>' and 's-<right> are now bound to
>> >> +'move-beginning-of-line' and 'move-end-of-line' respectively.
>> >> +
>> >
>> > Maybe we should say here that the former commands for these keys can
>> > still be invoked via M-x ns-prev-frame and M-x ns-next-frame,
>> > respectively.
>> 
>> Former commands can be invoked with 's-`' and 's-~'.  Those are the
>> common shortcuts in macOS.  So maybe it is better to mention those keys
>> instead of M-x?  Though I'm not the experienced NEWS writer.
>
> Yes, I think that mentioning those keys is better.

Done.

See attached patch.
[0001-NS-Make-s-left-right-to-move-to-beginning-end-of-lin.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Wed, 14 Oct 2020 20:25:04 GMT) Full text and rfc822 format available.

Message #29 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 43948 <at> debbugs.gnu.org,
 Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Wed, 14 Oct 2020 21:24:06 +0100
On Wed, Oct 14, 2020 at 01:15:51PM +0300, Andrii Kolomoiets wrote:
> > Yes, I think that mentioning those keys is better.
> 
> Done.

Thanks.

> +** On macOS, 's-<left>' and 's-<right> are now bound to
                                         ^
Missing quote.

> +'move-beginning-of-line' and 'move-end-of-line' respectively. The former
> +commands to select previous/next frame are still bound to 's-~' and 's-`'.

I don't think you need the word "former" here. Other than that, LGTM.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Wed, 14 Oct 2020 20:49:01 GMT) Full text and rfc822 format available.

Message #32 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 43948 <at> debbugs.gnu.org, Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Wed, 14 Oct 2020 23:48:29 +0300
[Message part 1 (text/plain, inline)]
Alan Third <alan <at> idiocy.org> writes:

>> +** On macOS, 's-<left>' and 's-<right> are now bound to
>                                          ^
> Missing quote.

Fixed.
Smells like bug report for electric-pair-mode to pair "'" in text-mode :)

>
>> +'move-beginning-of-line' and 'move-end-of-line' respectively. The former
>> +commands to select previous/next frame are still bound to 's-~' and 's-`'.
>
> I don't think you need the word "former" here. Other than that, LGTM.

And fixed.
[0001-NS-Make-s-left-right-to-move-to-beginning-end-of-lin.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Tue, 20 Oct 2020 09:56:01 GMT) Full text and rfc822 format available.

Message #35 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: Alan Third <alan <at> idiocy.org>,
 Daniel Martín <mardani29 <at> yahoo.es>, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATCH][NS] Make s-<left/right> to move to 
 beginning/end of line
Date: Tue, 20 Oct 2020 11:55:36 +0200
Similarly, should M-mouse-1 be bound to rectangular selection, since Option-drag-mouse appears to be the platform convention?
(It seems unlikely that there would be a sizeable population of secondary selection users on NS, but what do I know.)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Tue, 20 Oct 2020 12:34:02 GMT) Full text and rfc822 format available.

Message #38 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: Daniel Martín <mardani29 <at> yahoo.es>,
 Andrii Kolomoiets <andreyk.mad <at> gmail.com>, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATCH][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Tue, 20 Oct 2020 13:33:52 +0100
On Tue, Oct 20, 2020 at 11:55:36AM +0200, Mattias Engdegård wrote:
> Similarly, should M-mouse-1 be bound to rectangular selection, since
> Option-drag-mouse appears to be the platform convention? (It seems
> unlikely that there would be a sizeable population of secondary
> selection users on NS, but what do I know.)

I'm not sure. I'm happy enough with the super bindings since I don't
think Emacs has any by default, but I don't know that we want to get
into other bindings with a greater potential for conflict.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Tue, 20 Oct 2020 13:55:02 GMT) Full text and rfc822 format available.

Message #41 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Alan Third <alan <at> idiocy.org>
Cc: Daniel Martín <mardani29 <at> yahoo.es>,
 Andrii Kolomoiets <andreyk.mad <at> gmail.com>, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATCH][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Tue, 20 Oct 2020 15:54:30 +0200
20 okt. 2020 kl. 14.33 skrev Alan Third <alan <at> idiocy.org>:

> I'm not sure. I'm happy enough with the super bindings since I don't
> think Emacs has any by default, but I don't know that we want to get
> into other bindings with a greater potential for conflict.

Thank you, and I do have some sympathy for that point of view. It seems that we can't ever replace any bindings, no matter how rarely used, but that's not your fault.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Tue, 20 Oct 2020 16:07:02 GMT) Full text and rfc822 format available.

Message #44 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Mattias Engdegård <mattiase <at> acm.org>, Andrii
 Kolomoiets <andreyk.mad <at> gmail.com>
Cc: Alan Third <alan <at> idiocy.org>,
 Daniel Martín <mardani29 <at> yahoo.es>,
 43948 <at> debbugs.gnu.org
Subject: RE: bug#43948: 28.0.50; [PATCH][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Tue, 20 Oct 2020 09:06:33 -0700 (PDT)
> Similarly, should M-mouse-1 be bound to rectangular selection, since Option-
> drag-mouse appears to be the platform convention?
> (It seems unlikely that there would be a sizeable population of secondary
> selection users on NS, but what do I know.)

FWIW -

The secondary selection is, I think, simply not
as well known as it could/should be.  I think
that if more people were aware if it they would
use it.

But the main reason, I think, that people aren't
aware of it, and also a reason they might not
use it even if they were aware of it, is that it
has no keyboard key bindings, by default.
___

My library second-sel.el provides additional
ways to obtain and use the secondary selection,
including obtaining it from the primary - and
vice versa, yanking it (including in Isearch),
and having its own ring (a la `kill-ring').

Suggested keyboard keys for it:

C-M-y       - yank, by default

  prefix arg:   0 - select it as region
              > 0 - move it to region's text
              < 0 - swap it with region

M-y         - yank from kill or secondary ring
              depending on previous command

C-x C-M-SPC - set start of secondary at point
C-x C-M-<return> - `secondary-save-then-kill'
                   does the same as `M-mouse-3'

https://www.emacswiki.org/emacs/SecondarySelection#second-sel.el




Reply sent to Alan Third <alan <at> idiocy.org>:
You have taken responsibility. (Mon, 09 Nov 2020 14:57:02 GMT) Full text and rfc822 format available.

Notification sent to Andrii Kolomoiets <andreyk.mad <at> gmail.com>:
bug acknowledged by developer. (Mon, 09 Nov 2020 14:57:02 GMT) Full text and rfc822 format available.

Message #49 received at 43948-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 43948-done <at> debbugs.gnu.org,
 Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Mon, 9 Nov 2020 14:55:55 +0000
On Wed, Oct 14, 2020 at 11:48:29PM +0300, Andrii Kolomoiets wrote:
> Alan Third <alan <at> idiocy.org> writes:
> 
> >> +** On macOS, 's-<left>' and 's-<right> are now bound to
> >                                          ^
> > Missing quote.
> 
> Fixed.
> Smells like bug report for electric-pair-mode to pair "'" in text-mode :)
> 
> >
> >> +'move-beginning-of-line' and 'move-end-of-line' respectively. The former
> >> +commands to select previous/next frame are still bound to 's-~' and 's-`'.
> >
> > I don't think you need the word "former" here. Other than that, LGTM.
> 
> And fixed.

I've pushed this to master.

Thanks!
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Thu, 12 Nov 2020 04:54:02 GMT) Full text and rfc822 format available.

Message #52 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: tsuucat <tsuucat <at> icloud.com>
To: andreyk.mad <at> gmail.com,
 Alan Third <alan <at> idiocy.org>
Cc: 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to 
 beginning/end of line
Date: Thu, 12 Nov 2020 13:52:59 +0900
(Sorry for late reply)

macOS’s 'Command-Left/Right Arrow’ is not same as 'Control-A/E'.

Why not use beginning-of-visual-line/end-of-visual-line?

--
tsuucat



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Thu, 12 Nov 2020 09:07:01 GMT) Full text and rfc822 format available.

Message #55 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: tsuucat <tsuucat <at> icloud.com>
Cc: Alan Third <alan <at> idiocy.org>, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Thu, 12 Nov 2020 11:06:02 +0200
tsuucat <tsuucat <at> icloud.com> writes:

> macOS’s 'Command-Left/Right Arrow’ is not same as 'Control-A/E'.
>
> Why not use beginning-of-visual-line/end-of-visual-line?

Isn't the visual-line-mode designed for this?

I see two issues with binding s-<right> to end-of-visual-line:

1. emacs -Q
2. M-: (set-frame-width nil 50)
3. M-<
4. M-x end-of-visual-line
The point moved to the beginning of the next visual line
5. M-<
6. M-x toggle-truncate-lines
7. M-x end-of-visual-line
The point is not moved to the end of the line.  Other macos apps will
move point to the end of the line.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Thu, 12 Nov 2020 10:05:02 GMT) Full text and rfc822 format available.

Message #58 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: tsuucat <tsuucat <at> icloud.com>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: Alan Third <alan <at> idiocy.org>, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to 
 beginning/end of line
Date: Thu, 12 Nov 2020 19:04:33 +0900

> Andrii Kolomoiets <andreyk.mad <at> gmail.com> writes:
> 
> tsuucat <tsuucat <at> icloud.com> writes:
> 
>> macOS’s 'Command-Left/Right Arrow’ is not same as 'Control-A/E'.
>> 
>> Why not use beginning-of-visual-line/end-of-visual-line?
> 
> Isn't the visual-line-mode designed for this?
> 
> I see two issues with binding s-<right> to end-of-visual-line:
> 
> 1. emacs -Q
> 2. M-: (set-frame-width nil 50)
> 3. M-<
> 4. M-x end-of-visual-line
> The point moved to the beginning of the next visual line
> 5. M-<
> 6. M-x toggle-truncate-lines
> 7. M-x end-of-visual-line
> The point is not moved to the end of the line.  Other macos apps will
> move point to the end of the line.

I confirmed M-x end-of-visual-line behaves differently with visual-line-mode
enabled than it does with visual-line-mode disabled (= end-of-visual-line is
intended with visual-line-mode enabled).

So Emacs doesn’t provide macOS 'Command-Left/Right Arrow’ equivalent
commands but using move-(beginning|end)-of-line is the most suitable choice.

Sorry for the noise. 🙇



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Thu, 12 Nov 2020 14:40:02 GMT) Full text and rfc822 format available.

Message #61 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: alan <at> idiocy.org, tsuucat <at> icloud.com, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50;
 [PATHC][NS] Make s-<left/right> to move to beginning/end of line
Date: Thu, 12 Nov 2020 16:39:14 +0200
> From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
> Date: Thu, 12 Nov 2020 11:06:02 +0200
> Cc: Alan Third <alan <at> idiocy.org>, 43948 <at> debbugs.gnu.org
> 
> 2. M-: (set-frame-width nil 50)
> 3. M-<
> 4. M-x end-of-visual-line
> The point moved to the beginning of the next visual line

What else did you expect, in a continued line?  There's no place to
show the cursor except at the beginning of the next screen line.

> 5. M-<
> 6. M-x toggle-truncate-lines
> 7. M-x end-of-visual-line
> The point is not moved to the end of the line.

It is, but you need to disable auto-hscroll-mode to see that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Thu, 12 Nov 2020 23:21:01 GMT) Full text and rfc822 format available.

Message #64 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: alan <at> idiocy.org, tsuucat <at> icloud.com, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Fri, 13 Nov 2020 01:20:36 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> 2. M-: (set-frame-width nil 50)
>> 3. M-<
>> 4. M-x end-of-visual-line
>> The point moved to the beginning of the next visual line
>
> What else did you expect, in a continued line?  There's no place to
> show the cursor except at the beginning of the next screen line.

Well, sometimes the cursor is on the fringe.  With "bar" cursor type
this leads to interesting behavior:
emacs -Q
M-: (set-frame-width nil 70)
M-: (setq cursor-type 'bar)

Now it's easy to place the cursor after the "." on the first line:
M-< C-e
But it is not possible to place the cursor after last "e" on the second
line.

IIRC it's because the cursor is actually "on" some character and not
"before" or "after" it.  And at the end of the first line the cursor is
on the "new line" character.

>> 5. M-<
>> 6. M-x toggle-truncate-lines
>> 7. M-x end-of-visual-line
>> The point is not moved to the end of the line.
>
> It is, but you need to disable auto-hscroll-mode to see that.

Yes, the point is correctly moved to the end of visual line.

I didn't mean to say the behavior of the 'end-of-visual-line' function
is wrong.  I tried to say that behavior of the 'end-of-visual-line'
function outside the 'visual-line-mode' can be surprising for the users
who press Command-<Right Arrow> to go to the end of the line.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Fri, 13 Nov 2020 05:33:01 GMT) Full text and rfc822 format available.

Message #67 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: tsuucat <tsuucat <at> icloud.com>
Cc: alan <at> idiocy.org, andreyk.mad <at> gmail.com, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50;
 [PATHC][NS] Make s-<left/right> to move to  beginning/end of line
Date: Fri, 13 Nov 2020 00:32:04 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Emacs commands should be compatible across operating systems.
We should not vary the meanings of text editing commands based
on platform.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43948; Package emacs. (Fri, 13 Nov 2020 08:07:01 GMT) Full text and rfc822 format available.

Message #70 received at 43948 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: alan <at> idiocy.org, tsuucat <at> icloud.com, 43948 <at> debbugs.gnu.org
Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to
 beginning/end of line
Date: Fri, 13 Nov 2020 10:05:44 +0200
> From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
> Cc: tsuucat <at> icloud.com,  alan <at> idiocy.org,  43948 <at> debbugs.gnu.org
> Date: Fri, 13 Nov 2020 01:20:36 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> 2. M-: (set-frame-width nil 50)
> >> 3. M-<
> >> 4. M-x end-of-visual-line
> >> The point moved to the beginning of the next visual line
> >
> > What else did you expect, in a continued line?  There's no place to
> > show the cursor except at the beginning of the next screen line.
> 
> Well, sometimes the cursor is on the fringe.

Can't be done in this case, because the fringe is "taken" by the
continuation bitmap.

> With "bar" cursor type this leads to interesting behavior:
> emacs -Q
> M-: (set-frame-width nil 70)
> M-: (setq cursor-type 'bar)
> 
> Now it's easy to place the cursor after the "." on the first line:
> M-< C-e
> But it is not possible to place the cursor after last "e" on the second
> line.
> 
> IIRC it's because the cursor is actually "on" some character and not
> "before" or "after" it.

Technically, because we decide where to place the cursor before we
know what is the shape of the cursor.  And yes, we draw the cursor
inside a certain character cell (because that's what users generally
expect).

> And at the end of the first line the cursor is on the "new line"
> character.

Right.

> I didn't mean to say the behavior of the 'end-of-visual-line' function
> is wrong.  I tried to say that behavior of the 'end-of-visual-line'
> function outside the 'visual-line-mode' can be surprising for the users
> who press Command-<Right Arrow> to go to the end of the line.

Agreed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Dec 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.