unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36727: 27.0.50; indent bug
@ 2019-07-19  5:02 Devon Sean McCullough
  2019-10-10  0:02 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Devon Sean McCullough @ 2019-07-19  5:02 UTC (permalink / raw)
  To: 36727

(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






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#36727: 27.0.50; indent bug
  2019-07-19  5:02 bug#36727: 27.0.50; indent bug Devon Sean McCullough
@ 2019-10-10  0:02 ` Lars Ingebrigtsen
  2019-10-10  3:40   ` Devon Sean McCullough
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-10  0:02 UTC (permalink / raw)
  To: Devon Sean McCullough; +Cc: 36727

Devon Sean McCullough <Emacs-Hacker2018@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#36727: 27.0.50; indent bug
  2019-10-10  0:02 ` Lars Ingebrigtsen
@ 2019-10-10  3:40   ` Devon Sean McCullough
  2019-10-11  7:39     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Devon Sean McCullough @ 2019-10-10  3:40 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 36727

> On Oct 10, 2019, at 8:02 AM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> 
> Devon Sean McCullough <Emacs-Hacker2018@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.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#36727: 27.0.50; indent bug
  2019-10-10  3:40   ` Devon Sean McCullough
@ 2019-10-11  7:39     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-11  7:39 UTC (permalink / raw)
  To: Devon Sean McCullough; +Cc: 36727

Devon Sean McCullough <Emacs-Hacker2018@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-11  7:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19  5:02 bug#36727: 27.0.50; indent bug Devon Sean McCullough
2019-10-10  0:02 ` Lars Ingebrigtsen
2019-10-10  3:40   ` Devon Sean McCullough
2019-10-11  7:39     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).