From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Al Haji-Ali Newsgroups: gmane.emacs.bugs Subject: bug#62637: 29.0.60; Issues when displaying images Date: Mon, 03 Apr 2023 19:30:38 +0100 Message-ID: References: <83355hw0l5.fsf@gnu.org> <83iledudtc.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="35100"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 62637@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 03 20:32:35 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 1pjOyp-0008wg-IR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Apr 2023 20:32:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjOxY-0001ft-1e; Mon, 03 Apr 2023 14:31:16 -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 1pjOxK-0001QC-Kr for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 14:31: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 1pjOxK-0000gt-CN for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 14:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjOxJ-00066q-P0 for bug-gnu-emacs@gnu.org; Mon, 03 Apr 2023 14:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Al Haji-Ali Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Apr 2023 18:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62637 X-GNU-PR-Package: emacs Original-Received: via spool by 62637-submit@debbugs.gnu.org id=B62637.168054665223470 (code B ref 62637); Mon, 03 Apr 2023 18:31:01 +0000 Original-Received: (at 62637) by debbugs.gnu.org; 3 Apr 2023 18:30:52 +0000 Original-Received: from localhost ([127.0.0.1]:45240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjOx9-00066T-SU for submit@debbugs.gnu.org; Mon, 03 Apr 2023 14:30:52 -0400 Original-Received: from mail-wm1-f53.google.com ([209.85.128.53]:50830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjOx7-00066E-E5 for 62637@debbugs.gnu.org; Mon, 03 Apr 2023 14:30:50 -0400 Original-Received: by mail-wm1-f53.google.com with SMTP id n19so17664276wms.0 for <62637@debbugs.gnu.org>; Mon, 03 Apr 2023 11:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680546643; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=igKFFydEeZNWNAiLdp2geDTAaMaVeG9laEjEUHHTSkI=; b=FM39b1NNGsbfg6Jte405PvsuL6g1hm+TzpW74KpBMRz31qrapARuLOTqbjf38CZkLA BqRHLHA9nqmI2LiofNOZwekhgBYPQ5GAGNWoJM5BXl/9aUN9e3SD9qTftX+oHLDBg3n9 Zt4A+FnZr74XfoLv+MDZObpxYBfzn8V0OJ/M3tGYbvCD+MGjLCnkRRImPLQuzIGVCZet FiQzAsgibKbP/k9ihz8Z/JHbdBa5XglTf45cd1/M/O7jI2MenfUsXyIvhrIbfC4AFzDT NuJf7s96GVxlx//nvp4Pl7XMS99edu1J+gX2uo0O8fETEf0xzDx8jZxlxW8W5rlB2Rvd wyPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680546643; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=igKFFydEeZNWNAiLdp2geDTAaMaVeG9laEjEUHHTSkI=; b=e44iC0EZL4O1wDWNf4wyNHQW+/3o3A3oE9WotOQ0g1N0dB4tbQ8Pl2bhP9Td7ddj7N joyrlk7897ewAl8FD6yy6car29APwzAFBTJL9sU9uRkQSL4A4RAuwZMPnXOiS9tRGhWR kiZBRoV/avEYC8J6AmYTR8pdFiqmwwSyColtJsNtMo937zPtcVixxaVp+Ym5x+A1RNbe 7BubYJjdS4MjyN2tFXB/ClrtueAulFlgrx2HP7B3hjm7+T6RD72mwXwoDcC3nEG1DwyU g02WZF2Ma48zaP9AVLPuUm1j8sh2BDSXbi2bfxZEIp+SLxj9MCu3QSkY10rNdbG/fXZI 8psw== X-Gm-Message-State: AAQBX9f3hWHWqiljF5/qE0M+Wy6q6MMhPlori5twlev/mn0Xv/lXXtKo vlSvgX2FhoIjgMtcoZ3yuc0= X-Google-Smtp-Source: AKy350Zb95Lq6XKia2U37r9GvN/UhcNCUTqH2CDHGA6X1gJM2xh2K9tze8mJ2nzCym90yposTo6qDw== X-Received: by 2002:a7b:ca55:0:b0:3ef:672a:2c93 with SMTP id m21-20020a7bca55000000b003ef672a2c93mr255236wml.36.1680546643380; Mon, 03 Apr 2023 11:30:43 -0700 (PDT) Original-Received: from localhost (sgyl-45-b2-v4wan-165314-cust948.vm6.cable.virginm.net. [92.236.87.181]) by smtp.gmail.com with ESMTPSA id t17-20020adff611000000b002c5a790e959sm10311457wrp.19.2023.04.03.11.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 11:30:42 -0700 (PDT) In-Reply-To: <83iledudtc.fsf@gnu.org> 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:259201 Archived-At: Thanks Lars for explaining. I understand the issue now regarding indentation. I think passing a non-empty string to `insert-image` in `mml-inline-image` (and maybe by default in `insert-image`?) would be better IMO. Regarding the overlay visibility, the issue for me was the different behaviour of `put-image` and `insert-image` in different cases. Which can be seen in the following example: (let (content-begin content-end (img (create-image "/tmp/tmp.png"))) (goto-char (point-max)) (insert "\ninsert-image:\n") (setq content-begin (point)) (insert-image img "I") (insert "\n") (setq content-end (point)) (overlay-put (make-overlay content-begin content-end) 'invisible t) (insert "\nput-image without new line:\n") (setq content-begin (point)) (put-image img (point-marker)) (setq content-end (point)) (overlay-put (make-overlay content-begin content-end) 'invisible t) (insert "\nput-image with new line:\n") (setq content-begin (point)) (put-image img (point-marker)) (insert "\n") (setq content-end (point)) (overlay-put (make-overlay content-begin content-end) 'invisible t)) This code tests overlay visibility for images with three cases: - using insert-image: as you explained this does not work as expected. - using put-image: Since put-images uses an overlay, I guess the same logic applies. - put-image with a newline: Seems to work for some reason. This is what `mml-inline-image` was using before and why notmuch was working. Sorry for the noise. I am not sure there's a bug in this case, only unjustified expectations as you put it. Best regards, -- Al On 03/04/2023, Eli Zaretskii wrote: > > >> Cc: 62637@debbugs.gnu.org >> Date: Mon, 03 Apr 2023 16:35:02 +0300 >> From: Eli Zaretskii >> >> As for indentation: put-image uses a different default for the text on >> which it puts the image 'display' property. That explains why >> re-indentation didn't remove the image in Emacs 28. > > Actually, put-image uses an overlay string with the 'display' > property, so it doesn't put the property on buffer text, and thus > re-indentation doesn't affect it.