all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
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 13:34:26 +0000	[thread overview]
Message-ID: <875yog4pzx.fsf@posteo.net> (raw)
In-Reply-To: <83wngwk7vh.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 14 Mar 2022 14:59:14 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

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

I didn't know that, thank you for the background information!

-- 
	Philip Kaludercic





  reply	other threads:[~2022-03-14 13:34 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
2022-03-14 13:34         ` Philip Kaludercic [this message]
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=875yog4pzx.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=54374@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.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.