From: Eli Zaretskii <eliz@gnu.org>
To: Philip Kaludercic <philipk@posteo.net>
Cc: 54374@debbugs.gnu.org, juri@linkov.net
Subject: bug#54374: 29.0.50; previous-completion fails at beginning of completions buffer
Date: Mon, 14 Mar 2022 14:59:14 +0200 [thread overview]
Message-ID: <83wngwk7vh.fsf@gnu.org> (raw)
In-Reply-To: <87wngx9c8i.fsf@posteo.net> (message from Philip Kaludercic on Mon, 14 Mar 2022 08:20:29 +0000)
> From: Philip Kaludercic <philipk@posteo.net>
> Cc: juri@linkov.net, 54374@debbugs.gnu.org
> Date: Mon, 14 Mar 2022 08:20:29 +0000
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Philip Kaludercic <philipk@posteo.net>
> >> Date: Sun, 13 Mar 2022 20:39:53 +0000
> >> Cc: 54374@debbugs.gnu.org
> >>
> >> - (while (< n 0)
> >> + (while (and (< n 0) (< 1 (point)))
> >
> > Please always use point-min, never a literal 1.
>
> Can do, but does it make a difference in this case? The only reason the
> comparison is made is so that (1- (point)) doesn't return an invalid
> point value.
Any buffer position outside of the accessible portion of the buffer is
almost always invalid; the number of APIs which tolerate such values
of buffer position is very small.
Here, try this:
emacs -Q
M-: (narrow-to-region 20 (point-max)) RET
M-: (get-text-property 1 'mouse-face) RET
You will get the same args-out-of-range error. That's because
get-text-property validates the position against the accessible
portion of the buffer, not against some absolute values.
next prev parent reply other threads:[~2022-03-14 12:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-13 17:39 bug#54374: 29.0.50; previous-completion fails at beginning of completions buffer Juri Linkov
2022-03-13 20:39 ` Philip Kaludercic
2022-03-14 3:22 ` Eli Zaretskii
2022-03-14 8:20 ` Philip Kaludercic
2022-03-14 12:59 ` Eli Zaretskii [this message]
2022-03-14 13:34 ` Philip Kaludercic
2022-03-14 8:35 ` Andreas Schwab
2022-03-14 8:30 ` Juri Linkov
2022-03-14 14:12 ` Philip Kaludercic
2022-03-14 18:24 ` Juri Linkov
2022-03-18 21:49 ` Philip Kaludercic
2022-03-19 19:13 ` Juri Linkov
2022-05-24 19:12 ` Juri Linkov
2022-05-26 16:26 ` Juri Linkov
2022-05-27 16:13 ` Juri Linkov
2022-03-24 18:11 ` Juri Linkov
2022-03-14 15:21 ` bug#54374: [External] : " Drew Adams
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=83wngwk7vh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=54374@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=philipk@posteo.net \
/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.