all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24844: 26.0.50; electric-newline-and-maybe-indent
@ 2016-11-01 11:23 Andreas Röhler
  2016-11-01 18:45 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2016-11-01 11:23 UTC (permalink / raw)
  To: 24844

Docstring of electric-newline-and-maybe-indent says


"Insert a newline.
If `electric-indent-mode' is enabled, that's that, but if it
is *disabled* then additionally indent according to major mode...."

I.e disabling `electric-indent-mode' will cause electric indent?

Is this sane?

Cheers,

Andreas







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

* bug#24844: 26.0.50; electric-newline-and-maybe-indent
  2016-11-01 11:23 bug#24844: 26.0.50; electric-newline-and-maybe-indent Andreas Röhler
@ 2016-11-01 18:45 ` Eli Zaretskii
  2016-11-01 19:43   ` Andreas Röhler
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2016-11-01 18:45 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: 24844

> From: Andreas Röhler <andreas.roehler@easy-emacs.de>
> Date: Tue, 1 Nov 2016 12:23:24 +0100
> 
> Docstring of electric-newline-and-maybe-indent says
> 
> 
> "Insert a newline.
> If `electric-indent-mode' is enabled, that's that, but if it
> is *disabled* then additionally indent according to major mode...."
> 
> I.e disabling `electric-indent-mode' will cause electric indent?

Where does it say that the additional indent is electric?  It isn't.

> Is this sane?

It is to me.

Did you look at the code?





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

* bug#24844: 26.0.50; electric-newline-and-maybe-indent
  2016-11-01 18:45 ` Eli Zaretskii
@ 2016-11-01 19:43   ` Andreas Röhler
  2016-11-01 20:08     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2016-11-01 19:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 24844



On 01.11.2016 19:45, Eli Zaretskii wrote:
>> From: Andreas Röhler <andreas.roehler@easy-emacs.de> Date: Tue, 1 Nov 
>> 2016 12:23:24 +0100 Docstring of electric-newline-and-maybe-indent 
>> says "Insert a newline. If `electric-indent-mode' is enabled, that's 
>> that, but if it is *disabled* then additionally indent according to 
>> major mode...." I.e disabling `electric-indent-mode' will cause 
>> electric indent? 
> Where does it say that the additional indent is electric? It isn't.

Understand "electric" just as a kind of joint --or additional-- action. 
Wrong?

>> Is this sane? 
> It is to me. Did you look at the code?

No, the experience was concludent with docu.

In haskell-mode at EOL:

factors :: Int -> [Int]

C-j calls

electric-newline-and-maybe-indent

and indents wrongly - there is nothing to indent.

BTW why electric-newline? Isn't the indent the electric action?

In order to avoid the wrong indent, have to enable electric-indent-mode 
- doesn't make sense for me.







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

* bug#24844: 26.0.50; electric-newline-and-maybe-indent
  2016-11-01 19:43   ` Andreas Röhler
@ 2016-11-01 20:08     ` Eli Zaretskii
  2016-11-01 21:04       ` Andreas Röhler
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2016-11-01 20:08 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: 24844

> Cc: 24844@debbugs.gnu.org
> From: Andreas Röhler <andreas.roehler@easy-emacs.de>
> Date: Tue, 1 Nov 2016 20:43:04 +0100
> 
> In haskell-mode at EOL:
> 
> factors :: Int -> [Int]
> 
> C-j calls
> 
> electric-newline-and-maybe-indent
> 
> and indents wrongly - there is nothing to indent.

So perhaps this is the problem to solve, not the documentation?

> BTW why electric-newline? Isn't the indent the electric action?

I agree that the name is confusing; I guess the "electric-" prefix is
to blame.

> In order to avoid the wrong indent, have to enable electric-indent-mode 
> - doesn't make sense for me.

So I think the bug is the wrong indent you needed to avoid.





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

* bug#24844: 26.0.50; electric-newline-and-maybe-indent
  2016-11-01 20:08     ` Eli Zaretskii
@ 2016-11-01 21:04       ` Andreas Röhler
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2016-11-01 21:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 24844



On 01.11.2016 21:08, Eli Zaretskii wrote:
>> Cc: 24844@debbugs.gnu.org
>> From: Andreas Röhler <andreas.roehler@easy-emacs.de>
>> Date: Tue, 1 Nov 2016 20:43:04 +0100
>>
>> In haskell-mode at EOL:
>>
>> factors :: Int -> [Int]
>>
>> C-j calls
>>
>> electric-newline-and-maybe-indent
>>
>> and indents wrongly - there is nothing to indent.
> So perhaps this is the problem to solve, not the documentation?
>
>> BTW why electric-newline? Isn't the indent the electric action?
> I agree that the name is confusing; I guess the "electric-" prefix is
> to blame.
>
>> In order to avoid the wrong indent, have to enable electric-indent-mode
>> - doesn't make sense for me.
> So I think the bug is the wrong indent you needed to avoid.

Hmm, think there are two bugs.

In electric-newline-and-maybe-indent switching the clauses should solve 
this one.

Than, even an electric-indent should do nothing when not appropriate, 
second bug.





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

end of thread, other threads:[~2016-11-01 21:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-01 11:23 bug#24844: 26.0.50; electric-newline-and-maybe-indent Andreas Röhler
2016-11-01 18:45 ` Eli Zaretskii
2016-11-01 19:43   ` Andreas Röhler
2016-11-01 20:08     ` Eli Zaretskii
2016-11-01 21:04       ` Andreas Röhler

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.