GNU bug report logs - #36727
lisp-indent incorrect following "hidden" arg

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>

Date: Fri, 19 Jul 2019 05:03:01 UTC

Severity: minor

Tags: wontfix

Found in versions 27.0.50, 25.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36727 in the body.
You can then email your comments to 36727 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36727; Package emacs. (Fri, 19 Jul 2019 05:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 19 Jul 2019 05:03:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; indent bug
Date: Fri, 19 Jul 2019 01:02:39 -0400
(assert (progn
	  Indentation) nil
	  "<-- should line up with progn.")

In emacs-lisp-mode, both indent-pp-sexp and indent-for-tab-command
indent this incorrectly as above (string lines up with capital letter I)
instead of correctly as below (string lines up with progn’s open paren)

(assert (progn
	  Indentation) nil
	"<-- should line up with progn.")

In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1404.47 Version 10.11.6 (Build 15G22010))
 of 2019-07-19 built on Devons-MacBook-Air.local
Windowing system distributor 'Apple', version 10.3.1404
System Description:  Mac OS X 10.11.6

Recent messages:
Loading vc/ediff-hook...done
Loading uniquify...done
Loading electric...done
Loading emacs-lisp/eldoc...done
Loading cus-start...done
Loading tooltip...done
Loading /Applications/Emacs-27.0.50.app/Contents/Resources/lisp/leim/leim-list.el (source)...done
Finding pointers to doc strings...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading loadup.el (source)...done

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS PDUMPER

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
easymenu mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
elec-pair tooltip cus-start eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 265117 12806)
 (symbols 48 20144 2)
 (strings 32 54272 2272)
 (string-bytes 1 2299755)
 (vectors 16 49221)
 (vector-slots 8 1382065 76044)
 (floats 8 183 34)
 (intervals 56 220 0)
 (buffers 992 13))

 C-x C-f		;; find-file
 t			;; self-insert-command
 m			;; self-insert-command
 p			;; self-insert-command
 /			;; self-insert-command
 b			;; self-insert-command
 u			;; self-insert-command
 g			;; self-insert-command
 <tab>			;; minibuffer-complete
 <return>		;; minibuffer-complete-and-exit
 C-M-q			;; indent-pp-sexp
 M-x			;; execute-extended-command
 r			;; self-insert-command
 e			;; self-insert-command
 p			;; self-insert-command
 o			;; self-insert-command
 r			;; self-insert-command
 t			;; self-insert-command
 -			;; self-insert-command
 e			;; self-insert-command
 m			;; self-insert-command
 <tab>			;; minibuffer-complete
 <return>		;; minibuffer-complete-and-exit
 i			;; self-insert-command
 n			;; self-insert-command
 d			;; self-insert-command
 e			;; self-insert-command
 n			;; self-insert-command
 t			;; self-insert-command
 SPC			;; self-insert-command
 b			;; self-insert-command
 u			;; self-insert-command
 g			;; self-insert-command
 <return>		;; exit-minibuffer
 C-h C-h l		;; view-lossage





Changed bug title to 'lisp-indent incorrect following "hidden" arg' from '27.0.50; indent bug' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Jul 2019 12:12:01 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Jul 2019 12:12:01 GMT) Full text and rfc822 format available.

bug Marked as found in versions 25.3. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Jul 2019 12:12:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36727; Package emacs. (Thu, 10 Oct 2019 00:03:02 GMT) Full text and rfc822 format available.

Message #14 received at 36727 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
Cc: 36727 <at> debbugs.gnu.org
Subject: Re: bug#36727: 27.0.50; indent bug
Date: Thu, 10 Oct 2019 02:02:42 +0200
Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net> writes:

> (assert (progn
> 	  Indentation) nil
> 	  "<-- should line up with progn.")
>
> In emacs-lisp-mode, both indent-pp-sexp and indent-for-tab-command
> indent this incorrectly as above (string lines up with capital letter I)
> instead of correctly as below (string lines up with progn’s open paren)
>
> (assert (progn
> 	  Indentation) nil
> 	"<-- should line up with progn.")

emacs-lisp-mode also flags that `nil' with a warning face -- because
this isn't a style that's recommended.

So I don't know whether fixing up indentation in code that's already
badly formatted is something we want to do.  Any opinions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36727; Package emacs. (Thu, 10 Oct 2019 03:41:01 GMT) Full text and rfc822 format available.

Message #17 received at 36727 <at> debbugs.gnu.org (full text, mbox):

From: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36727 <at> debbugs.gnu.org
Subject: Re: bug#36727: 27.0.50; indent bug
Date: Thu, 10 Oct 2019 11:40:06 +0800
> On Oct 10, 2019, at 8:02 AM, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> 
> Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net> writes:
> 
>> (assert (progn
>> 	  Indentation) nil
>> 	  "<-- should line up with progn.")
>> 
>> In emacs-lisp-mode, both indent-pp-sexp and indent-for-tab-command
>> indent this incorrectly as above (string lines up with capital letter I)
>> instead of correctly as below (string lines up with progn’s open paren)
>> 
>> (assert (progn
>> 	  Indentation) nil
>> 	"<-- should line up with progn.")
> 
> emacs-lisp-mode also flags that `nil' with a warning face -- because
> this isn't a style that's recommended.
> 
> So I don't know whether fixing up indentation in code that's already
> badly formatted is something we want to do.  Any opinions?

Such indentation failures will conceal errors which proper indentation would highlight.
Any indenter capable of such mistakes is almost certainly buggy in many other ways.

		Peace
			—Devon

P.S. Is it worth time and attention to fix any time soon?
It’s been decades since I got paid to maintain Emacs
so I have no way to judge that.  Machine learning
may offer better ways to weigh code beauty.



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36727; Package emacs. (Fri, 11 Oct 2019 07:41:02 GMT) Full text and rfc822 format available.

Message #20 received at 36727 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
Cc: 36727 <at> debbugs.gnu.org
Subject: Re: bug#36727: 27.0.50; indent bug
Date: Fri, 11 Oct 2019 09:39:59 +0200
Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net> writes:

> Such indentation failures will conceal errors which proper indentation
> would highlight.

I think trying to indent all instances of badly-written code "right" is
pretty futile, so I'm closing this bug report.  If somebody thinks that
this is something that should be fixed, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 11 Oct 2019 07:41:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 36727 <at> debbugs.gnu.org and Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 11 Oct 2019 07:41:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 08 Nov 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 164 days ago.

Previous Next


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