GNU bug report logs - #35899
26.1; move-beginning-of-line sometimes does not move to beginning of line

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Markus Triska <triska@HIDDEN>; dated Sat, 25 May 2019 13:45:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 35899 <at> debbugs.gnu.org:


Received: (at 35899) by debbugs.gnu.org; 21 Jun 2019 12:31:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 21 08:31:28 2019
Received: from localhost ([127.0.0.1]:49887 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1heIhU-0008EL-2L
	for submit <at> debbugs.gnu.org; Fri, 21 Jun 2019 08:31:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58879)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1heIhS-000897-Gg
 for 35899 <at> debbugs.gnu.org; Fri, 21 Jun 2019 08:31:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39062)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1heIhG-0003Qt-Vt; Fri, 21 Jun 2019 08:31:16 -0400
Received: from [176.228.60.248] (port=2287 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1heIhD-0008NS-Sk; Fri, 21 Jun 2019 08:31:14 -0400
Date: Fri, 21 Jun 2019 15:30:39 +0300
Message-Id: <838stvp1cg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
In-reply-to: <871rznw8wt.fsf@HIDDEN> (message from Noam Postavsky on Fri,
 21 Jun 2019 06:05:22 -0400)
Subject: Re: bug#35899: 26.1;
 move-beginning-of-line sometimes does not move to beginning of line
References: <875zpylkxe.fsf@HIDDEN> <838suu4n1y.fsf@HIDDEN>
 <871rznw8wt.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35899
Cc: 35899 <at> debbugs.gnu.org, triska@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Noam Postavsky <npostavs@HIDDEN>
> Cc: Markus Triska <triska@HIDDEN>,  35899 <at> debbugs.gnu.org
> Date: Fri, 21 Jun 2019 06:05:22 -0400
> 
> >>    (If there’s an image in the line, this disregards newlines
> >>    which are part of the text that the image rests on.)
> >> 
> >> Hence, I expect this to move to position 1. For comparison, when I press
> >> C-a, it does move to position 1, as expected.
> >
> > "the text that the image rests on" refers to the text which is
> > "covered" by the display property, not the newlines in the binary data
> > that constitutes the image file's data.
> 
> If I create an image which rests on some newlines like this:
> 
>     (let ((img (create-image "bug-35899-hello.png")))
>       (insert "abc")
>       (insert-image img "foo\nbar\nbaz")
>       (insert "def"))
> 
> Then with point after "def", move-beginning-of-line stops "inside" the
> image.  And I don't see anything in its code which would allow it to
> skip the image.  Isn't this just a doc bug?

Sorry, I don't understand the scenario, or cannot reproduce it.  For
starters, there's no bug-35899-hello.png, but I guess any image will
do, so I used splash.png.  But then (move-beginning-of-line nil) moves
to the beginning of "def", which is not inside the image.  What did I
miss?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35899; Package emacs. Full text available.

Message received at 35899 <at> debbugs.gnu.org:


Received: (at 35899) by debbugs.gnu.org; 21 Jun 2019 10:05:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 21 06:05:32 2019
Received: from localhost ([127.0.0.1]:49685 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1heGQG-0007Xk-Hc
	for submit <at> debbugs.gnu.org; Fri, 21 Jun 2019 06:05:32 -0400
Received: from mail-io1-f43.google.com ([209.85.166.43]:42415)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1heGQF-0007XW-0A
 for 35899 <at> debbugs.gnu.org; Fri, 21 Jun 2019 06:05:31 -0400
Received: by mail-io1-f43.google.com with SMTP id u19so1525196ior.9
 for <35899 <at> debbugs.gnu.org>; Fri, 21 Jun 2019 03:05:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=RZbL48F2w107lu6ejP2Ls84mfNb5m164A7o3s+iDoFM=;
 b=fmfmrhXbRvq0Wo7EI7ouW3gCANELm2DHMy2QatEAtIRvv8h4FRC3ef4WJrRLCp5GPc
 z9IC5FQSCnyNb0ZbA4T4zO7co+I3TEyr9j6eZ6cR60CUG8PuaxPsWyCFn9bToMZ8nAwW
 Rlv2l7N8F9h2FsxM+SbIG1+N2raLF9XfawsgpLEp+PE6UAIzNEtVS3T4tOg1D9d+rlsv
 17AyILfQCocxz7yBGYnkf4GFkfPn+0KBY4GZzuizPHq8v6W+rYtSMJtQhoixvf2nH1TS
 VSR9hdFvbAABp7jZeF3M5Lo+0nAv/0jmEt9wNm5ciaw4yMQOlav8NkJcM/cfkIrRh6ij
 /44A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=RZbL48F2w107lu6ejP2Ls84mfNb5m164A7o3s+iDoFM=;
 b=E23AqFUbRiktrmKQuo8PBsXeI6/TH3peF9OEUXhHEtwEQFZPRZkQbMJnTchbZDvyIc
 n8mglYkyS1MkjpZdOJZmGj6MVzhqo2vvg4vibXmCsX4MEPQnsRuM9iIQFr2AOFljL678
 +AVWlB1hxkWRr/JDs+cg3F4K3M50g5VxdDHnX5E8Qhvn8v3gnHQDhVkoMKNkzCuOkDH1
 9X1HpAx4sxOdR1BbycohOj8u5LRTWtQSOcR9FM00ilA9/TYqoqUMJ83A04LFA4u7XwXg
 cg8NukCPzhDxo1AJ+tF2B1Eic6w4LzUHSjRHj9ujQGsmYFVdycuVKMy1mf07qmrJ0NDG
 /VKw==
X-Gm-Message-State: APjAAAUGI202ZU20VEyKAkNAmw4HhKuJQtsY/W6KFRXTWfw1M0/+yr/M
 tkK83jE9RTL8qRASttkUxvyOZRSL
X-Google-Smtp-Source: APXvYqz3Z46fz8cTdAp7b3Kqb2aoEcCFJRLBsJnxYTSCy7TN9RhMMDKxIG4b4SQ4vd+cQEBMtzVHeg==
X-Received: by 2002:a5e:890f:: with SMTP id k15mr595613ioj.121.1561111525165; 
 Fri, 21 Jun 2019 03:05:25 -0700 (PDT)
Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.gmail.com with ESMTPSA id
 y17sm2892449ioa.40.2019.06.21.03.05.23
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 21 Jun 2019 03:05:24 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#35899: 26.1;
 move-beginning-of-line sometimes does not move to beginning of line
References: <875zpylkxe.fsf@HIDDEN> <838suu4n1y.fsf@HIDDEN>
Date: Fri, 21 Jun 2019 06:05:22 -0400
In-Reply-To: <838suu4n1y.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 25 May
 2019 17:38:01 +0300")
Message-ID: <871rznw8wt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 35899
Cc: 35899 <at> debbugs.gnu.org, Markus Triska <triska@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Eli Zaretskii <eliz@HIDDEN> writes:

>> However, the documentation of move-beginning-of-line includes:
>>=20
>>    (If there=E2=80=99s an image in the line, this disregards newlines
>>    which are part of the text that the image rests on.)
>>=20
>> Hence, I expect this to move to position 1. For comparison, when I press
>> C-a, it does move to position 1, as expected.
>
> "the text that the image rests on" refers to the text which is
> "covered" by the display property, not the newlines in the binary data
> that constitutes the image file's data.

If I create an image which rests on some newlines like this:

    (let ((img (create-image "bug-35899-hello.png")))
      (insert "abc")
      (insert-image img "foo\nbar\nbaz")
      (insert "def"))

Then with point after "def", move-beginning-of-line stops "inside" the
image.  And I don't see anything in its code which would allow it to
skip the image.  Isn't this just a doc bug?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Clarify-docs-about-line-movement-Bug-35899.patch
Content-Description: patch

From f64d539780c0aa8e1a3322afa518eb768f468e16 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@HIDDEN>
Date: Fri, 21 Jun 2019 05:52:14 -0400
Subject: [PATCH] Clarify docs about line movement (Bug#35899)

* doc/lispref/positions.texi (Text Lines, Screen Lines): Add index
entries.
* lisp/simple.el (move-beginning-of-line): Remove incorrect mention of
images, and reference beginning-of-visual-line.
* src/editfns.c (Fline_beginning_position): Reference
`vertical-motion'.
---
 doc/lispref/positions.texi | 3 +++
 lisp/simple.el             | 8 ++++----
 src/editfns.c              | 3 ++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 7707793467..128685800f 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -332,6 +332,8 @@ Buffer End Motion
 @node Text Lines
 @subsection Motion by Text Lines
 @cindex lines
+@cindex logical lines, moving by
+@cindex physical lines, moving by
 
   Text lines are portions of the buffer delimited by newline characters,
 which are regarded as part of the previous line.  The first text line
@@ -515,6 +517,7 @@ Text Lines
 @node Screen Lines
 @subsection Motion by Screen Lines
 @cindex screen lines, moving by
+@cindex visual lines, moving by
 
   The line functions in the previous section count text lines, delimited
 only by newline characters.  By contrast, these functions count screen
diff --git a/lisp/simple.el b/lisp/simple.el
index a0f2da7152..010a7ae563 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6638,15 +6638,15 @@ (defun move-end-of-line (arg)
 	    (setq done t)))))))
 
 (defun move-beginning-of-line (arg)
-  "Move point to beginning of current line as displayed.
-\(If there's an image in the line, this disregards newlines
-which are part of the text that the image rests on.)
+  "Move point to visible beginning of current logical line.
+This disregards any invisible newline characters.
 
 With argument ARG not nil or 1, move forward ARG - 1 lines first.
 If point reaches the beginning or end of buffer, it stops there.
 \(But if the buffer doesn't end in a newline, it stops at the
 beginning of the last line.)
-To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
+To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
+For motion by visual lines, see `beginning-of-visual-line'."
   (interactive "^p")
   (or arg (setq arg 1))
 
diff --git a/src/editfns.c b/src/editfns.c
index 9b76ae23ff..7e16fbd0ed 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -910,7 +910,8 @@ DEFUN ("line-beginning-position",
 
 This function ignores text display directionality; it returns the
 position of the first character in logical order, i.e. the smallest
-character position on the line.
+character position on the logical line.  See `vertical-motion' for
+movement by screen lines.
 
 This function constrains the returned position to the current field
 unless that position would be on a different line than the original,
-- 
2.11.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35899; Package emacs. Full text available.

Message received at 35899 <at> debbugs.gnu.org:


Received: (at 35899) by debbugs.gnu.org; 25 May 2019 14:38:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 25 10:38:11 2019
Received: from localhost ([127.0.0.1]:49343 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hUXoJ-0006Sx-3g
	for submit <at> debbugs.gnu.org; Sat, 25 May 2019 10:38:11 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42363)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1hUXoH-0006Sh-OI
 for 35899 <at> debbugs.gnu.org; Sat, 25 May 2019 10:38:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60173)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1hUXoC-0003PS-8I; Sat, 25 May 2019 10:38:04 -0400
Received: from [176.228.60.248] (port=3065 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1hUXoB-00025x-LB; Sat, 25 May 2019 10:38:04 -0400
Date: Sat, 25 May 2019 17:38:01 +0300
Message-Id: <838suu4n1y.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Markus Triska <triska@HIDDEN>
In-reply-to: <875zpylkxe.fsf@HIDDEN> (message from Markus Triska on Sat, 
 25 May 2019 15:31:57 +0200)
Subject: Re: bug#35899: 26.1;
 move-beginning-of-line sometimes does not move to beginning of line
References: <875zpylkxe.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35899
Cc: 35899 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Markus Triska <triska@HIDDEN>
> Date: Sat, 25 May 2019 15:31:57 +0200
> 
>     $ wget https://www.metalevel.at/ei/hello.png
> 
> and then, starting Emacs with "emacs -Q", evaluate the following form:
> 
>     (progn
>       (goto-char (point-min))
>       (save-excursion (insert "\n"))
>       (goto-char (+ (point) (cadr (insert-image-file "hello.png"))))
>       (move-beginning-of-line nil))
> 
> This yields: 592, and does not move point to the beginning of the line.
> 
> However, the documentation of move-beginning-of-line includes:
> 
>    (If there’s an image in the line, this disregards newlines
>    which are part of the text that the image rests on.)
> 
> Hence, I expect this to move to position 1. For comparison, when I press
> C-a, it does move to position 1, as expected.

"the text that the image rests on" refers to the text which is
"covered" by the display property, not the newlines in the binary data
that constitutes the image file's data.

> Would you please consider adjusting the function so that it behaves as
> documented?

This function works on the logical/physical lines, not on visual lines.

> Alternatively, could you please provide this feature in a different
> way?

I suggest to use beginning-of-visual-line instead.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35899; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 May 2019 13:44:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 25 09:44:18 2019
Received: from localhost ([127.0.0.1]:48449 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hUWy9-0004jp-Rk
	for submit <at> debbugs.gnu.org; Sat, 25 May 2019 09:44:18 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36489)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <triska@HIDDEN>) id 1hUWy7-0004jT-Tf
 for submit <at> debbugs.gnu.org; Sat, 25 May 2019 09:44:16 -0400
Received: from lists.gnu.org ([209.51.188.17]:57134)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <triska@HIDDEN>) id 1hUWy2-0007UG-MC
 for submit <at> debbugs.gnu.org; Sat, 25 May 2019 09:44:10 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50788)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <triska@HIDDEN>) id 1hUWy1-0003iR-Jr
 for bug-gnu-emacs@HIDDEN; Sat, 25 May 2019 09:44:10 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <triska@HIDDEN>) id 1hUWmL-0005kR-3s
 for bug-gnu-emacs@HIDDEN; Sat, 25 May 2019 09:32:06 -0400
Received: from metalevel.at ([78.46.218.83]:37076)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <triska@HIDDEN>) id 1hUWmK-0005jV-Tv
 for bug-gnu-emacs@HIDDEN; Sat, 25 May 2019 09:32:05 -0400
Received: from mt-Lenovo-ideapad-120S-11IAP (localhost.localdomain [127.0.0.1])
 by metalevel.at (Postfix) with ESMTP id 371DBA03CB
 for <bug-gnu-emacs@HIDDEN>; Sat, 25 May 2019 15:31:58 +0200 (CEST)
Received: by mt-Lenovo-ideapad-120S-11IAP (Postfix, from userid 1000)
 id E355914128F; Sat, 25 May 2019 15:31:57 +0200 (CEST)
From: Markus Triska <triska@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.1;
 move-beginning-of-line sometimes does not move to beginning of line
Date: Sat, 25 May 2019 15:31:57 +0200
Message-ID: <875zpylkxe.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 78.46.218.83
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


Please download hello.png with:

    $ wget https://www.metalevel.at/ei/hello.png

and then, starting Emacs with "emacs -Q", evaluate the following form:

    (progn
      (goto-char (point-min))
      (save-excursion (insert "\n"))
      (goto-char (+ (point) (cadr (insert-image-file "hello.png"))))
      (move-beginning-of-line nil))

This yields: 592, and does not move point to the beginning of the line.

However, the documentation of move-beginning-of-line includes:

   (If there=E2=80=99s an image in the line, this disregards newlines
   which are part of the text that the image rests on.)

Hence, I expect this to move to position 1. For comparison, when I press
C-a, it does move to position 1, as expected.

Would you please consider adjusting the function so that it behaves as
documented? Alternatively, could you please provide this feature in a
different way?

Thank you and all the best,
Markus

In GNU Emacs 26.1 (build 3, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2019-04-09 built on mt-laptop
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000




Acknowledgement sent to Markus Triska <triska@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#35899; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 21 Jun 2019 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.