From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#24766: 26.0.50: [PATCH] Confusing behaviour for indent-relative-maybe Date: Sat, 22 Oct 2016 13:40:57 -0600 Message-ID: <871sz8894m.fsf@gmail.com> References: <8760ok8ays.fsf@gmail.com> <83lgxgp4ts.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477165391 27296 195.159.176.226 (22 Oct 2016 19:43:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 19:43:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 24766@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 21:43:05 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 1by2Be-0002g5-Is for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 21:42:34 +0200 Original-Received: from localhost ([::1]:38493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by2Bg-000379-Ue for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 15:42:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by2BB-0002tM-Sw for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 15:42:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1by2B8-0001nf-Nn for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 15:42:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1by2B8-0001nS-LX for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 15:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1by2B8-0006Vp-Be for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 15:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Oct 2016 19:42: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.147716526724963 (code B ref 24766); Sat, 22 Oct 2016 19:42:02 +0000 Original-Received: (at 24766) by debbugs.gnu.org; 22 Oct 2016 19:41:07 +0000 Original-Received: from localhost ([127.0.0.1]:46610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by2AE-0006UZ-QC for submit@debbugs.gnu.org; Sat, 22 Oct 2016 15:41:06 -0400 Original-Received: from mail-it0-f42.google.com ([209.85.214.42]:36314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by2AD-0006Ty-6e for 24766@debbugs.gnu.org; Sat, 22 Oct 2016 15:41:05 -0400 Original-Received: by mail-it0-f42.google.com with SMTP id e187so66601292itc.1 for <24766@debbugs.gnu.org>; Sat, 22 Oct 2016 12:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ai+awM3MJNruAo3wzSPw6FziljkVSuAX9kSlguIiMtc=; b=lEewuPoGsmOcJD3tGF8+49hsrORTvCT6brMl81Cca/nl6PvE8Q2IotdenRtZxrLx/3 NpK8XTl+ToNOc2g0yIcrc+OtSbHktVrIlkuJOVZauuHxYH63jjjMjLvFghh89o8cFOhP QNv/Tbx1nDA1rMmSMkh2vLCM0pnucDn0hL83L7vbO5bdk1jSx9hMdvGyz57jtiCsqofF 551iYV1z/B109En3wkuIoPByLi0bKZ2CvmmCs+9fPG6tjMLQXTXCiVCpICXuY7Hyz/cb HUpUrS0GYBuuUbSyNus1OWDQjTE3X9WHoYcJAxsaC1/Iv9Ito1UTdZatVRAMI85GW4Zk eNrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ai+awM3MJNruAo3wzSPw6FziljkVSuAX9kSlguIiMtc=; b=SqeoCrAGSV+N7oVmXR1/nu8rIpyVHWf4WU4qew6ecDIbuxt4hIc9L5MS1zhHo7JiNC vi7+PNiMoz+Yv/69M9VNJRaXf5MASvyTTsLUjBJrg/vmnpAbkRWy5ID4kk1qS/3Squw4 vj1zhaXimTiqhK5Zk2GCtP3aIggYWE+zxI4EhTIo/LmLAPQCCtQsv2JPAh/OmkEjgRfS HbGSSePhhpyrLb55eZOZrkhsc1F2tRxmjjbc2j/VIT5GMESlJhZqBm9qtt+bkZauGpxk dAwTjtOs09Z6AZcmsiiYNdU8IiwJ5797XWp8T73M/49vOF7qmMdqhyUqmo92Ryp8qsR9 BCbw== X-Gm-Message-State: ABUngvfXx5MqZywSpjQFjmivkZJm4tvCBDiLxR0YC18qC2U2v1IGgrIUr9i0LTAR1Oa29Q== X-Received: by 10.36.107.15 with SMTP id v15mr6600563itc.88.1477165259412; Sat, 22 Oct 2016 12:40:59 -0700 (PDT) Original-Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id l2sm1684716itb.9.2016.10.22.12.40.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Oct 2016 12:40:59 -0700 (PDT) In-Reply-To: <83lgxgp4ts.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Oct 2016 22:21:51 +0300") 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:124852 Archived-At: Eli Zaretskii writes: >> 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. I took UNINTENDED-OK to mean that "if non-nil, nothing is done in the case that there are no appropriate indentation positions. If there are appropriate indentation positions, then it should indent as usual." The docstring could be improved to state that. >> 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), The optional argument is implicitly mentioned as "unless this command is invoked with a numeric argument, in which case it does nothing." > but other than fixing the documentation, I see > no reason to change the behavior. Am I missing something? IIUC the current behaviour essentially makes indent-relative-maybe a no-op. But again, perhaps there's something I'm missing?