From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#54488: 29.0.50; move-to-column/overlay-related regression in latest master, perhaps 28? Date: Tue, 22 Mar 2022 21:05:09 +0000 Message-ID: References: <87bkxzdccp.fsf@gmail.com> <831qyvfpv4.fsf@gnu.org> <83fsnbfd72.fsf@gnu.org> <8735jbc6gj.fsf@gmail.com> <6095582d-7065-8089-e8c7-857f070f8ce2@yandex.ru> <87y212b9nt.fsf@gmail.com> <83a6difahu.fsf@gnu.org> <835yo6f5tu.fsf@gnu.org> <834k3qf48k.fsf@gnu.org> <87r16uavhm.fsf@gmail.com> <83zglidnbs.fsf@gnu.org> <83y212dj2w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000093298c05dad4f88e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10073"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54488@debbugs.gnu.org, Dmitry Gutov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 22 22:06:19 2022 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 1nWlhr-0002PL-FK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Mar 2022 22:06:19 +0100 Original-Received: from localhost ([::1]:35538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWlhp-0007iZ-TU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Mar 2022 17:06:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWlha-0007hP-TM for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2022 17:06:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWlha-00065b-L0 for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2022 17:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nWlha-0002te-Bu for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2022 17:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Mar 2022 21:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54488 X-GNU-PR-Package: emacs Original-Received: via spool by 54488-submit@debbugs.gnu.org id=B54488.164798312911092 (code B ref 54488); Tue, 22 Mar 2022 21:06:02 +0000 Original-Received: (at 54488) by debbugs.gnu.org; 22 Mar 2022 21:05:29 +0000 Original-Received: from localhost ([127.0.0.1]:42002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWlh2-0002sq-JZ for submit@debbugs.gnu.org; Tue, 22 Mar 2022 17:05:28 -0400 Original-Received: from mail-ot1-f46.google.com ([209.85.210.46]:46925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWlh1-0002sd-Ju for 54488@debbugs.gnu.org; Tue, 22 Mar 2022 17:05:27 -0400 Original-Received: by mail-ot1-f46.google.com with SMTP id z9-20020a05683020c900b005b22bf41872so13369817otq.13 for <54488@debbugs.gnu.org>; Tue, 22 Mar 2022 14:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ild71hN2ePYlOx+6ixdSPQYuwUTCh3gP4geLaQOZ15k=; b=HDmXICuGYHO2fmxPhWigTzhpJjjacXmMfmg9AnUX0LGFSfm4Wkjikpb9Xzba0OEr0a 2JZEpa8eTjxVPYjqrzML+kh2xvKOne3X3av0oDZdSfVgGMUIcK2sgtMzrNriwQaDojOo bYlCvxgvHpGXFzJMi5GqtTGcbtqxABXMxAB5ICY3RNzNK9VbxjyBwQDCrnYXYPz3gWFO tkyE5YlR8aXq+8HPC+BsweXPKDUaTf7hzBN+26fa9fKk2ag3y4T4SZCe5iiR7Lv/vU17 NqrVutuCrkJ+nK1xC0hInsFmfxKJRmI25MLoIuFIk839BdEg6Zy189o1LSEIKoygCsFM z88w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ild71hN2ePYlOx+6ixdSPQYuwUTCh3gP4geLaQOZ15k=; b=dv65fBylxry7L1jNZTNFSz3ecgecRMMOknxzh7XgCowGGDpSQCN9Lq07KW3iOgWKie FS5LUnd6nYv3wnt6T+mW8HOBDqqDutKzsnWFQVAWydMzwciqBWEG4jQhvP/3mIkdrGNK ddppLv91R/TvS7QU/O/6ct/g9jh4Bivs0aLWDcI94ZHFQwdIqfA8Fe5X6O22YvWGdcVH UX4Wx1w+wpGci5iNO/pZaFCOd9W0T2Frnz2Y3R8P+taYebxdtRJDm7+5Q5IU1pxTOvZI 2F/XzpAvDGtmy9SWRUihwZ2KM+Nx2EEF5ic4trQDOU6eoYHALSJTchO4ZJDnhTg4+LgP zEUw== X-Gm-Message-State: AOAM5314PeOy6Kt/Efo1QAHiTl3wbOCK4zGituVxyuAa3UGl+3RmByib BcCXnF3RPZ+VttTbPmMsFBaqnOLk7ZoZ4B9V7+U= X-Google-Smtp-Source: ABdhPJzk6u3JOhjswyH8OMaAx2+jyRTZptWQfYC4GtyDDqWBWm0rEx2e8E19E038u7sFrRmPBuRW/VDVxbEs8vzYcOQ= X-Received: by 2002:a9d:6287:0:b0:5c9:7a58:4325 with SMTP id x7-20020a9d6287000000b005c97a584325mr856173otk.317.1647983121867; Tue, 22 Mar 2022 14:05:21 -0700 (PDT) In-Reply-To: <83y212dj2w.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" Xref: news.gmane.io gmane.emacs.bugs:228781 Archived-At: --00000000000093298c05dad4f88e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 22, 2022 at 4:54 PM Eli Zaretskii wrote: > > do (condition-case eob-err > > > (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) > > > (end-of-buffer (cl-return eob-err)))))) > > I don't see how this could cause the problem you describe, but please > note that encode-coding-region generally changes the text in the > region, so maybe what you consider to be outside the restriction > isn't? > I passed it t as the last argument, so it should be non-destructive to the buffer. Anyway, do you have an example of text in which this function causes > point to return such problematic values? > The only example I have is the one I described already, as best as I could. A user reported it to me, i installed clangd, and I reproduced it very easily. If you could consider installing clangd then running that ready-to-use recipe, I'd venture to say it's the easiest way for you to understand the problem. > Why do you have to use move-to-column instead of forward-char? > > > > I don't remember! Is it exactly equivalent if you're standing in the > beginning of the line? > > Yes, if you have only text in the buffer (no images etc.). > Hmmm, it's interesting. Maybe I should just switch to that. Seems to fix it. Until someone adds images to the source code i suppose. What's your "etc"? Jo=C3=A3o > --00000000000093298c05dad4f88e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Mar 22, 2022 at= 4:54 PM Eli Zaretskii <eliz@gnu.org> wrote:

=
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 do (condition-case eob-err
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(forward-cha= r (/ (if (> diff 0) (1+ diff) (1- diff)) 2))
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(end-of-buffer (cl-= return eob-err))))))

I don't see how this could cause the problem you describe, but please note that encode-coding-region generally changes the text in the
region, so maybe what you consider to be outside the restriction
isn't?

I passed it t as the last argument, so it should be non-destructi= ve to the buffer.

Anyway, do you have an example of text in which this function causes
point to return such problematic values?

The only example I have is the one I described already, as best as I coul= d. A user reported it to me, i installed clangd, and I reproduced it very e= asily.

If you could cons= ider installing clangd then running that ready-to-use recipe, I'd ventu= re to say it's the easiest way for you to understand the problem.
=

>=C2=A0 Why do you have to use move-to-column instead of forward-char? >
> I don't remember! Is it exactly equivalent if you're standing = in the beginning of the line?

Yes, if you have only text in the buffer (no images etc.).
=

Hmmm, it's in= teresting. Maybe I should just switch to that. Seems to fix it. Until someo= ne adds images to the source code i suppose. What's your "etc"= ;?

Jo=C3=A3o
--00000000000093298c05dad4f88e--