all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Urban <mrsebastianurban@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 36358@debbugs.gnu.org
Subject: bug#36358: Indentation of not matched braces in latex-mode
Date: Wed, 26 Jun 2019 09:46:19 +0200	[thread overview]
Message-ID: <e784f6a3-f79b-01eb-2939-95c4d66ab692@gmail.com> (raw)
In-Reply-To: <jwv1rzhwwqq.fsf-monnier+emacs@gnu.org>

I really don't like the solution, because it'll force people to add
environments/commands they don't want to be indented and it may be
long list.

I may be wrong but do we need to include environments?  Shouldn't they
be indented by default?  I guess it depends on preferences and because
it costs nothing why not have it as well...  but then again as you
wrote (see quote below) "(...) the main distinction is whether the
command is used "within a paragraph" or not (...)", so we don't really
need environments.

> Thinking more about it, the main distinction is whether the command
> is used "within a paragraph" or not.  But I don't really know how to
> precisely characterize this notion of "within a paragraph".

This is the main problem of this bug, i.e. how to make text "flow"
better in paragraph (environments can be indented).  For now we can
populate variable '*-commands' with commands commonly used inside
paragraph, like the one I wrote in previous message.

Idea: Maybe if its at the beginning of the line and there is no text
after '}' - indent? And if it has text after OR before OR is
surrounded by it - noindet.  This would fit for things like 'section',
'emph' would be indented as well but it would not be inside paragraph
but as a separate being, so it can be indented.  I didn't check other
commands/env so there could be exceptions...

> It seems to indent by 2 regardless of the command, just like what
> you don't want.

Because this is the default value, and with setq we can change it to 0.

Also when I byte compiled tex-mode.el with your changes, there was a
warning about unused 'x' or something like that - could it be one of
'lambda (x)' in 'defcustom latex-noindent-environments'?

Also I think declarations doesn't work(1) or are mixed(2):
{\small Quisque ullamcorper placerat ipsum.  Cras nibh.  Morbi
   vel justo vitae lacus tincidunt ultrices.  Lorem ipsum dolor sit
   amet, consectetuer adipiscing elit.}

{\small\emph{Quisque ullamcorper placerat ipsum.  Cras nibh.  Morbi
vel justo vitae lacus tincidunt ultrices.}  Lorem ipsum dolor sit
   amet, consectetuer adipiscing elit.}





  reply	other threads:[~2019-06-26  7:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 16:08 bug#36358: Indentation of not matched braces in latex-mode Sebastian Urban
2019-06-24 23:22 ` Stefan Monnier
2019-06-25  7:30   ` Sebastian Urban
2019-06-25 14:53     ` Stefan Monnier
2019-06-26  7:46       ` Sebastian Urban [this message]
2019-06-26 13:49         ` Stefan Monnier
2019-06-27  8:53           ` Sebastian Urban
2019-06-29 20:08             ` Sebastian Urban
2019-06-29 21:02               ` Stefan Monnier
2020-07-09 17:18                 ` Sebastian Urban
2019-07-05 15:20               ` Basil L. Contovounesios

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=e784f6a3-f79b-01eb-2939-95c4d66ab692@gmail.com \
    --to=mrsebastianurban@gmail.com \
    --cc=36358@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.