From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rah Guzar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62679: 29.0.60; Bindings on `image-map` cause error on sliced images Date: Thu, 06 Apr 2023 17:43:55 +0200 Message-ID: <87pm8hat4s.fsf@zohomail.eu> References: <87ttxubahz.fsf@zohomail.eu> <83o7o1qrew.fsf@gnu.org> Reply-To: Rah Guzar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18035"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.1; emacs 29.0.60 Cc: 62679@debbugs.gnu.org, Lars Ingebrigtsen To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 06 18:11:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pkSCh-0004Wh-EC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Apr 2023 18:11:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkSCV-0001pf-89; Thu, 06 Apr 2023 12:11:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkSCU-0001pO-64 for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 12:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkSCT-0006se-T4 for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 12:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkSCT-00018h-O9 for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 12:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rah Guzar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Apr 2023 16:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62679 X-GNU-PR-Package: emacs Original-Received: via spool by 62679-submit@debbugs.gnu.org id=B62679.16807974604370 (code B ref 62679); Thu, 06 Apr 2023 16:11:01 +0000 Original-Received: (at 62679) by debbugs.gnu.org; 6 Apr 2023 16:11:00 +0000 Original-Received: from localhost ([127.0.0.1]:54792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkSCR-00018N-HM for submit@debbugs.gnu.org; Thu, 06 Apr 2023 12:10:59 -0400 Original-Received: from sender11-pp-o91.zoho.eu ([31.186.226.249]:25247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkSCN-00018B-VD for 62679@debbugs.gnu.org; Thu, 06 Apr 2023 12:10:58 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1680797446; cv=none; d=zohomail.eu; s=zohoarc; b=KJ5oVgujVTbNDyrXqljepqvoUtUpBcG1bnU+4vXbRiBl/mZBHIQGUrIwlucv2zUtBf7yw6cj4FFaQ/oUuYTS43aUsVOAQko/3lXHxTDL4CTOo8NkFlyA1yxz426gOPuBGkoTvAVJA6mVhnq77GahveEzmQwoqdgWtS5++cxV1wc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1680797446; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=L13PyGAejYrsNjn7DxqZSeGMlc8gFYCPKGjhzM/zebg=; b=LANHIV0bYUX9Q015rAyfKaOKWxtnWrL+RFA01jLm9cEHgruPz19ebcE5+TuISUa1o9S70TXuVjqPaPiGQbGwdH1SXHqHZ+JpwxC8PllwskSZXhMhkiZMnx0q1A6abiHkLmb/OLNI2Qv/jZ5HDijLRnAph7U3dBxhRjszGqq+gno= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=zohomail.eu; spf=pass smtp.mailfrom=rahguzar@zohomail.eu; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1680797446; s=zoho; d=zohomail.eu; i=rahguzar@zohomail.eu; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=L13PyGAejYrsNjn7DxqZSeGMlc8gFYCPKGjhzM/zebg=; b=iLtCMqJdNqebiVE/DXFGlk/Ke9SfxIEUP/QJflHN6fJoUIsRsCPsw0/ry4rmrln7 1ds5ZFomPXF0k/xKLkFv7lH5tc0kw1LTiW6FJeHj9XbKGi5t6NQxmp7WHyEUjrxBMA3 4LzPgjjyY5ZsvcifCqN4aW3+huLJBhCaWU78QC28= Original-Received: from localhost (emp-235-28.eduroam.uu.se [130.238.235.28]) by mx.zoho.eu with SMTPS id 1680797444637280.1347334953499; Thu, 6 Apr 2023 18:10:44 +0200 (CEST) In-reply-to: <83o7o1qrew.fsf@gnu.org> X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259332 Archived-At: Hi Eli, I can confirm that the issue is mostly fixed now. One thing I noticed was that it is still possible to trigger the error by starting with my recipe before, moving the point to somewhere on the image and then using right arrow key. Since the image has a single column the point is now off image but on the same line. This buffer position still has the "image-map" and pressing e.g. "i +" still causes the error. I also see the artifacts you mentioned with "i -". I am using "insert-sliced-image" to insert image of typeset math in a comint derived mode and I have seen visual artifacts at the end of line there too and like in this case "describe-char" shows them to be control characters. The also seem to disappear on their own if I switch buffer and back. I haven't been able to get rid of them and can't reproduce them in "emacs -Q" so I might be doing something wrong but this makes me think this might be the result of creating the image with a ":max-width" property which might cause the equivalent of "i-". According to the info manual, the advantage of using sliced images is to get a more intuitive scrolling behavior and that is the reason I am using them. I think for everything else the image should behave as a single image. For that reason the behavior of "i r" seems correct to me. It rotates the image and then slices. From the perspective of scrolling it would nicer to have slices which have a fixed length and width so that number of slices changes when "i +" and "i -" are used. Thanks a lot! Rah Guzar Eli Zaretskii writes: >> Date: Wed, 05 Apr 2023 17:23:11 +0200 >> From: Rah Guzar via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> (let* ((image (create-image path-to-png 'png nil :mask 'heuristic)) >> (rows (max 1 (1- (cdr (image-size image)))))) >> (goto-char (point-max)) >> (insert "\n") >> (insert-sliced-image image " " nil rows)) >> ``` >> This inserts the image specified at the end of the buffer. The image >> has a `keymap` text property which include binding for various >> operations on images but moving point to the image and trying to use >> any of these (e.g. `i +` to increase image size) results in the error, >> >> Error running timer =E2=80=98image--change-size=E2=80=99: (error "No ima= ge under point") > > This should be fixed now on the emacs-29 branch. > > It isn't perfect: "i -" leaves display artifacts (which I think are > unrelated to this bug report per se), and "i r" doesn't really work, > except when you type 'r' 4 times in a row. But I'm not sure I > understand the conceptual meaning of rotating a sliced image, and even > resizing it doesn't necessarily have a clear-cut meaning IMO. > > Perhaps we should decide we don't support these operations for sliced > images, and simply show a different error message specifically about > that non-support? > > Lars, any comments and/or ideas?