all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Enriched mode: avoid removing my manual indents
@ 2013-05-24 12:42 Alexandre Oberlin
  2013-05-27 12:59 ` Alexandre Oberlin
  0 siblings, 1 reply; 10+ messages in thread
From: Alexandre Oberlin @ 2013-05-24 12:42 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

Maybe emacs is getting too complex for me (though this is only GNU Emacs  
23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.21.4, but I’ve really done  
my homework about this issue.

I use enriched mode extensively but if I start a new line say on column 8,  
then why does enriched mode think that is an error and put it back to  
beginning of line as soon as I type return ?

Any suggestions welcome,


Alexandre



-- 
Alexandre Oberlin
http://www.migo.info


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

* Re: Enriched mode: avoid removing my manual indents
  2013-05-24 12:42 Enriched mode: avoid removing my manual indents Alexandre Oberlin
@ 2013-05-27 12:59 ` Alexandre Oberlin
  2013-05-27 13:25   ` Drew Adams
       [not found]   ` <mailman.458.1369661162.22516.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Alexandre Oberlin @ 2013-05-27 12:59 UTC (permalink / raw)
  To: help-gnu-emacs

No idea?

I just don’t get the rationale of it and why it is so hard to disable. All  
I want from enriched mode is persistent colors/bold/italic, otherwise the  
standard indentation behavior of fundamental-mode and text-mode is OK for  
me. I tried indent-to-column, use-hard-newlines and indented-text-mode  
with no avail. Maybe I should try org-mode but I don’t have so much time  
to learn such things.


Alexandre



On Fri, 24 May 2013 14:42:12 +0200, Alexandre Oberlin  
<email_through@migo.info> wrote:

> Hi all,
>
> Maybe emacs is getting too complex for me (though this is only GNU Emacs  
> 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.21.4, but I’ve really done  
> my homework about this issue.
>
> I use enriched mode extensively but if I start a new line say on column  
> 8, then why does enriched mode think that is an error and put it back to  
> beginning of line as soon as I type return ?
>
> Any suggestions welcome,
>
>
> Alexandre
>
>
>


-- 
Alexandre Oberlin
http://www.migo.info


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

* RE: Enriched mode: avoid removing my manual indents
  2013-05-27 12:59 ` Alexandre Oberlin
@ 2013-05-27 13:25   ` Drew Adams
       [not found]   ` <mailman.458.1369661162.22516.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2013-05-27 13:25 UTC (permalink / raw)
  To: Alexandre Oberlin, help-gnu-emacs

> I just don’t get the rationale of it and why it is so hard to disable. All
> I want from enriched mode is persistent colors/bold/italic, otherwise the
> standard indentation behavior of fundamental-mode and text-mode is OK for
> me. I tried indent-to-column, use-hard-newlines and indented-text-mode
> with no avail. Maybe I should try org-mode but I don’t have so much time
> to learn such things.
> >
> > I use enriched mode extensively but if I start a new line say on column
> > 8, then why does enriched mode think that is an error and put it back to
> > beginning of line as soon as I type return ?

You can use `M-x report-emacs-bug' to submit an enhancement request.  If enriched mode couples indenting text with coloring it, and the two cannot be dissociated, that sounds like something that could be improved.

It's best to give a complete and simple recipe to repro the problematic behavior, starting from `emacs -Q'.



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

* Re: Enriched mode: avoid removing my manual indents
       [not found]   ` <mailman.458.1369661162.22516.help-gnu-emacs@gnu.org>
@ 2013-05-27 14:15     ` Alexandre Oberlin
  2013-05-27 18:55       ` Stefan Monnier
       [not found]       ` <mailman.475.1369680957.22516.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Alexandre Oberlin @ 2013-05-27 14:15 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks Drew for your reply. Maybe this behavior is not a bug but it is  
certainly confusing to me.

I can use C-x TAB "increase-left-margin" of course, but then it changes  
the indentation of the whole previous paragraph! Typing RET or explicitely  
calling open-line does not seem to create a paragraph boundary. In order  
to create a new paragraph with a new indentation, it seems that I must:
1. type a series of RET (to be able to navigate afterwards without typing  
RET);
2. go to the first line in this series;
3. indent as desired and type text;
4. go to the next line using down arrow (RET would fall back to the  
previous indentation);
5. type TAB to apply the same indentation as the previous line and type  
text.

Ain’t this a bit awkward ?


Alexandre


  On Mon, 27 May 2013 15:25:46 +0200, Drew Adams <drew.adams@oracle.com>  
wrote:

>> I just don’t get the rationale of it and why it is so hard to disable.  
>> All
>> I want from enriched mode is persistent colors/bold/italic, otherwise  
>> the
>> standard indentation behavior of fundamental-mode and text-mode is OK  
>> for
>> me. I tried indent-to-column, use-hard-newlines and indented-text-mode
>> with no avail. Maybe I should try org-mode but I don’t have so much time
>> to learn such things.
>> >
>> > I use enriched mode extensively but if I start a new line say on  
>> column
>> > 8, then why does enriched mode think that is an error and put it back  
>> to
>> > beginning of line as soon as I type return ?
>
> You can use `M-x report-emacs-bug' to submit an enhancement request.  If  
> enriched mode couples indenting text with coloring it, and the two  
> cannot be dissociated, that sounds like something that could be improved.
>
> It's best to give a complete and simple recipe to repro the problematic  
> behavior, starting from `emacs -Q'.
>


-- 
Alexandre Oberlin
http://www.migo.info


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

* Re: Enriched mode: avoid removing my manual indents
  2013-05-27 14:15     ` Alexandre Oberlin
@ 2013-05-27 18:55       ` Stefan Monnier
       [not found]       ` <mailman.475.1369680957.22516.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2013-05-27 18:55 UTC (permalink / raw)
  To: help-gnu-emacs

> Thanks Drew for your reply. Maybe this behavior is not a bug but it is
> certainly confusing to me.

`enriched-mode' was the beginning of something that never materialized,
so it's no wonder it doesn't work exactly like you want.

It's not used very much as far as I know.  But I think Drew's point is
right, in that it would make sense to split enriched-mode into
sub-elements, such that the "save faces" part could be used separately.


        Stefan




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

* Re: Enriched mode: avoid removing my manual indents
       [not found]       ` <mailman.475.1369680957.22516.help-gnu-emacs@gnu.org>
@ 2013-05-28 11:50         ` Alexandre Oberlin
  2013-06-04 11:52         ` Alexandre Oberlin
                           ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Alexandre Oberlin @ 2013-05-28 11:50 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks Stefan for the info.

I just sent a bug report as suggested.

Alexandre



On Mon, 27 May 2013 20:55:37 +0200, Stefan Monnier  
<monnier@iro.umontreal.ca> wrote:

>> Thanks Drew for your reply. Maybe this behavior is not a bug but it is
>> certainly confusing to me.
>
> `enriched-mode' was the beginning of something that never materialized,
> so it's no wonder it doesn't work exactly like you want.
>
> It's not used very much as far as I know.  But I think Drew's point is
> right, in that it would make sense to split enriched-mode into
> sub-elements, such that the "save faces" part could be used separately.
>
>
>         Stefan
>
>


-- 
Alexandre Oberlin
http://www.migo.info


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

* Re: Enriched mode: avoid removing my manual indents
       [not found]       ` <mailman.475.1369680957.22516.help-gnu-emacs@gnu.org>
  2013-05-28 11:50         ` Alexandre Oberlin
@ 2013-06-04 11:52         ` Alexandre Oberlin
  2014-02-15 17:30         ` [SOLVED] " Alexandre Oberlin
                           ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Alexandre Oberlin @ 2013-06-04 11:52 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

BTW, there is AFAIK a true bug in enriched-mode, which I noticed long ago:  
the accentuated characters are not recovered by "recover-this-file". I get  
garbage and the old song;
> However, each of them encountered characters it couldn't encode:
>   utf-8-unix cannot encode these: � � � � � � � � � � ...
(GNU Emacs 23.4.1)

It’s nice that this command can be undone!

I guess I should report a bug ASAP. I also must try in org-mode.



Alexandre


On Mon, 27 May 2013 20:55:37 +0200, Stefan Monnier  
<monnier@iro.umontreal.ca> wrote:


>
> `enriched-mode' was the beginning of something that never materialized,
> so it's no wonder it doesn't work exactly like you want.
>
> It's not used very much as far as I know.  But I think Drew's point is
> right, in that it would make sense to split enriched-mode into
> sub-elements, such that the "save faces" part could be used separately.
>
>
>         Stefan
>
>


-- 
Alexandre Oberlin
http://www.migo.info


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

* [SOLVED] Re: Enriched mode: avoid removing my manual indents
       [not found]       ` <mailman.475.1369680957.22516.help-gnu-emacs@gnu.org>
  2013-05-28 11:50         ` Alexandre Oberlin
  2013-06-04 11:52         ` Alexandre Oberlin
@ 2014-02-15 17:30         ` Alexandre Oberlin
  2014-02-15 17:30         ` Alexandre Oberlin
  2014-02-15 17:32         ` Alexandre Oberlin
  4 siblings, 0 replies; 10+ messages in thread
From: Alexandre Oberlin @ 2014-02-15 17:30 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

Old issue solved, just in case someone else uses enriched-mode, which I
personally find invaluable to highlight my notes with colours or styles.

Let’s recall the problem:
On Fri, 24 May 2013 14:42:12 +0200, Alexandre Oberlin
<email_through@migo.info> wrote:
> I use enriched mode extensively but if I start a new line say on column  
> 8, then why does enriched mode think that is an error and put it back to  
> beginning of line as soon as I type return ?

On Mon, 27 May 2013 20:55:37 +0200, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
> `enriched-mode' was the beginning of something that never materialized,
> so it's no wonder it doesn't work exactly like you want.
>
> It's not used very much as far as I know.  But I think Drew's point is
> right, in that it would make sense to split enriched-mode into
> sub-elements, such that the "save faces" part could be used separately.

Actually the annoyance was bigger than what I wrote in this thread, since
you are virtually stuck to one indentation column once it is set. However,
getting rid of this was in fact dirty simple.

Here’s what I did, while inside a buffer in enriched-mode:
1. Hit CTRL + h, k
2. Hit RETURN
3. Read the fine help:
#############################################
RET (translated from <return>) runs the command
reindent-then-newline-and-indent, which is an interactive Lisp
function in `simple.el'.

It is bound to RET.

(reindent-then-newline-and-indent)

Reindent current line, insert newline, then indent the new line.
Indentation of both lines is done according to the current major mode,
which means calling the current value of `indent-line-function'.
In programming language modes, this is the same as TAB.
In some text modes, where TAB inserts a tab, this indents to the
column specified by the function `current-left-margin'.

[back]
#############################################

Of course there are several solutions once you know the above.
A quick and dirty one is to overwrite the reindent-then-newline-and-indent
function’s definition by putting the following in your .emacs file:
(defun reindent-then-newline-and-indent ()
       "No thanks"
       (interactive "*")	
       (newline)	
       (indent-according-to-mode))

Modifying /usr/share/emacs/23.4/lisp/textmodes/enriched.el might be a
better solution, but it would take more time.

I wish I had this flexibility in a few other software programs...


Hope it helps,


Alexandre


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

* [SOLVED] Re: Enriched mode: avoid removing my manual indents
       [not found]       ` <mailman.475.1369680957.22516.help-gnu-emacs@gnu.org>
                           ` (2 preceding siblings ...)
  2014-02-15 17:30         ` [SOLVED] " Alexandre Oberlin
@ 2014-02-15 17:30         ` Alexandre Oberlin
  2014-02-15 17:32         ` Alexandre Oberlin
  4 siblings, 0 replies; 10+ messages in thread
From: Alexandre Oberlin @ 2014-02-15 17:30 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

Old issue solved, just in case someone else uses enriched-mode, which I
personally find invaluable to highlight my notes with colours or styles.

Let’s recall the problem:
On Fri, 24 May 2013 14:42:12 +0200, Alexandre Oberlin
<email_through@migo.info> wrote:
> I use enriched mode extensively but if I start a new line say on column  
> 8, then why does enriched mode think that is an error and put it back to  
> beginning of line as soon as I type return ?

On Mon, 27 May 2013 20:55:37 +0200, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
> `enriched-mode' was the beginning of something that never materialized,
> so it's no wonder it doesn't work exactly like you want.
>
> It's not used very much as far as I know.  But I think Drew's point is
> right, in that it would make sense to split enriched-mode into
> sub-elements, such that the "save faces" part could be used separately.

Actually the annoyance was bigger than what I wrote in this thread, since
you are virtually stuck to one indentation column once it is set. However,
getting rid of this was in fact dirty simple.

Here’s what I did, while inside a buffer in enriched-mode:
1. Hit CTRL + h, k
2. Hit RETURN
3. Read the fine help:
#############################################
RET (translated from <return>) runs the command
reindent-then-newline-and-indent, which is an interactive Lisp
function in `simple.el'.

It is bound to RET.

(reindent-then-newline-and-indent)

Reindent current line, insert newline, then indent the new line.
Indentation of both lines is done according to the current major mode,
which means calling the current value of `indent-line-function'.
In programming language modes, this is the same as TAB.
In some text modes, where TAB inserts a tab, this indents to the
column specified by the function `current-left-margin'.

[back]
#############################################

Of course there are several solutions once you know the above.
A quick and dirty one is to overwrite the reindent-then-newline-and-indent
function’s definition by putting the following in your .emacs file:
(defun reindent-then-newline-and-indent ()
       "No thanks"
       (interactive "*")	
       (newline)	
       (indent-according-to-mode))

Modifying /usr/share/emacs/23.4/lisp/textmodes/enriched.el might be a
better solution, but it would take more time.

I wish I had this flexibility in a few other software programs...


Hope it helps,


Alexandre


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

* [SOLVED] Re: Enriched mode: avoid removing my manual indents
       [not found]       ` <mailman.475.1369680957.22516.help-gnu-emacs@gnu.org>
                           ` (3 preceding siblings ...)
  2014-02-15 17:30         ` Alexandre Oberlin
@ 2014-02-15 17:32         ` Alexandre Oberlin
  4 siblings, 0 replies; 10+ messages in thread
From: Alexandre Oberlin @ 2014-02-15 17:32 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

Old issue solved, just in case someone else uses enriched-mode, which I
personally find invaluable to highlight my notes with colours or styles.

Let’s recall the problem:
On Fri, 24 May 2013 14:42:12 +0200, Alexandre Oberlin
<email_through@migo.info> wrote:
> I use enriched mode extensively but if I start a new line say on column  
> 8, then why does enriched mode think that is an error and put it back to  
> beginning of line as soon as I type return ?

On Mon, 27 May 2013 20:55:37 +0200, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
> `enriched-mode' was the beginning of something that never materialized,
> so it's no wonder it doesn't work exactly like you want.
>
> It's not used very much as far as I know.  But I think Drew's point is
> right, in that it would make sense to split enriched-mode into
> sub-elements, such that the "save faces" part could be used separately.

Actually the annoyance was bigger than what I wrote in this thread, since
you are virtually stuck to one indentation column once it is set. However,
getting rid of this was in fact dirty simple.

Here’s what I did, while inside a buffer in enriched-mode:
1. Hit CTRL + h, k
2. Hit RETURN
3. Read the fine help:
#############################################
RET (translated from <return>) runs the command
reindent-then-newline-and-indent, which is an interactive Lisp
function in `simple.el'.

It is bound to RET.

(reindent-then-newline-and-indent)

Reindent current line, insert newline, then indent the new line.
Indentation of both lines is done according to the current major mode,
which means calling the current value of `indent-line-function'.
In programming language modes, this is the same as TAB.
In some text modes, where TAB inserts a tab, this indents to the
column specified by the function `current-left-margin'.

[back]
#############################################

Of course there are several solutions once you know the above.
A quick and dirty one is to overwrite the reindent-then-newline-and-indent
function’s definition by putting the following in your .emacs file:
(defun reindent-then-newline-and-indent ()
         "No thanks"
         (interactive "*")	
         (newline)	
         (indent-according-to-mode))

Modifying /usr/share/emacs/23.4/lisp/textmodes/enriched.el might be a
better solution, but it would take more time.

I wish I had this flexibility in a few other software programs...


Hope it helps,


Alexandre


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

end of thread, other threads:[~2014-02-15 17:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-24 12:42 Enriched mode: avoid removing my manual indents Alexandre Oberlin
2013-05-27 12:59 ` Alexandre Oberlin
2013-05-27 13:25   ` Drew Adams
     [not found]   ` <mailman.458.1369661162.22516.help-gnu-emacs@gnu.org>
2013-05-27 14:15     ` Alexandre Oberlin
2013-05-27 18:55       ` Stefan Monnier
     [not found]       ` <mailman.475.1369680957.22516.help-gnu-emacs@gnu.org>
2013-05-28 11:50         ` Alexandre Oberlin
2013-06-04 11:52         ` Alexandre Oberlin
2014-02-15 17:30         ` [SOLVED] " Alexandre Oberlin
2014-02-15 17:30         ` Alexandre Oberlin
2014-02-15 17:32         ` Alexandre Oberlin

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.