all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: carlmarcos--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: [External] : Tab completion and electric-indent-mode
Date: Sat, 18 Jun 2022 17:35:45 +0200 (CEST)	[thread overview]
Message-ID: <N4rSA-e--3-2@tutanota.com> (raw)
In-Reply-To: <83h74io072.fsf@gnu.org>


Jun 18, 2022, 08:17 by eliz@gnu.org:

>> Date: Sat, 18 Jun 2022 10:05:54 +0200 (CEST)
>> From: carlmarcos@tutanota.com
>> Cc: help-gnu-emacs@gnu.org
>>
>>  What exactly indentation and reindentation do depends on the current
>>  major mode. electric-indent-mode just makes the mode-specific
>>  indentation to happen automatically in certain situations, where Emacs
>>  thinks the user expects reindentation.
>>
>>  If you want to know how a specific major mode indents text, you need
>>  to look for answers in that mode, not in electric-indent-mode, because
>>  the latter simply cannot give you the answer.
>>
>> How can a user get that information, are there commands for that?
>>
>
> The commands for that are the usual Help commands, but you need to
> apply them to the major mode you are interested in.
>

Can you provide an example?  I could not find a list of all the
programming major-modes in emacs manual.

Called "C-h f mhtml-mode" for instance, which never discusses any
indentation rules.  For embedded JS, the documentation says that
code elements are indented using the rules from ‘js-mode’.  But
then, doing "M-h f js-mode" does not describe any indentation
rules.


>> Toggle on-the-fly reindentation of text lines (Electric Indent mode).
>>
>>  When enabled, this reindents whenever the hook `electric-indent-functions'
>>  returns non-nil, or if you insert one of the "electric characters".
>>  The electric characters normally include the newline, but can
>>  also include other characters as needed by the major mode; see
>>  `electric-indent-chars' for the actual list.
>>
>>  By "reindent" we mean remove any existing indentation, and then
>>  indent the line according to context and rules of the major mode.
>>
>> Can there be a clarification that reindentation removes the existing indentation
>> with new indentation rules applied?
>>
>
> ??? Isn't the above saying precisely that?  Or maybe I don't understand
> what you need clarified?
>
By the definition of "re-" meaning "again"?  Thus re-indent
corresponds to indent again.  Ok



  reply	other threads:[~2022-06-18 15:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 11:59 Tab completion and electric-indent-mode carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-17 14:10 ` [External] : " Drew Adams
2022-06-17 14:14   ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-17 15:33   ` Eli Zaretskii
2022-06-18  3:45     ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-18  6:44       ` Eli Zaretskii
2022-06-18  8:05         ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-18  8:17           ` Eli Zaretskii
2022-06-18 15:35             ` carlmarcos--- via Users list for the GNU Emacs text editor [this message]
2022-06-18 16:20               ` Eli Zaretskii
2022-06-18  9:15       ` Eric S Fraga
2022-06-19  2:26         ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-22 10:46           ` Eric S Fraga
2022-06-18 23:10       ` Drew Adams
2022-06-18 23:19         ` Drew Adams
2022-06-17 17:41   ` Emanuel Berg
2022-06-18  4:20     ` carlmarcos--- via Users list for the GNU Emacs text editor

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=N4rSA-e--3-2@tutanota.com \
    --to=help-gnu-emacs@gnu.org \
    --cc=carlmarcos@tutanota.com \
    --cc=eliz@gnu.org \
    /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.