* How to force redisplay?
@ 2012-01-06 16:43 François Pinard
2012-01-06 18:45 ` Nicolas Goaziou
2012-01-06 22:51 ` François Pinard
0 siblings, 2 replies; 11+ messages in thread
From: François Pinard @ 2012-01-06 16:43 UTC (permalink / raw)
To: emacs-orgmode
Hi, Org people.
There is a little problem I often observed, about bad vertical alignment
of text in Org mode buffers. Let me try to illustrate by mimicking from
an example right out from the window I currently see ;-).
Ellipses "[...]" have been added to make the example shorter.
----------------------------------------------------->
[...]
* TODO Obstacles technologiques...
* Approche /Modèle Vue Contrôleur/
L'outil utilise une approche /Modèle Vue Contrôleur/, dans [...]
combler le manque d'appariement d'impédance.
* Identification du Modèle
La traduction automatique des processus [...]
éléments de disposition.
En toute première analyse, il avait donc été déterminé [...]
trouver autre chose.
Nous avons finalement retenu l'approche suivante. [...]
qui servent de données.
* Détermination des Vues
[...]
-----------------------------------------------------<
You see, paragraphs "La traduction" et "En toute première analyse" are
not indented enough, they should be two columns more to the right.
While this happens to me fairly regularly, I did not identify yet a
recipe for reproducing it at will. I presume I'm not the only one
having this problem at times, am I?
So, my real question : is there a quick way to correct the indentation?
Currently, I go up one level, shift right (org-shiftmetaright) then
shift left (org-shiftmetaleft), and that does it. But I find these
operations a bit disrupting. Is there a faster, simpler way?
François
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-06 16:43 How to force redisplay? François Pinard
@ 2012-01-06 18:45 ` Nicolas Goaziou
2012-01-06 20:17 ` François Pinard
2012-01-06 22:51 ` François Pinard
1 sibling, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2012-01-06 18:45 UTC (permalink / raw)
To: François Pinard; +Cc: emacs-orgmode
Hello,
pinard@iro.umontreal.ca (François Pinard) writes:
> There is a little problem I often observed, about bad vertical alignment
> of text in Org mode buffers.
How do you indent your text in the first place? Do you use C-j at the
end of line? Do you use `org-indent-mode'?
Also, what Org version do you use?
Anyway, unless you're using `org-indent-mode', pressing TAB on any line
should indent it correctly. You can also mark section and call
`indent-region'.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-06 18:45 ` Nicolas Goaziou
@ 2012-01-06 20:17 ` François Pinard
2012-01-06 20:53 ` François Pinard
0 siblings, 1 reply; 11+ messages in thread
From: François Pinard @ 2012-01-06 20:17 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
>> There is a little problem I often observed, about bad vertical
>> alignment of text in Org mode buffers.
> How do you indent your text in the first place?
I do not, at least so far that I know. Usually, I use a variable number
of stars before a headline, and write text "flushed left" afterwards,
and Org mode usually does exactly what I expect.
> Do you use C-j at the end of line?
No, merely Enter at the end of each paragraph. Each paragraph is a
single line. I also managed so M-q (`fill-paragraph') collapse a set of
adjacent lines into a single one.
There is usually no extra space at the beginning of a line (or
paragraph). Yet, I noticed that If I add some, the whole paragraph is
nicely shifted right on the screen, which is quite nice.
> Do you use `org-indent-mode'?
Yes.
> Also, what Org version do you use?
A fairly recent one, from Git. Likely one or two days old.
> Anyway, unless you're using `org-indent-mode', pressing TAB on any
> line should indent it correctly. You can also mark section and call
> `indent-region'.
I do not remember TAB has any indenting effect, but has you say, it
might not be relevant when using `org-indent-mode'.
François
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-06 20:17 ` François Pinard
@ 2012-01-06 20:53 ` François Pinard
2012-01-08 9:24 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: François Pinard @ 2012-01-06 20:53 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
pinard@iro.umontreal.ca (François Pinard) writes:
> I do not remember TAB has any indenting effect, but has you say, it
> might not be relevant when using `org-indent-mode'.
I take that back! :-)
TAB removes prefixing spaces if I happen to have any! Nice.
The problem I observed is that the indentation is more to the left than
the "lefter" it may be. So it has to be a display problem somehow, I
guess. I wondered if there was some simple command to force the display
to be recomputed or adjusted (something like recomputing text properties
in a synchronous way, at least for the visible part of the window).
François
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-06 20:53 ` François Pinard
@ 2012-01-08 9:24 ` Nicolas Goaziou
2012-01-08 14:59 ` François Pinard
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2012-01-08 9:24 UTC (permalink / raw)
To: François Pinard; +Cc: emacs-orgmode
Hello,
pinard@iro.umontreal.ca (François Pinard) writes:
> The problem I observed is that the indentation is more to the left than
> the "lefter" it may be. So it has to be a display problem somehow, I
> guess. I wondered if there was some simple command to force the display
> to be recomputed or adjusted.
It wouldn't change anything: it failed once, it would fail again at
redisplay.
I tried to reproduce the problem, but couldn't so far. If you happen to
have a recipe to reproduce it, please let me know.
Also, check if there isn't any additional fontification problem that
might give a clue about the situation.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-08 9:24 ` Nicolas Goaziou
@ 2012-01-08 14:59 ` François Pinard
2012-01-08 16:47 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: François Pinard @ 2012-01-08 14:59 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> pinard@iro.umontreal.ca (François Pinard) writes:
>> The problem I observed is that the indentation is more to the left
>> than the "lefter" it may be. So it has to be a display problem
>> somehow, I guess. I wondered if there was some simple command to
>> force the display to be recomputed or adjusted.
> It wouldn't change anything: it failed once, it would fail again at
> redisplay.
Now using this command when the problem happens:
(defun fp-org-adjust-visual-margins ()
"Recompute visual left margins, for when they seem incorrect."
(interactive)
(message "Adjusting visual margins...")
(org-indent-add-properties (point-min) (point-max))
(message "Adjusting visual margins...done"))
and it /does/ correct the display.
> I tried to reproduce the problem, but couldn't so far. If you happen to
> have a recipe to reproduce it, please let me know.
I cannot reproduce it either. It just occurs, once in a while, I did
not find a pattern yet.
> Also, check if there isn't any additional fontification problem that
> might give a clue about the situation.
No, I did not observe any.
All summarized, I have an interim solution so I can continue to edit
comfortably when the display problem happens. And if I can get a more
usable description of the problem, in a way that can be reproduced, I'll
surely share that description.
Thanks for caring! :-)
François
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-08 14:59 ` François Pinard
@ 2012-01-08 16:47 ` Nicolas Goaziou
2012-01-08 20:16 ` François Pinard
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2012-01-08 16:47 UTC (permalink / raw)
To: François Pinard; +Cc: emacs-orgmode
Hello,
pinard@iro.umontreal.ca (François Pinard) writes:
> Now using this command when the problem happens:
>
>
> (defun fp-org-adjust-visual-margins ()
> "Recompute visual left margins, for when they seem incorrect."
> (interactive)
> (message "Adjusting visual margins...")
> (org-indent-add-properties (point-min) (point-max))
> (message "Adjusting visual margins...done"))
>
>
> and it /does/ correct the display.
Well, that command already exists: `org-indent-indent-buffer'.
> I cannot reproduce it either. It just occurs, once in a while, I did
> not find a pattern yet.
Just a few more questions. Does it happen:
- while you're typing on the incorrect line?
- while you're typing on another line?
- just after opening the buffer for the first time?
- just after opening the buffer for the first time, while you're typing
something in it?
Also, what happens when you type something on the faulty line? The
indentation doesn't change?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-08 16:47 ` Nicolas Goaziou
@ 2012-01-08 20:16 ` François Pinard
2012-01-09 17:54 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: François Pinard @ 2012-01-08 20:16 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
Hi, Nicolas!
> Well, that command already exists: `org-indent-indent-buffer'.
Thanks for this information. (This replies to the question in my
original message: is there a command to correct the indention?)
>> I cannot reproduce it either. It just occurs, once in a while, I did
>> not find a pattern yet.
> Just a few more questions. Does it happen:
> - while you're typing on the incorrect line?
> - while you're typing on another line?
> - just after opening the buffer for the first time?
> - just after opening the buffer for the first time, while you're typing
> something in it?
Playing a bit to reply to your questions, I think I just found a way to
reproduce the problem dependably. If on a header line of a section
having contents, I do something like:
C-e RET *** Allo RET
(well, merely choose the number of asterisks so the problem shows!).
The "Allo" line will then get intended according to the number of stars
(which is very convenient), but the following contents lines keep their
original visual indentation, which might happen to be incorrect.
> Also, what happens when you type something on the faulty line? The
> indentation doesn't change?
No, the indentation does not change.
My usual work around was to move up to the header, shift right
(indentation gets fixed), then shift left (to counteract).
François
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-08 20:16 ` François Pinard
@ 2012-01-09 17:54 ` Nicolas Goaziou
2012-01-09 19:01 ` François Pinard
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2012-01-09 17:54 UTC (permalink / raw)
To: François Pinard; +Cc: emacs-orgmode
Hello,
pinard@iro.umontreal.ca (François Pinard) writes:
> Playing a bit to reply to your questions, I think I just found a way to
> reproduce the problem dependably. If on a header line of a section
> having contents, I do something like:
>
> C-e RET *** Allo RET
>
> (well, merely choose the number of asterisks so the problem shows!).
> The "Allo" line will then get intended according to the number of stars
> (which is very convenient), but the following contents lines keep their
> original visual indentation, which might happen to be incorrect.
Thanks to your recipe, I have committed a patch for that problem on
master branch. May you test it and let me know if it fixes your
indentation problems?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-09 17:54 ` Nicolas Goaziou
@ 2012-01-09 19:01 ` François Pinard
0 siblings, 0 replies; 11+ messages in thread
From: François Pinard @ 2012-01-09 19:01 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
>> If on a header line of a section having contents, I do something
>> like:
>> C-e RET *** Allo RET
>> [...] the "Allo" line will then get intended according to the number
>> of stars, but the following contents lines keep their original visual
>> indentation, which might happen to be incorrect.
> Thanks to your recipe, I have committed a patch for that problem on
> master branch. May you test it and let me know if it fixes your
> indentation problems?
Hi, Nicolas. It does, and wonderfully so! Thanks a lot! :-)
François
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How to force redisplay?
2012-01-06 16:43 How to force redisplay? François Pinard
2012-01-06 18:45 ` Nicolas Goaziou
@ 2012-01-06 22:51 ` François Pinard
1 sibling, 0 replies; 11+ messages in thread
From: François Pinard @ 2012-01-06 22:51 UTC (permalink / raw)
To: emacs-orgmode
pinard@iro.umontreal.ca (François Pinard) writes:
> There is a little problem I often observed, about bad vertical
> alignment of text in Org mode buffers. [...] So, my real question :
> is there a quick way to correct the indentation?
I just got the problem again. OK, it seems a solution may be:
(defun fp-org-adjust-visual-margins ()
"Recompute visual left margins, for when they seem incorrect."
(interactive)
(org-indent-add-properties (point-min) (point-max)))
François
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-01-09 19:02 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-06 16:43 How to force redisplay? François Pinard
2012-01-06 18:45 ` Nicolas Goaziou
2012-01-06 20:17 ` François Pinard
2012-01-06 20:53 ` François Pinard
2012-01-08 9:24 ` Nicolas Goaziou
2012-01-08 14:59 ` François Pinard
2012-01-08 16:47 ` Nicolas Goaziou
2012-01-08 20:16 ` François Pinard
2012-01-09 17:54 ` Nicolas Goaziou
2012-01-09 19:01 ` François Pinard
2012-01-06 22:51 ` François Pinard
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.