all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ynyaaa@gmail.com
To: Eli Zaretskii <eliz@gnu.org>
Cc: 46464@debbugs.gnu.org
Subject: bug#46464: 27.1; wide images are hidden partially at the right edge of window
Date: Mon, 15 Feb 2021 22:40:56 +0900	[thread overview]
Message-ID: <86pn11fnyv.fsf@gmail.com> (raw)
In-Reply-To: <83h7mebpgc.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Feb 2021 18:10:11 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: ynyaaa@gmail.com
>> Cc: 46464@debbugs.gnu.org
>> Date: Sun, 14 Feb 2021 23:30:27 +0900
>> 
>> > This is the intended behavior: Emacs silently crops images that don't
>> > fit on their screen line.
>> 
>> What means by "images that don't fit on their screen line"?
>
> It means the image is wider than the space left on the screen line
> from the image's position to the edge of the window.
>
>> If a edge of a image is near the right edge of the window,
>> the image is mostly hidden. It is not preferable.
>
> That's how Emacs behaved since v21.

If the width of the iamge is 200 pixels, typing some characters at the
beginning of the same line, the image moves to the right and gets hidden
gradually and is wrapped to the next visual line.

If the width of the image is 150 pixels, the entire image does not get
hidden and it is wrapped when the image right edge is going to across
the right edge of the window.

What is the difference?

>> And if :margin is specified, the image may be hidden completely.
>> 
>> By the way, if :margin is specified, a partial image on the right edge
>> of the window is displayed with right margin.
>
> I don't think I understand what you mean by that.  Can you show a test
> case?

Evaluating the form below, four images are supposed to be displayed in
the first visual line. But the fourth image is invisible. Similar for
the second visual line.

If ':margin 5' is replaced with ':margin 20', three images are displayed
in the first to third visual lines. Third image in each visual line is
truncated at the x-coordinate 20 pixels apart from the right edge of the
window. It looks as if the image is not truncated and is small.

(dotimes (i 10)
  (let* ((w 200) (h 30) (sw 6)
         (color (nth (% i 5) '("red" "green" "blue" "yellow" "orange")))
         (svg (format "<svg width=\"%g\" height=\"%g\"
 version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">
<rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" stroke=\"%s\"
 stroke-width=\"%g\" fill=\"grey\"/>
</svg>" w h (/ sw 2) (/ sw 2) (- w sw) (- h sw) color sw)))
    (insert-image (create-image svg 'svg t :margin 5 :scale 1))))





  reply	other threads:[~2021-02-15 13:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 15:11 bug#46464: 27.1; wide images are hidden partially at the right edge of window ynyaaa
2021-02-13 13:01 ` Eli Zaretskii
2021-02-14 14:30   ` ynyaaa
2021-02-14 16:10     ` Eli Zaretskii
2021-02-15 13:40       ` ynyaaa [this message]
2021-02-15 15:41         ` Eli Zaretskii
2021-02-16 18:56           ` 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=86pn11fnyv.fsf@gmail.com \
    --to=ynyaaa@gmail.com \
    --cc=46464@debbugs.gnu.org \
    --cc=eliz@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.