all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Justin Burkett <justin@burkett.cc>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Patch for beginning-of-visual-line and end-of-visual-line
Date: Sat, 12 Aug 2017 07:54:16 -0400	[thread overview]
Message-ID: <CAF5dqN+ZRFRxWLi7EEhgj5Y0Lmfm0df+k1DnFnbJwcY13tx5HA@mail.gmail.com> (raw)
In-Reply-To: <83fucxqonl.fsf@gnu.org>

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

> So I think this behavior is correct, perhaps we should describe this
> special case in the doc string.  This function must end up at the
> beginning of a visual line, and in your case there's only one such
> place.  Note that (beginning-of-visual-line 1) and
> (beginning-of-visual-line) all end up in the same place in this case.


That's fine with me. While we're at it, move-beginning-of-line has the same
inconsistency in the docstring. Arguably it's not that special of a case.
With 50 lines in a buffer that doesn't end in a newline,
(beginning-of-visual-line 99) does not end up at the end of the buffer as
suggested by the docstring. In other words, it's the result of a buffer not
ending in a newline, not that there is only one line in the buffer.

Also, it would be nice to specify what the return value of these functions
is if the docstring will change.

Thanks,
Justin


On Sat, Aug 12, 2017 at 2:35 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Justin Burkett <justin@burkett.cc>
> > Date: Fri, 11 Aug 2017 17:10:23 -0400
> > Cc: emacs-devel@gnu.org
> >
> > $ emacs -Q
> > C-x b *test* RET
> > asdf
> > M-: (beginning-of-visual-line 2)
> >
> > point ends up at the beginning of the buffer for me. Note this doesn't
> > happen with a final newline in the buffer.
>
> Ah, that was the missing bit.
>
> So I think this behavior is correct, perhaps we should describe this
> special case in the doc string.  This function must end up at the
> beginning of a visual line, and in your case there's only one such
> place.  Note that (beginning-of-visual-line 1) and
> (beginning-of-visual-line) all end up in the same place in this case.
>

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

  reply	other threads:[~2017-08-12 11:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11 17:24 Patch for beginning-of-visual-line and end-of-visual-line Justin Burkett
2017-08-11 18:41 ` Eli Zaretskii
2017-08-11 21:10   ` Justin Burkett
2017-08-12  6:35     ` Eli Zaretskii
2017-08-12 11:54       ` Justin Burkett [this message]
2017-08-12 12:13         ` Eli Zaretskii
2017-08-12 13:14           ` Justin Burkett
2017-08-12 13:18             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF5dqN+ZRFRxWLi7EEhgj5Y0Lmfm0df+k1DnFnbJwcY13tx5HA@mail.gmail.com \
    --to=justin@burkett.cc \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.