unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Jean Louis <bugs@gnu.support>
Cc: 58379@debbugs.gnu.org, larsi@gnus.org
Subject: bug#58379: 29.0.50; eww: can't align table row
Date: Tue, 11 Oct 2022 13:01:41 -0700	[thread overview]
Message-ID: <17491ED7-0293-4ED0-B214-9A256F5F4D4A@gmail.com> (raw)
In-Reply-To: <86v8ouh2w2.fsf@protected.rcdrun.com>


Jean Louis <bugs@gnu.support> writes:

> * Lars Ingebrigtsen <larsi@gnus.org> [2022-10-08 16:45]:
>> Jean Louis <bugs@gnu.support> writes:
>> 
>> > It would be good to have proper eww table rendering.
>> 
>> The Emacs display engine doesn't support flowing text around images --
>> an image is just one very big character, so you can't have two lines of
>> text next to an image.
>> 
>> So shr just puts all images in tables after tables.
>
> Closing the bug does not make it less bug. Please do not close.
>
> I have researched today and found that Telega can splice images and
> thus show very nicely image and text next to each other, including in
> multiple lines.
>
> Would that not be good improvement in Emacs to be able to display
> image and text side by side?
>
> I suggest looking into Telega, as the trick that author uses is
> splicing images. I can see chars side by side to the image and image
> appears very correctly and is scrollable.
>
> ;; Author: Zajcev Evgeny <zevlg@yandex.ru>
> ;; Created: Wed Nov 30 19:04:26 2016
> ;; URL: https://github.com/zevlg/telega.el
>
> telega-ins--image-slices is a byte-compiled Lisp function in
> ‘telega-ins.el’.
>
> (telega-ins--image-slices IMAGE &optional PROPS SLICE-FUNC)
>
> Insert sliced IMAGE at current column.
> PROPS - additional image properties.
> SLICE-FUNC - function called after inserting slice. Called with
> single argument - slice number, starting from 0.
>
> I do not understand the code yet. It would be nice if somebody can
> help on this to become able to construct image and text on the side.

Telaga can do that because it uses fixed-width characters, so everything
aligns nicely. As far as I know shr uses veriable-width characters so
the same is much harder to do in shr, not to mention that telaga only do
this for the profile image on the beginning of a line, whereas shr needs
to handle complicated layout, like tables.

Yuan





  parent reply	other threads:[~2022-10-11 20:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08 13:16 bug#58379: 29.0.50; eww: can't align table row Jean Louis
2022-10-08 13:44 ` Lars Ingebrigtsen
2022-10-08 17:27   ` Jean Louis
2022-10-11 20:01 ` Yuan Fu [this message]
2022-10-24  4:19   ` Jean Louis

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=17491ED7-0293-4ED0-B214-9A256F5F4D4A@gmail.com \
    --to=casouri@gmail.com \
    --cc=58379@debbugs.gnu.org \
    --cc=bugs@gnu.support \
    --cc=larsi@gnus.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 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).