all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Gemini Lasswell <gazally@runbox.com>
Cc: 31984@debbugs.gnu.org
Subject: bug#31984: 26.1.50; IELM doesn't indent results printed with #
Date: Wed, 27 Jun 2018 22:01:34 -0400	[thread overview]
Message-ID: <87muvfoeip.fsf@gmail.com> (raw)
In-Reply-To: <871sctgwr7.fsf@runbox.com> (Gemini Lasswell's message of "Tue, 26 Jun 2018 12:42:36 -0700")

retitle 31984 26.1; indent-sexp doesn't indent expressions starting with #
found 31984 26.1
tags 31984 + confirmed
quit

Gemini Lasswell <gazally@runbox.com> writes:

> When the result of evaluation in IELM is something with a printed
> representation beginning with #, such as a record or char-table,
> it is pretty-printed without indentation.
>
> To reproduce, M-x ielm RET and then evaluate this:
>
> (require 'cl-lib)
> (cl-defstruct (foo) a)
> (make-foo :a (lambda (x) (- 1 x)))
>
> Result:
>
> #s(foo :a
> (lambda
> (x)
> (- 1 x)))

Which is because pp-buffer doesn't indent this, which is because
indent-sexp doesn't indent it, which is because indent-sexp now relies
on forward-sexp to find the end, and forward-sexp only goes over the
"#s".

Another example:

With point before the (foo), Emacs 25 indent-sexp turns this

(foo) (blah
etc)

into this

(foo) (blah
       etc)

Emacs 26 indent-sexp doesn't do anything from that position.  It's less
clear which is correct in that case, but restoring to the Emacs 25
behaviour would fix the #s(...) case as well.  Alternatively, we could
fix elisp sexp movement to handle such expressions, which we should
probably do anyway (see also Bug#15998).





  reply	other threads:[~2018-06-28  2:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 19:42 bug#31984: 26.1.50; IELM doesn't indent results printed with # Gemini Lasswell
2018-06-28  2:01 ` Noam Postavsky [this message]
2018-07-19 11:16   ` Noam Postavsky
2018-07-19 19:01     ` Gemini Lasswell
2018-07-22  1:30       ` Noam Postavsky
2018-07-26 11:49 ` Davor Rotim
2018-07-28  0:15   ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87muvfoeip.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=31984@debbugs.gnu.org \
    --cc=gazally@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.