From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#47240: Images Treated as Whitespace and Removed from Buffer Date: Fri, 19 Mar 2021 09:45:35 +0100 Message-ID: <87lfajmt00.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5077"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47240@debbugs.gnu.org To: "Spaulding, Jeff" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 19 09:46:29 2021 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 1lNAm4-0001DM-RJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Mar 2021 09:46:28 +0100 Original-Received: from localhost ([::1]:50794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNAm3-0005tH-NB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Mar 2021 04:46:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNAlf-0005rk-MQ for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 04:46:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNAle-00070R-Ek for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 04:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNAle-0000rg-BM for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 04:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Mar 2021 08:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47240 X-GNU-PR-Package: emacs Original-Received: via spool by 47240-submit@debbugs.gnu.org id=B47240.16161435462413 (code B ref 47240); Fri, 19 Mar 2021 08:46:02 +0000 Original-Received: (at 47240) by debbugs.gnu.org; 19 Mar 2021 08:45:46 +0000 Original-Received: from localhost ([127.0.0.1]:48780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNAlN-0000ca-Pz for submit@debbugs.gnu.org; Fri, 19 Mar 2021 04:45:46 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:52960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNAlM-0000XA-V1 for 47240@debbugs.gnu.org; Fri, 19 Mar 2021 04:45:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LUQBY59jxOCaDdsLiu+ar4/AMOHb7XGOTyG8REE2bAk=; b=pnjv4J5WzjEaKtpvoHTKFoZQRS ZXc/N4zE6PRgXKElLYEMEbJiSYCwxWaikidl3dGro0TrnzayqIe1Ypi/fjJCQNSPmfZZX9nbYphEk exmoT41DT7dxgt2StNjJXMV/5IffiTeFAMQnCwKC4QFgSd8l03xLoVCuZTX1y0iaOEaU=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNAlE-0007BN-EQ; Fri, 19 Mar 2021 09:45:38 +0100 X-Now-Playing: Sam Amidon's _Sam Amidon_: "Hallelujah" In-Reply-To: (Jeff Spaulding's message of "Thu, 18 Mar 2021 01:04:18 +0000") 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" Xref: news.gmane.io gmane.emacs.bugs:202673 Archived-At: "Spaulding, Jeff" writes: > Press M-: to bring up an Eval: prompt in the minibuffer. Enter the > following elisp code: > > (insert-image (create-image "test.png")) > > The image will appear in the buffer. > > Press Enter. The image will disappear. > > The image seems to always be deleted if the enter key is pressed (bound > to the newline function), but not when C-j is pressed (bound to the > electric-newline-and-maybe-indent function). The image will not be > deleted if there is any text following it on the line. This suggests > the image is being treated as trailing whitespace, as trailing > whitespace is treated in the same way. I think this is working basically as designed. By default, images are whitespace and handled as such, but if you don't want that, you have to say (insert-image (create-image "test.png") "*") or something like that. So I'm not sure whether there's anything to fix here. Does anybody else have an opinion here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no