From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Bremner Newsgroups: gmane.emacs.devel Subject: help understanding overlay behaviour with images Date: Wed, 16 Aug 2023 07:45:12 -0300 Message-ID: <87sf8jtgef.fsf@motzkin.cs.unb.ca> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12258"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 16 13:12:35 2023 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 1qWES3-000310-Aw for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Aug 2023 13:12:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWEQx-0004E5-Sz; Wed, 16 Aug 2023 07:11:27 -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 1qWE1d-0006i2-Fj for emacs-devel@gnu.org; Wed, 16 Aug 2023 06:45:17 -0400 Original-Received: from phubs.tethera.net ([2607:5300:60:3a9d::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWE1b-0007z4-2R for emacs-devel@gnu.org; Wed, 16 Aug 2023 06:45:17 -0400 Original-Received: from motzkin.cs.unb.ca (fctnnbsc51w-159-2-210-253.dhcp-dynamic.fibreop.nb.bellaliant.net [159.2.210.253]) by phubs.tethera.net (Postfix) with ESMTPS id AAB1D180172 for ; Wed, 16 Aug 2023 07:45:13 -0300 (ADT) Original-Received: (nullmailer pid 53257 invoked by uid 1000); Wed, 16 Aug 2023 10:45:12 -0000 Received-SPF: pass client-ip=2607:5300:60:3a9d::1; envelope-from=david@tethera.net; helo=phubs.tethera.net 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_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 16 Aug 2023 07:11:27 -0400 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308809 Archived-At: I'm not sure if this is a bug or if I misunderstand something. In the following code sample I expect the image to be hidden, but it isn't, unless I also hide the previous character, i.e. pass 10 as the first argument to make-overlay. In both Emacs 28.2 and 29.1 (tested on Debian), it gets some weird in between state where the point skips over the image when running left-char or right-char, but the image stays visible. (let ((buf (get-buffer-create "image-buffer")) (img (find-image '((:type xpm :file "attach.xpm")))) (overlay nil)) (switch-to-buffer buf) (insert "0123456789") (insert-image img "x") (insert "0123456789") (insert "\n") (setq overlay (make-overlay 11 12)) (overlay-put overlay 'invisible t) (message "props=%s" (overlay-properties overlay))) P.S. I'm not subscribed to emacs-devel, so please CC me any answers.