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#24766: 26.0.50: [PATCH] Confusing behaviour for indent-relative-maybe Date: Sat, 22 Oct 2016 22:21:51 +0300 Message-ID: <83lgxgp4ts.fsf@gnu.org> References: <8760ok8ays.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477164197 26720 195.159.176.226 (22 Oct 2016 19:23:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 19:23:17 +0000 (UTC) Cc: 24766@debbugs.gnu.org To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 21:23:12 2016 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 1by1st-000670-2h for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 21:23:11 +0200 Original-Received: from localhost ([::1]:38446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by1sv-0000TV-FW for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 15:23:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by1sp-0000TQ-Ek for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 15:23:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1by1sk-0003tG-HW for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 15:23:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1by1sk-0003tA-Dx for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 15:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1by1sk-00063A-95 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 15:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Oct 2016 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24766 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24766-submit@debbugs.gnu.org id=B24766.147716413923182 (code B ref 24766); Sat, 22 Oct 2016 19:23:02 +0000 Original-Received: (at 24766) by debbugs.gnu.org; 22 Oct 2016 19:22:19 +0000 Original-Received: from localhost ([127.0.0.1]:46598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by1s3-00061q-8l for submit@debbugs.gnu.org; Sat, 22 Oct 2016 15:22:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by1s0-00061c-QU for 24766@debbugs.gnu.org; Sat, 22 Oct 2016 15:22:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1by1rq-0003j1-Ld for 24766@debbugs.gnu.org; Sat, 22 Oct 2016 15:22:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by1rq-0003ix-Iq; Sat, 22 Oct 2016 15:22:06 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2079 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1by1ro-0007Ik-17; Sat, 22 Oct 2016 15:22:05 -0400 In-reply-to: <8760ok8ays.fsf@gmail.com> (message from Alex on Sat, 22 Oct 2016 13:01:15 -0600) 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:124849 Archived-At: > From: Alex > Date: Sat, 22 Oct 2016 13:01:15 -0600 > > In emacs -Q's scratch buffer, try the following: > > M-: (indent-relative) RET > > Repeating this will move to the next appropriate indentation point as > indicated in indent-relative's docstring. > > Now try: > > M-: (indent-relative-maybe) RET > > The point does not move even when there are appropriate indentation > points to move to. It doesn't move because that's what UNINDENTED-OK means. > This contradicts the intention of the docstring for > indent-relative-maybe: > > If the previous nonblank line has no indent points beyond the > column point starts at, this command does nothing. > > > I would have expected, in indent-relative, that the calculation of a > suitable indentation position is done independent of the argument > UNINDENTED-OK. The following diff fixes this: These functions exist for ages in this form. I agree that the doc string is misleading (and the optional argument of indent-relative is not even documented), but other than fixing the documentation, I see no reason to change the behavior. Am I missing something?