From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Hlavaty Newsgroups: gmane.emacs.devel Subject: Re: Implementing image support for kitty terminal Date: Thu, 08 Sep 2022 20:30:39 +0200 Message-ID: <87k06den1s.fsf@logand.com> References: <87v8pz18wf.fsf@mail.jao.io> <83o7vrgimc.fsf@gnu.org> <87wnafdnee.fsf@logand.com> <835yhzgdyi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20043"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jao@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 08 20:38:36 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWMQ8-00053h-9R for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Sep 2022 20:38:36 +0200 Original-Received: from localhost ([::1]:33842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWMQ7-0005GA-Cm for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Sep 2022 14:38:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWMIr-0006j3-Cp for emacs-devel@gnu.org; Thu, 08 Sep 2022 14:31:05 -0400 Original-Received: from logand.com ([37.48.87.44]:36462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWMIm-0003hD-Po; Thu, 08 Sep 2022 14:31:04 -0400 Original-Received: by logand.com (Postfix, from userid 1001) id E35F71A1790; Thu, 8 Sep 2022 20:30:40 +0200 (CEST) X-Mailer: emacs 28.1 (via feedmail 11-beta-1 I) In-Reply-To: <835yhzgdyi.fsf@gnu.org> Received-SPF: pass client-ip=37.48.87.44; envelope-from=tom@logand.com; helo=logand.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295000 Archived-At: On Wed 07 Sep 2022 at 22:51, Eli Zaretskii wrote: > From: Tomas Hlavaty >> Second, tty emacs would need to somehow reserve rectangle for the image. >> This might be lots of work I guess. > The second part is the problem I'm talking about. The other two are > much simpler to add, I think. Maybe the difficulty comes from the idea that tty emacs should somehow match GUI emacs capabilities when displaying images. The original use-case in this thread was using kitty terminal to view documents like doc-view or pdf-tools. There is no need to implement full GUI like graphics capabilities for that. In emacs-framebuffer, I simply use the dimensions and position of the buffer to display images without changing any layouting in tty emacs. Adding images to eww would be more complex, but I guess the change could be to shr layouting written in elisp instead of changing emacs C code.