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: Sat, 10 Sep 2022 05:02:56 +0200 Message-ID: <87y1us0w4f.fsf@logand.com> References: <87v8pz18wf.fsf@mail.jao.io> <83o7vrgimc.fsf@gnu.org> <87wnafdnee.fsf@logand.com> <87a67bymys.fsf@mail.jao.io> <87h71hekyu.fsf@logand.com> <837d2dekao.fsf@gnu.org> <875yhxeiqq.fsf@logand.com> <835yhxdrvy.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="16032"; 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 Sat Sep 10 05:03:58 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 1oWqmk-00040D-2m for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 05:03:58 +0200 Original-Received: from localhost ([::1]:39224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWqmi-0006LS-M4 for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Sep 2022 23:03:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWqlr-0005dO-Q2 for emacs-devel@gnu.org; Fri, 09 Sep 2022 23:03:03 -0400 Original-Received: from logand.com ([37.48.87.44]:54426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWqlp-0002mS-0A; Fri, 09 Sep 2022 23:03:03 -0400 Original-Received: by logand.com (Postfix, from userid 1001) id 7588B1A1818; Sat, 10 Sep 2022 05:02:58 +0200 (CEST) X-Mailer: emacs 28.1 (via feedmail 11-beta-1 I) In-Reply-To: <835yhxdrvy.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:295097 Archived-At: On Fri 09 Sep 2022 at 08:43, Eli Zaretskii wrote: > Yes, by changing the C code not to do that. > >> >> (image-size (create-image "/tmp/a.jpg")) >> >> => (error "Window system frame should be used") >> > >> > This is us deliberately failing image-size early on, because we don't >> > want complications down the road, and because we know images cannot be >> > displayed on TTY frames. >> >> I am asking emacs to tell me the size of the image. >> I am not asking emacs to display it. > > But the code involved reuses some subroutines that are used for > display as well, and those signal an error. > > It is never a problem with the current code because only GUI frames > can display images. To get TTY frames be capable of some of that > functionality, we need changes on the C level (and perhaps also in > Lisp), but those changes are rather mechanical -- find out which code > signals the error and modify it to do that on some new condition, or > not at all. Understand. Thank you for the explanation.