unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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 05:45:06 +0200 (CEST)	[thread overview]
Message-ID: <N4ouWCD--3-2@tutanota.com> (raw)
In-Reply-To: <83zgibnw34.fsf@gnu.org>



Jun 17, 2022, 15:33 by eliz@gnu.org:

>> From: Drew Adams <drew.adams@oracle.com>
>> CC: "'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'" <help-gnu-emacs@gnu.org>
>> Date: Fri, 17 Jun 2022 14:10:00 +0000
>>
>> > `electric-indent-mode` says that in does "On-the-fly
>> > Reindentation".  What does that mean, and how is it
>> > different to normal indentation?
>>
>> (What's "normal indentation"?)
>>
>> The doc string says that the mode does this, which
>> is presumably what it means by hand-waving with
>> "on-the-fly reindentation":
>>
>>  this reindents whenever the hook `electric-indent-functions'
>>  returns non-nil, or if you insert a character from
>>  `electric-indent-chars'.
>>
>> The Emacs manual, node `Indent Convenience' says:
>>
>>  Electric Indent mode is a global minor mode that
>>  automatically indents the line after every <RET>
>>  you type.
>>
>> If you feel that these explanations aren't clear
>> enough then please consider filing an enhancement
>> request to clarify further: `M-x report-emacs-bug'.
>>
>
> But before you do, I suggest to check the latest code, because the
> above quotations are obsolete.
>
Have looked /emacs/lisp/electric.el which now describes command loop for `electric' modes.

Still think there should be clear explanations on the level of indentations emacs does.
This is because reindentation typically refers to an indentation enhancement compared to
some basic indentation method.  "On-the-Fly Reindentation" also has difficulty of interpretation.
Does there exist indentation that is "Not On-the-Fly"?  What would that do?

Have viewed the main repository

define-minor-mode electric-indent-mode

says

When enabled, this reindents whenever the hook `electric-indent-functions'
returns non-nil,  I do not find the comment informative regarding the types of
reindents.  

electric-indent-functions states that it is a special hook run to decide whether to auto-indent.

Additionally, reindent means that an indentation scheme would have been applied
already, supposedly composed of a simpler indent scheme.

Can information be introduced on how indentation and re-indentation works and the conditions
by which indentation is applied?

There needs to be clear explanations of what indentation and reindentation do and under what 
conditions as the current information is developer targeted but not user targeted.
 








  reply	other threads:[~2022-06-18  3:45 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=N4ouWCD--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.
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).