From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32978: 26.1; newline-and-indent duplicates displayed image Date: Mon, 15 Oct 2018 05:33:56 +0300 Message-ID: <83bm7wszu3.fsf@gnu.org> References: <87k1mtcvcf.fsf@metalevel.at> <83tvlotwz9.fsf@gnu.org> <87lg70mfcd.fsf@metalevel.at> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1539570788 16411 195.159.176.226 (15 Oct 2018 02:33:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2018 02:33:08 +0000 (UTC) Cc: 32978@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 15 04:33:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBsgp-0004Ac-Ra for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Oct 2018 04:33:03 +0200 Original-Received: from localhost ([::1]:50097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBsiw-0006Nw-Fo for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2018 22:35:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBsin-0006Nl-C9 for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 22:35:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBsik-0000hY-7F for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 22:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45434) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBsik-0000hB-1P for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 22:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gBsij-0002Ie-SQ for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2018 22:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Oct 2018 02:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32978 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 32978-submit@debbugs.gnu.org id=B32978.15395708468764 (code B ref 32978); Mon, 15 Oct 2018 02:35:01 +0000 Original-Received: (at 32978) by debbugs.gnu.org; 15 Oct 2018 02:34:06 +0000 Original-Received: from localhost ([127.0.0.1]:49692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBshp-0002HI-N3 for submit@debbugs.gnu.org; Sun, 14 Oct 2018 22:34:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBsho-0002GP-MS for 32978@debbugs.gnu.org; Sun, 14 Oct 2018 22:34:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBshg-0000By-G6 for 32978@debbugs.gnu.org; Sun, 14 Oct 2018 22:33:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBshX-00007M-8X; Sun, 14 Oct 2018 22:33:47 -0400 Original-Received: from [176.228.60.248] (port=2626 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gBshW-0003PT-SW; Sun, 14 Oct 2018 22:33:47 -0400 In-reply-to: <87lg70mfcd.fsf@metalevel.at> (message from Markus Triska on Sun, 14 Oct 2018 22:40:50 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151254 Archived-At: tags 32978 notabug thanks > From: Markus Triska > Cc: 32978@debbugs.gnu.org > Date: Sun, 14 Oct 2018 22:40:50 +0200 > > > Not sure why you expected that. Perhaps you thought that forward-char > > will move to after the image? > > Yes indeed! Since a single forward-char moves over the image when used > interactively, I got the impression that the image is only a single > character. From your code example, I see that this is not the case! No, it's not. You can see in image-file.el that what insert-image-file does is insert the entire image file into the buffer, and then put a 'display' property over all those bytes. So the image spans many characters in this case. > I think a very good solution would be to document the return value of > insert-image-file, i.e., to add to its description a statement such as: > > Returns list of absolute file name and number of characters > inserted. > > What do you think? I was thinking the same; will do.