unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: JD Smith <jdtsmith@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 67533@debbugs.gnu.org, Manuel Giraud <manuel@ledu-giraud.fr>
Subject: bug#67533: SVG images confound position pixel measurements
Date: Fri, 1 Dec 2023 11:17:49 -0500	[thread overview]
Message-ID: <12BD906C-11C1-482E-B980-6F831CAD0B4E@gmail.com> (raw)
In-Reply-To: <83bkb9ap7b.fsf@gnu.org>



> On Dec 1, 2023, at 10:59 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>>>>> What is the meaning of negative offset from the first line of the
>>>>> buffer? there's no screen line at that offset, so what do you expect
>>>>> that to do?  Or what am I missing?
>>>> 
>>>> In that case I would expect zero pixel height is returned.
>>> 
>>> Why zero?  Why not consider that undefined behavior?
>> 
>> Depends on what the natural height on a non-existent line is.  Zero makes sense to me.  But I suppose returning height=nil or something else to indicate “I gave up” would also be reasonable.
> 
> A non-existent line can have any height, including an infinite one.
> Since that line doesn't exist, any assertion about it cannot be
> disproved.

As a general statement, of course.  But since the docs say:

> The optional argument FROM, if non-nil, specifies the first text
> position to consider, and defaults to the minimum accessible position
> of the buffer.


would it not be reasonable that (FROM . (- too-many-pixels)) would also “default to the minimum accessible position”, should the offset prove to be too-many-pixels?  Then, by symmetry, asking for pixel measurements beyond the final accessible line should "default
to the maximum accessible position of the buffer”.  Basically clip the request at the window’s boundaries.  But in any case, the answer to this specific question is I believe a side issue for this bug.






  reply	other threads:[~2023-12-01 16:17 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E44B7B4B-8FE9-41EB-BF7B-93AC5EAEAC07@gmail.com>
2023-11-29 20:31 ` bug#67533: SVG images confound position pixel measurements JD Smith
2023-11-30 17:32   ` Eli Zaretskii
2023-11-30 21:00     ` JD Smith
2023-12-01  7:08       ` Eli Zaretskii
2023-12-01 22:04         ` JD Smith
2023-12-02  7:30           ` Eli Zaretskii
2023-12-02 13:36             ` JD Smith
2023-12-02 14:18               ` Eli Zaretskii
2023-12-02 19:39                 ` Eli Zaretskii
2023-12-02 21:44                   ` JD Smith
2023-12-03  3:04                     ` JD Smith
2023-12-03 13:02                       ` Eli Zaretskii
2023-12-03 15:48                         ` JD Smith
2023-12-03 15:52                           ` Eli Zaretskii
2023-12-03 16:31                             ` Eli Zaretskii
2023-12-03 21:25                               ` JD Smith
2023-12-03 23:14                                 ` JD Smith
2023-12-04  3:27                                 ` Eli Zaretskii
2023-12-04  4:32                                   ` JD Smith
2023-12-04 13:11                                     ` Eli Zaretskii
2023-12-04 14:14                                       ` JD Smith
2023-12-16  9:32                                         ` Eli Zaretskii
2023-12-16 15:07                                           ` JD Smith
2023-12-16 15:23                                             ` Eli Zaretskii
2023-12-03 15:49                         ` JD Smith
2023-12-03 16:33                           ` Eli Zaretskii
2023-12-03 18:58                             ` JD Smith
2023-12-01 14:40     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-01 14:55       ` Eli Zaretskii
2023-12-01 15:21         ` JD Smith
2023-12-01 15:36           ` Eli Zaretskii
2023-12-01 15:45             ` JD Smith
2023-12-01 15:59               ` Eli Zaretskii
2023-12-01 16:17                 ` JD Smith [this message]
2023-12-01 16:30                   ` Eli Zaretskii
2023-12-01 16:27         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-01 16:31           ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=12BD906C-11C1-482E-B980-6F831CAD0B4E@gmail.com \
    --to=jdtsmith@gmail.com \
    --cc=67533@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).