From unknown Thu Sep 11 11:34:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32014 <32014@debbugs.gnu.org> To: bug#32014 <32014@debbugs.gnu.org> Subject: Status: 26.1; lisp-indent-line fails in first line of Ielm Reply-To: bug#32014 <32014@debbugs.gnu.org> Date: Thu, 11 Sep 2025 18:34:37 +0000 retitle 32014 26.1; lisp-indent-line fails in first line of Ielm reassign 32014 emacs submitter 32014 Jo=C3=A3o T=C3=A1vora severity 32014 normal tag 32014 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 29 19:20:28 2018 Received: (at submit) by debbugs.gnu.org; 29 Jun 2018 23:20:28 +0000 Received: from localhost ([127.0.0.1]:40194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZ2gl-0005Bd-Q8 for submit@debbugs.gnu.org; Fri, 29 Jun 2018 19:20:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZ2gk-0005BP-84 for submit@debbugs.gnu.org; Fri, 29 Jun 2018 19:20:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ2ge-0006tA-65 for submit@debbugs.gnu.org; Fri, 29 Jun 2018 19:20:21 -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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_EXCESS_BASE64,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fZ2ge-0006sr-2Z for submit@debbugs.gnu.org; Fri, 29 Jun 2018 19:20:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ2gc-0002yD-VD for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2018 19:20:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ2gZ-0006kY-Q9 for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2018 19:20:18 -0400 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:37878) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZ2gZ-0006gB-JW for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2018 19:20:15 -0400 Received: by mail-wm0-x234.google.com with SMTP id n17-v6so3530334wmh.2 for ; Fri, 29 Jun 2018 16:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=LFk61ZVh55pyl+kv6/gS1vPWA803hWn3x/rEgP6U5RA=; b=sBh1bnkv8A95voEaMS1nJJIauIi44ZArYn1STJYEkMXeTP4hODihex/+j+uiapp8jq S5NmFi3xjqmpt6UJRxybTvQ8VS/DpS6ujG5+pTS0HaDpl8MyKosHKYDbbaUu0q9EWgEA 9hADxdQjaeAT9jv0PU1We4h2/A0TNe5XdvGk+lmR0hJKuF7Z1RIJ8xjux+vSsEJGJHEJ 3lVVfMU9P5tKJiHfl769TeF24OpQ2ZW3GjS+edGUu/45WS6gDSRzTPHojV3cPI8Z3Ab4 mO7mp3RdFbV0HJd7f9mLYZtjd5yFAh5FxJ/DiI3df8puI52Pv2/yw4znhJPCbUDrnKSh j4Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=LFk61ZVh55pyl+kv6/gS1vPWA803hWn3x/rEgP6U5RA=; b=IFo+yPiY1qck4f+CP+9Y11LWyULk8creGWIbI8ipuCr563u06B1Srvqq1bEqCSVpQb D/uIGmbk8GxXusTTK/u2HxWcmTXCuiQw5oehB+Osb6U3RF5aWB6tmVV8924G7+PlQ1QS xSJhFs2aGHMWOxkJaiMRj1eQ1EUELnY+xwP0Eab+Mp++wPcVyCXiK44pGeEwyqE0bhqQ 4G3DBe6cpiDfh9F8GiNu3m8ECh1sM4uz8Q1OxvLid75nF2+LW5RVym+W/06hi/xVXeJG iUhr4dMM0kWuDuW319mVITwx5gnuMDabU3PDJ2XoJyuXVtBNekdGEu7v/aI7YfXio7Ze ry2w== X-Gm-Message-State: APt69E1IDWPmfbIVgmEoXgZF+9ZTV9k+RpROc3UbiGdbOS39RPIze5pK rRqI2fnT7WTjDO9Zvh5Fh3A7s83O X-Google-Smtp-Source: AAOMgpcjdjawnxPvy8bqut90q3gSw4bDuIV9oGc2nrOAnc7aPSBxUMsT5e7t6Hx34Zn2mGhnPnGPaA== X-Received: by 2002:a1c:8647:: with SMTP id i68-v6mr3030537wmd.28.1530314414121; Fri, 29 Jun 2018 16:20:14 -0700 (PDT) Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id a2-v6sm1757276wmb.6.2018.06.29.16.20.13 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 16:20:13 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: bug-gnu-emacs@gnu.org Subject: 26.1; lisp-indent-line fails in first line of Ielm Date: Sat, 30 Jun 2018 00:20:11 +0100 Message-ID: <876021mb84.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.9 (----) Hi maintainers, Originally reported in https://github.com/joaotavora/sly/issues/165, for SLY, a Common Lisp IDE with a REPL similar to Ielm's Emacs -Q M-x ielm SPC f o o M-x lisp-indent-line Point is moved to the beginning of the line, and an error is signalled. The error's backtrace isn't shown even with debug-on-error set to t. Is this the intended behaviour? In 25.2 the string foo was correctly indented back one character, so this seems like a regression. If I do M-x lisp-indent-line in any line but the first of a multi-line expression, it works nicely. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 29 20:23:23 2018 Received: (at 32014) by debbugs.gnu.org; 30 Jun 2018 00:23:23 +0000 Received: from localhost ([127.0.0.1]:40212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZ3ff-0000HV-FA for submit@debbugs.gnu.org; Fri, 29 Jun 2018 20:23:23 -0400 Received: from mail-it0-f48.google.com ([209.85.214.48]:52579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZ3fd-0000HA-QN; Fri, 29 Jun 2018 20:23:22 -0400 Received: by mail-it0-f48.google.com with SMTP id p4-v6so5165522itf.2; Fri, 29 Jun 2018 17:23:21 -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=2S8g+sf1X3+nvtBaCYCVbdTeZiyUp/Zp0kARd8A/rX8=; b=cpx6GTugFTzKcEfUZ8m08SnOLx/W6cWPXubF3DbI44lWHOIo2Yc87f97ssPGZu5YB/ fWx4loUNi5HozWX/bFSkrU1syiMsL5vzJY2oSvmaMQAMvY9YR6NiwV5g8/9HwbAUQX/q yHgH1tDr8EODd92ywxU7zocDBGq+GByhbw/4c2xbjT3OlGlAh4ipkLtur9dlNOfY4N8Z uUnBYxGFivgJ5jejzoJrw+lBQYHBZVJt2iW5MrQsVAEeIBzTb/KODZ7rz8dmiqc+KRon sYYh2Rm1Hb2dS3zHwPtMOKg8kmbG8RIAZrOZNMaKP+B6Ki1VD5xeH1VNTXEB5CsJf101 +cFw== 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=2S8g+sf1X3+nvtBaCYCVbdTeZiyUp/Zp0kARd8A/rX8=; b=TyX7xxByz92vwOt7SGI+pJLvZv2obX0TbG9DOIhXt3zqAtV8UphiH+S18dvXMHmyhC KuRmSfArrXJkP4Ult3G99iVqduHqwTwoWAgxSeCXbMSpAGkJAUNcbAA3SJx2nIQ0mXrZ KorbgjJKI9Po1tD1pUdMowce16USzwyc4mmq02+OK0deeOo1CWqCvrJjSZKs3huwz7r4 g0GIG+/2kg5HGuz5W8fjts/6EPD0YaIN4YZtDvx+8FiBvIVyrjF/82uijhMwatDGcVVp OtmCQgDv4iJCoPtM84ttJe7RJHGYiF9l4soC59g3TJBRo8Hass5Qk5A8nfg0m+BHPYFX 6KzQ== X-Gm-Message-State: APt69E34gjbxh5a7mRrLnBxIt6fU+/3Q60HUOyYPuRxfRvXn/O72ovjG clIPYujYnZyyhQl5TS0WIC6c9w== X-Google-Smtp-Source: AAOMgpceKQJn6olWmI/Ye2lCMgEt93VssEoFtYfWkNt2MJyjikpX15NvD2KTRRWLTTBib9Z8U+Rz2A== X-Received: by 2002:a24:d00b:: with SMTP id m11-v6mr3570938itg.97.1530318196119; Fri, 29 Jun 2018 17:23:16 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p130-v6sm5027733ioe.81.2018.06.29.17.23.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 17:23:14 -0700 (PDT) From: Noam Postavsky To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#32014: 26.1; lisp-indent-line fails in first line of Ielm References: <876021mb84.fsf@gmail.com> Date: Fri, 29 Jun 2018 20:23:13 -0400 In-Reply-To: <876021mb84.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sat, 30 Jun 2018 00:20:11 +0100") Message-ID: <87sh55m8b2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32014 Cc: 32014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tags 32014 + patch quit Jo=C3=A3o T=C3=A1vora writes: > The error's backtrace isn't shown even with debug-on-error set to t. If you (setq debug-ignored-errors nil) first, then the backtrace is Debugger entered--Lisp error: (text-read-only) indent-line-to(7) lisp-indent-line() funcall-interactively(lisp-indent-line) call-interactively(lisp-indent-line record nil) command-execute(lisp-indent-line record) execute-extended-command(nil "lisp-indent-line" "lisp-indent-line") funcall-interactively(execute-extended-command nil "lisp-indent-line" "li= sp-indent-line") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) > Is this the intended behaviour? In 25.2 the string foo was correctly > indented back one character, so this seems like a regression. No, it's an accident. In lisp-indent-line, I simplified=20 (setq shift-amt (- indent (current-column))) (if (zerop shift-amt) nil (delete-region beg (point)) (indent-to indent))) into (indent-line-to indent) but it turns out not be equivalent in this case. indent-line-to doesn't respect the prompt's field property. I propose this for emacs-26: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Test-for-Bug-32014.patch Content-Description: patch >From 2524780c54bcd8faecdb8497c0e1c960752fc9ce Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 29 Jun 2018 20:15:10 -0400 Subject: [PATCH v1 1/2] ; Test for Bug#32014 * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-indent-with-read-only-field): New test. --- test/lisp/emacs-lisp/lisp-mode-tests.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index 0b5b0a4019..2ac0e5ce1d 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el @@ -224,6 +224,17 @@ lisp-mode-tests--correctly-indented-sexp (comment-indent) (should (equal (buffer-string) correct))))) +(ert-deftest lisp-indent-with-read-only-field () + "Test indentation on line with read-only field (Bug#32014)." + :expected-result :failed + (with-temp-buffer + (insert (propertize "prompt> " 'field 'output 'read-only t + 'rear-nonsticky t 'front-sticky '(read-only))) + (insert " foo") + (lisp-indent-line) + (should (equal (buffer-string) "prompt> foo")))) + + (provide 'lisp-mode-tests) ;;; lisp-mode-tests.el ends here -- 2.11.0 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0002-Stop-using-indent-line-to-in-lisp-indent-line-Bug.patch Content-Description: patch >From 98e30ee9505f6e8cd21a36b88223e29ad9ee8281 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 29 Jun 2018 19:58:58 -0400 Subject: [PATCH v1 2/2] Stop using indent-line-to in lisp-indent-line (Bug#32014) This is partial revert of "Remove ignored argument from lisp-indent-line", because `indent-line-to' doesn't respect field boundaries. * lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Use delete-region and indent-to instead of `indent-line-to'. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-indent-with-read-only-field): Expect to pass. Don't merge to master, we will fix indent-line-to there instead. --- lisp/emacs-lisp/lisp-mode.el | 10 ++++++++-- test/lisp/emacs-lisp/lisp-mode-tests.el | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 94be5acd6d..3a03b56313 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -867,7 +867,9 @@ lisp-indent-line (interactive) (let ((pos (- (point-max) (point))) (indent (progn (beginning-of-line) - (or indent (calculate-lisp-indent (lisp-ppss)))))) + (or indent (calculate-lisp-indent (lisp-ppss))))) + (shift-amt nil) + (beg (progn (beginning-of-line) (point)))) (skip-chars-forward " \t") (if (or (null indent) (looking-at "\\s<\\s<\\s<")) ;; Don't alter indentation of a ;;; comment line @@ -879,7 +881,11 @@ lisp-indent-line ;; as comment lines, not as code. (progn (indent-for-comment) (forward-char -1)) (if (listp indent) (setq indent (car indent))) - (indent-line-to indent)) + (setq shift-amt (- indent (current-column))) + (if (zerop shift-amt) + nil + (delete-region beg (point)) + (indent-to indent))) ;; If initial point was within line's indentation, ;; position after the indentation. Else stay at same point in text. (if (> (- (point-max) pos) (point)) diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index 2ac0e5ce1d..8598d41978 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el @@ -226,7 +226,6 @@ lisp-mode-tests--correctly-indented-sexp (ert-deftest lisp-indent-with-read-only-field () "Test indentation on line with read-only field (Bug#32014)." - :expected-result :failed (with-temp-buffer (insert (propertize "prompt> " 'field 'output 'read-only t 'rear-nonsticky t 'front-sticky '(read-only))) -- 2.11.0 --=-=-= Content-Type: text/plain and this for master: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Respect-field-boundaries-in-to-indentation-functions.patch Content-Description: patch >From 2dccc6d64669078915a7eda75f40e75408b7794e Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 29 Jun 2018 20:01:53 -0400 Subject: [PATCH] Respect field boundaries in *-to-indentation functions (Bug#32014) * lisp/simple.el (forward-to-indentation) (backward-to-indentation): Use `beginning-of-line' which respects field boundaries rather than `forward-line' which doesn't. --- lisp/simple.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index f8c02c1dbf..3cece52657 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -872,13 +872,13 @@ quoted-insert (defun forward-to-indentation (&optional arg) "Move forward ARG lines and position at first nonblank character." (interactive "^p") - (forward-line (or arg 1)) + (beginning-of-line (+ 1 (or arg 1))) (skip-chars-forward " \t")) (defun backward-to-indentation (&optional arg) "Move backward ARG lines and position at first nonblank character." (interactive "^p") - (forward-line (- (or arg 1))) + (beginning-of-line (- 1 (or arg 1))) (skip-chars-forward " \t")) (defun back-to-indentation () -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 30 02:52:02 2018 Received: (at 32014) by debbugs.gnu.org; 30 Jun 2018 06:52:02 +0000 Received: from localhost ([127.0.0.1]:40276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZ9jm-0005Ad-CS for submit@debbugs.gnu.org; Sat, 30 Jun 2018 02:52:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZ9jl-0005A7-9f for 32014@debbugs.gnu.org; Sat, 30 Jun 2018 02:52:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ9jc-0006q8-Sx for 32014@debbugs.gnu.org; Sat, 30 Jun 2018 02:51:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ9jc-0006pO-LL; Sat, 30 Jun 2018 02:51:52 -0400 Received: from [176.228.60.248] (port=2451 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fZ9jc-0006PC-3c; Sat, 30 Jun 2018 02:51:52 -0400 Date: Sat, 30 Jun 2018 09:52:02 +0300 Message-Id: <831scoojfx.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87sh55m8b2.fsf@gmail.com> (message from Noam Postavsky on Fri, 29 Jun 2018 20:23:13 -0400) Subject: Re: bug#32014: 26.1; lisp-indent-line fails in first line of Ielm References: <876021mb84.fsf@gmail.com> <87sh55m8b2.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32014 Cc: joaotavora@gmail.com, 32014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Noam Postavsky > Date: Fri, 29 Jun 2018 20:23:13 -0400 > Cc: 32014@debbugs.gnu.org > > I propose this for emacs-26: OK. > and this for master: I'm not sure I'm okay with changing the behavior of forward/backward-to-indentation like that. It's an incompatible change, isn't it? The documentation doesn't seem to tell anything wrt the behavior in presence of fields, but that doesn't mean we can make such changes without considering the consequences. Can you tell why you think this change is TRT? In any case, such a change should be reflected in NEWS and in the doc strings. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 30 09:28:08 2018 Received: (at 32014) by debbugs.gnu.org; 30 Jun 2018 13:28:08 +0000 Received: from localhost ([127.0.0.1]:40443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFv6-0008Ju-8t for submit@debbugs.gnu.org; Sat, 30 Jun 2018 09:28:08 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:40812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFv4-0008Ja-36 for 32014@debbugs.gnu.org; Sat, 30 Jun 2018 09:28:06 -0400 Received: by mail-io0-f179.google.com with SMTP id t135-v6so10901949iof.7 for <32014@debbugs.gnu.org>; Sat, 30 Jun 2018 06:28:06 -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=/CmEsUUfYq5aBcB2hYrzepCGb8sTad+eSeg8eTDn/KY=; b=Tp5nDyOKe8fo0TnyLC1B2nhVgxErIwtHBB+NLfT43KkOoIT0FqJi0n8qrw2Ofh05KT Um6D9RhrGaAGwPmiqt+c37nWDUiFOB5Y0vkPOYy4Z9UkRENdHdj22IZZep29BYH2vXNM Lgi/VdJbDgZztu0i3NTNv0fjVDHA6Dxrcxxg5HaYWTV8VhTHv76Hi0WTv5r+zUE1TIWK W4DBRXTUT1GmiFHn78zziRCHR7oQcXdkgsVolWpXk5jCkYB3Qsf+hiTHuHV+lk6pbdu9 6EOJ+uFchhHAWRpoTMUObkvG4C6+xCjqTx7SQHMr8ZuOr16U1zckyjckP1G9oJBM9C4h mOrA== 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=/CmEsUUfYq5aBcB2hYrzepCGb8sTad+eSeg8eTDn/KY=; b=MpnCqXYR0nvbMVmLjgXnX7JOwUNtAS5jF38l7Ef6v2hlsfLkkv9C+N2FAhwIW8nHpy +TTUc75eIkNs86uhp53V41q3HeSc9m3LxIMSl27aFxfwdFJbC8nMfgjqae+/w7GtWUbF 7CQFurkG66vEyWr5bVMsfG3zv4tlJRrV3bgDtS//LmIYk4WRYlfd2qP3YYFOA/UcKBWO vjOvK+J80VLFa2j9yMCcO5VS+ENZsvK30tCGsITIFLx+z3M30AYtPSjZv/kjSP2BxfAa vhheFDrP8a5r+IOkVrOlNMZr+fQ/3p6axwhJdZWXOiDvhbsyn38pjlZRjfvbmLL1gQLu dxgQ== X-Gm-Message-State: APt69E2MrlNHuvONAwG/g3hB580Tyendsrj3lhNE/SLr9ga56hb35wId xHq5ORYcGsHztnWIZw6Ig/4vzg== X-Google-Smtp-Source: AAOMgpfT9W4sCuf2WWe4TzY8rEaPWdQkZxgBzKcagDHJHHRJnUmJ8A/WwxrU997NZaGCLI3pRfU2Ng== X-Received: by 2002:a6b:38c6:: with SMTP id f189-v6mr14310878ioa.138.1530365280305; Sat, 30 Jun 2018 06:28:00 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id s3-v6sm4203332ioa.15.2018.06.30.06.27.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Jun 2018 06:27:59 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#32014: 26.1; lisp-indent-line fails in first line of Ielm References: <876021mb84.fsf@gmail.com> <87sh55m8b2.fsf@gmail.com> <831scoojfx.fsf@gnu.org> Date: Sat, 30 Jun 2018 09:27:58 -0400 In-Reply-To: <831scoojfx.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 30 Jun 2018 09:52:02 +0300") Message-ID: <87o9fsmmjl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32014 Cc: joaotavora@gmail.com, 32014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > I'm not sure I'm okay with changing the behavior of > forward/backward-to-indentation like that. It's an incompatible > change, isn't it? The documentation doesn't seem to tell anything wrt > the behavior in presence of fields, but that doesn't mean we can make > such changes without considering the consequences. Can you tell why > you think this change is TRT? Hmm, the more I look at it, the less I understand why these functions even exist. There are hardly any uses of them. Maybe we should just do this instead: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v2-0001-Respect-field-boundaries-in-indent-line-to-Bug-32.patch Content-Description: patch >From a31918efdbdbf4c6d3f26ae7a73aba910f164116 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 30 Jun 2018 09:14:22 -0400 Subject: [PATCH v2] Respect field boundaries in indent-line-to (Bug#32014) * lisp/indent.el (indent-line-to): Use the back-to-indentation point as the end-point of whitespace removal, rather than backward-to-indentation which doesn't respect field boundaries. --- lisp/indent.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/indent.el b/lisp/indent.el index eb5b21e8e8..14efe8bfdf 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -300,8 +300,9 @@ indent-line-to (progn (skip-chars-backward " ") (point)))) (indent-to column)) ((> cur-col column) ; too far right (after tab?) - (delete-region (progn (move-to-column column t) (point)) - (progn (backward-to-indentation 0) (point))))))) + (let ((cur-indent (point))) + (delete-region (progn (move-to-column column t) (point)) + cur-indent)))))) (defun current-left-margin () "Return the left margin to use for this line. -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 09 20:48:44 2018 Received: (at 32014) by debbugs.gnu.org; 10 Jul 2018 00:48:44 +0000 Received: from localhost ([127.0.0.1]:52883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcgpg-0002xD-Ig for submit@debbugs.gnu.org; Mon, 09 Jul 2018 20:48:44 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:40655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcgpe-0002wu-6j; Mon, 09 Jul 2018 20:48:42 -0400 Received: by mail-it0-f47.google.com with SMTP id 188-v6so28964721ita.5; Mon, 09 Jul 2018 17:48:42 -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=nPNgdLCCzCmDNzX0zTkxqe2BMsd/vsDJE+rI8leuxCY=; b=UHzP85E/5M7qvy6BeBL5PNpKNd2ObJaII8BiQYloEhgFUHIwJgxGsEJ5kDQCGVRl2l 9RgKb8NHShqmme9jB1ptXN96RDXhxSm42iU1LsuEvix802s1ynyTG7/H5Y6Os2wgjxJ1 0OM22m/l4ErSyR4qIkXO1KVNyfE1pTdDmsKiTj4n223fCUX1tfBZjW8rxndksDWmEgUU 3eNbw7rRD/6rnqHDhc64fH+xACg+D6W+OeaoP5heedo+AqqERfiuQABMsPUAHAQXqok0 5rkQSYasGhHZU08W0pPdvawj4uG3+GfcnalsoZBiHyqLO6Y3eQxbODBEOGF9S+GJsmWs JJDw== 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=nPNgdLCCzCmDNzX0zTkxqe2BMsd/vsDJE+rI8leuxCY=; b=SRHcJWVzKAqITLVZTDArTIyt1KCxss0HXfXsn3t81A4gJ+RYfwElrp8dG/MTwW4MAe 4axiDFcE0Gk5QtnBhDwHomhCfIP2KpbjOtY/kQmAX4mrB1n+LYVnIyTfyYrncHqTvtbb YH0vuiXkx7U7xIn7l6DAIpWXc1CqkXsSaI05o4EnnQtp6iWO21+yeroZh9ULsRRFtvP8 +Bal4//WWY5sc3WhNlp8SpBQbY7DcMXxdm8Bdq9timtJopKdznX8OxQqGzSpC0dUEmWB 6yxaBmK0MiKkCaVAqI8hc10Tt9x+YYxUPCCFTtnY20TZR4gpPCjk14QL5vrMK/qy7Cnp Bt2Q== X-Gm-Message-State: APt69E2mAqgOQxRCetaTuDpg0Mm3UrSe+Kk8serYI7RQrCTneJeqHfmx DjHTYrvm1j9T7pdJs5kWTL7f4A== X-Google-Smtp-Source: AAOMgpdpT3TUW/KkvInq763CVfOTEXWbgTYaaCyM+UzLTv7+2IUlsavZJwBA8svbbkthY6noXxqzsA== X-Received: by 2002:a24:dec5:: with SMTP id d188-v6mr16960042itg.123.1531183716671; Mon, 09 Jul 2018 17:48:36 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id u15-v6sm5533261iog.62.2018.07.09.17.48.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jul 2018 17:48:35 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#32014: 26.1; lisp-indent-line fails in first line of Ielm References: <876021mb84.fsf@gmail.com> <87sh55m8b2.fsf@gmail.com> <831scoojfx.fsf@gnu.org> <87o9fsmmjl.fsf@gmail.com> Date: Mon, 09 Jul 2018 20:48:35 -0400 In-Reply-To: <87o9fsmmjl.fsf@gmail.com> (Noam Postavsky's message of "Sat, 30 Jun 2018 09:27:58 -0400") Message-ID: <87h8l7difw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32014 Cc: joaotavora@gmail.com, 32014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 32014 fixed close 32014 26.2 quit Noam Postavsky writes: > Hmm, the more I look at it, the less I understand why these functions > even exist. There are hardly any uses of them. Maybe we should just do > this instead: > * lisp/indent.el (indent-line-to): Use the back-to-indentation point > as the end-point of whitespace removal, rather than > backward-to-indentation which doesn't respect field boundaries. Pushed this to master [3: e4ad2d1a8f] and the other fixes to emacs-26 [1: db3f779780] [2: 8f7d35cabd]. [1: db3f779780]: 2018-07-09 19:39:03 -0400 ; Test for Bug#32014 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=db3f7797809ed9de8dd92ce38bf34f768ddc64ad [2: 8f7d35cabd]: 2018-07-09 19:39:03 -0400 Stop using indent-line-to in lisp-indent-line (Bug#32014) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=8f7d35cabdbeb2404d53af39c5d7c12e870fa1cb [3: e4ad2d1a8f]: 2018-07-09 20:08:13 -0400 Respect field boundaries in indent-line-to (Bug#32014) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e4ad2d1a8fad8c8c786b61083b05cfaa1ea5669c From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 10 03:04:44 2018 Received: (at 32014) by debbugs.gnu.org; 10 Jul 2018 07:04:44 +0000 Received: from localhost ([127.0.0.1]:52993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcmhY-0007TW-L3 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 03:04:44 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:39501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcmhX-0007TI-KY for 32014@debbugs.gnu.org; Tue, 10 Jul 2018 03:04:43 -0400 Received: by mail-it0-f44.google.com with SMTP id p185-v6so29901408itp.4 for <32014@debbugs.gnu.org>; Tue, 10 Jul 2018 00:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g8+yA4fZELM2+1v7bjJuQc7StATJBJa1guyyCfYYMxw=; b=Pf1tjh7bXg/rDK8T/RO3P8yb1KbRsE8zrOl0/Vm3e6U7nZVAOPdDtQjXJbHQNGXuDJ uTKJZ1Snu8/YJZoygndSgK8XwkrAhq79Zn4mN8w9GFgVhZTK6hApeRydkz6MHxZ3A9HH 0dad/H6ninYJ7VvlHAfvi1IjV5hOepBKgTxE02bz2JtX7DP65sDjdFtTb5YzfJqdc15I ttrzq6d0lBu8GxXHg16uqywMRIcrMswQbVQ3DmGu8mA0PY2pAzajcrDM5mFBf2xCX6Hz DjejHkMVgRPPQmK/qeWrEdsICKdgxJbqPHrNnexnQmDtYIJL+VNLkUXAByZDlCs22Vpp 2qJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g8+yA4fZELM2+1v7bjJuQc7StATJBJa1guyyCfYYMxw=; b=sCgDsy/D68xYrBriYRSKjupDVcrxxC4mSvuUSayuJ8pnb5qT5nsJeESoyDt2Z4i9l5 Yq+E3gslZntoDdaedLapxGlBaQbyAThhwSTkCGHzyY/HV6MQDIwk0/UCmlf0LGyI5E0Z M93GoXihng0bvYdNV6GzHz9h6bIptXZ18Di4Ueb26ikRFcacHf9fsIgknfuMd3tMP60/ n/5GOND/aixL7wCZ7lwpkcyN/9OZwKQ/wWTXjLNvBrMnT7zerfkN0JO63iyyyP7+7k6/ 7cXXNag9eJVJ0u45nemSNg5582N8s6QR1cx70FE/aWQEYJdPFqaS7OYItrK9J3LajqBy bCsA== X-Gm-Message-State: APt69E0vt4BIdsEVYnCMgFq4ycRTwanjCFoXjULnTzrQGedG8eDC6oLj jxlMt5VubdN/G7Q6Szur8MMYdjDb5uTwABzwYsI= X-Google-Smtp-Source: AAOMgpd+d+ONUzLIC8Y1QleZTK8SBoIBVq0NfqLo6S1Mvcl4D/Lo3GYMnZz8UscGY3lWD9pvVoUv5I58O9inC0bqmek= X-Received: by 2002:a24:e4cf:: with SMTP id o198-v6mr17596245ith.21.1531206278019; Tue, 10 Jul 2018 00:04:38 -0700 (PDT) MIME-Version: 1.0 References: <876021mb84.fsf@gmail.com> <87sh55m8b2.fsf@gmail.com> <831scoojfx.fsf@gnu.org> <87o9fsmmjl.fsf@gmail.com> <87h8l7difw.fsf@gmail.com> In-Reply-To: <87h8l7difw.fsf@gmail.com> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Tue, 10 Jul 2018 08:04:26 +0100 Message-ID: Subject: Re: bug#32014: 26.1; lisp-indent-line fails in first line of Ielm To: Noam Postavsky Content-Type: multipart/alternative; boundary="00000000000047812c05709fbe8d" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 32014 Cc: 32014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) --00000000000047812c05709fbe8d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 10, 2018, 01:48 Noam Postavsky wrote: > tags 32014 fixed > close 32014 26.2 > quit > Thanks! Jo=C3=A3o > --00000000000047812c05709fbe8d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, = Jul 10, 2018, 01:48 Noam Postavsky <npostavs@gmail.com> wrote:
tags 32014 fixed
close 32014 26.2
quit

Thanks!
Jo=C3=A3o
--00000000000047812c05709fbe8d-- From unknown Thu Sep 11 11:34:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 07 Aug 2018 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator