Re: [O] How to force redisplay?
Nicolas Goaziou 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
Re: [O] How to force redisplay?
Hello, pin...@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
Re: [O] How to force redisplay?
Nicolas Goaziou 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
Re: [O] How to force redisplay?
Hello, pin...@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
Re: [O] How to force redisplay?
Nicolas Goaziou writes: > pin...@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
Re: [O] How to force redisplay?
Hello, pin...@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
Re: [O] How to force redisplay?
pin...@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
Re: [O] How to force redisplay?
pin...@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
Re: [O] How to force redisplay?
Nicolas Goaziou 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
Re: [O] How to force redisplay?
Hello, pin...@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
[O] How to force redisplay?
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