* org-indent-mode and visual-line-mode
@ 2009-11-18 20:07 Matt Price
2009-11-19 13:17 ` Carsten Dominik
0 siblings, 1 reply; 11+ messages in thread
From: Matt Price @ 2009-11-18 20:07 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]
Are these two incompatible, or is there something wrong with my setup?
Using org-mode 6.33c and a recent emacs snapshot (20090909), turning
org-indent-mode on stops visual-line-mode from indenting properly. As
soon as I turn org's intentation off, vusial-line-mode starts working
normally again. I would *love* to have both of htese working properly
-- is there anything I can do?
Thanks very much,
Matt
--
Matt Price
matt.price@utoronto.ca
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-indent-mode and visual-line-mode
2009-11-18 20:07 org-indent-mode and visual-line-mode Matt Price
@ 2009-11-19 13:17 ` Carsten Dominik
2009-11-19 15:20 ` Matt Price
0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2009-11-19 13:17 UTC (permalink / raw)
To: Matt Price; +Cc: emacs-orgmode
On Nov 18, 2009, at 9:07 PM, Matt Price wrote:
> Are these two incompatible, or is there something wrong with my setup?
> Using org-mode 6.33c and a recent emacs snapshot (20090909), turning
> org-indent-mode on stops visual-line-mode from indenting properly. As
> soon as I turn org's intentation off, vusial-line-mode starts working
> normally again. I would *love* to have both of htese working properly
> -- is there anything I can do?
I am not sure what you mean by "visual-mode indents properly". I am
not using visual-line mode. So you you describe better what visual
line mode does and what features of it exactly disappear when you turn
on org-mode?
- Carsten
>
> Thanks very much,
>
> Matt
>
> --
> Matt Price
> matt.price@utoronto.ca
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-indent-mode and visual-line-mode
2009-11-19 13:17 ` Carsten Dominik
@ 2009-11-19 15:20 ` Matt Price
2009-11-19 22:33 ` Ben Finney
0 siblings, 1 reply; 11+ messages in thread
From: Matt Price @ 2009-11-19 15:20 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 2151 bytes --]
On Thu, 2009-11-19 at 14:17 +0100, Carsten Dominik wrote:
> On Nov 18, 2009, at 9:07 PM, Matt Price wrote:
>
> > Are these two incompatible, or is there something wrong with my setup?
> > Using org-mode 6.33c and a recent emacs snapshot (20090909), turning
> > org-indent-mode on stops visual-line-mode from indenting properly. As
> > soon as I turn org's intentation off, vusial-line-mode starts working
> > normally again. I would *love* to have both of htese working properly
> > -- is there anything I can do?
>
> I am not sure what you mean by "visual-mode indents properly". I am
> not using visual-line mode. So you you describe better what visual
> line mode does and what features of it exactly disappear when you turn
> on org-mode?
>
sorry carsten. also I think I should have said "wraps" rather than
"indents".
Visual-line-mode is a replacement for longlines-mode; it soft-wraps text
at the screen boundary, and does a much better job than longlines-mode
did. When I'm writing anything that's not code I rely on it entirely.
But I also *love* the new indent mode in org -- it's much easier for me
to see hierarchical relationships than it was in earlier versions
(thanks _very_ much for the new feature). So I'd like to use them
together; but when org-indent-mode is turned on, visual-line-mode no
longer soft-wraps at all. you can try it out with M-x visual-line-mode,
and the manual description is here:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Visual-Line-Mode.html
Is that what you needed? I'm not sure where the code for
visual-line-mode lives -- there isn't a visual-line.el anywhere that i
can find on my system. Thanks much,
matt
> - Carsten
>
> >
> > Thanks very much,
> >
> > Matt
> >
> > --
> > Matt Price
> > matt.price@utoronto.ca
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Remember: use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
--
Matt Price
matt.price@utoronto.ca
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-indent-mode and visual-line-mode
2009-11-19 15:20 ` Matt Price
@ 2009-11-19 22:33 ` Ben Finney
2009-11-20 2:12 ` Matt Price
0 siblings, 1 reply; 11+ messages in thread
From: Ben Finney @ 2009-11-19 22:33 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1298 bytes --]
Matt Price <matt.price@utoronto.ca> writes:
> Visual-line-mode is a replacement for longlines-mode; it soft-wraps
> text at the screen boundary, and does a much better job than
> longlines-mode did.
I think you're confused by a (helpful) conflation.
The ‘visual-lines-mode’ is indeed a replacement for ‘longlines-mode’,
but its job is to cause editing commands to act on visual, rather than
logical lines.
The wrapping behaviour you're describing is performed by ‘word-wrap’, a
buffer-local variable that cuases lines to be visually broken at word
boundaries.
The ‘word-wrap’ variable is set by ‘visual-lines-mode’, which is why
you're seeing it happen. But ‘word-wrap’ is independent of this.
> Is that what you needed? I'm not sure where the code for
> visual-line-mode lives -- there isn't a visual-line.el anywhere that i
> can find on my system.
Fortunately, ‘visual-line-mode’ appears to be a distraction from what
you're describing; Carsten only needs to learn about ‘word-wrap’.
--
\ “The flattening of underwear with pleasure is the job of the |
`\ chambermaid.” —hotel, Yugoslavia |
_o__) |
Ben Finney
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Re: org-indent-mode and visual-line-mode
2009-11-19 22:33 ` Ben Finney
@ 2009-11-20 2:12 ` Matt Price
2009-11-20 2:17 ` Ben Finney
2009-11-20 7:28 ` Carsten Dominik
0 siblings, 2 replies; 11+ messages in thread
From: Matt Price @ 2009-11-20 2:12 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1853 bytes --]
On Fri, 2009-11-20 at 09:33 +1100, Ben Finney wrote:
> Matt Price <matt.price@utoronto.ca> writes:
>
> > Visual-line-mode is a replacement for longlines-mode; it soft-wraps
> > text at the screen boundary, and does a much better job than
> > longlines-mode did.
>
> I think you're confused by a (helpful) conflation.
>
> The ‘visual-lines-mode’ is indeed a replacement for ‘longlines-mode’,
> but its job is to cause editing commands to act on visual, rather than
> logical lines.
>
> The wrapping behaviour you're describing is performed by ‘word-wrap’, a
> buffer-local variable that cuases lines to be visually broken at word
> boundaries.
>
> The ‘word-wrap’ variable is set by ‘visual-lines-mode’, which is why
> you're seeing it happen. But ‘word-wrap’ is independent of this.
>
that's very helpful. but see below...
> > Is that what you needed? I'm not sure where the code for
> > visual-line-mode lives -- there isn't a visual-line.el anywhere that i
> > can find on my system.
>
> Fortunately, ‘visual-line-mode’ appears to be a distraction from what
> you're describing; Carsten only needs to learn about ‘word-wrap’.
>
would you expect then that i should see the same difficulty if I
evaluate '(word-wrap 1) in a buffer using org-indent-mode? Because when
I do that, the wrapping seems to occur as expected and, importantly, the
indentation level is preserved too. So to my extremely unpracticed eye
it seems that visual-lines-mode does something to the wrapping behaviour
that makes problems for org-mode.
Does anyone else use visual-=line-mode with org? I'm sort of surprised
no one would -- it seems a completely obvious choice to me and it may be
that I'm just missing something about optimum work flows or similar.
Anyway, thanks again,
Matt
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: org-indent-mode and visual-line-mode
2009-11-20 2:12 ` Matt Price
@ 2009-11-20 2:17 ` Ben Finney
2009-11-20 7:28 ` Carsten Dominik
1 sibling, 0 replies; 11+ messages in thread
From: Ben Finney @ 2009-11-20 2:17 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 712 bytes --]
Matt Price <matt.price@utoronto.ca> writes:
> Does anyone else use visual-=line-mode with org? I'm sort of surprised
> no one would -- it seems a completely obvious choice to me and it may
> be that I'm just missing something about optimum work flows or
> similar.
I hard-wrap (Emacs “fill” operations) paragraphs in most text files,
including my Org files. So I don't have to deal very often with the
distinction between visual versus local lines.
--
\ “Technology is neither good nor bad; nor is it neutral.” |
`\ —Melvin Kranzberg's First Law of Technology |
_o__) |
Ben Finney
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Re: org-indent-mode and visual-line-mode
2009-11-20 2:12 ` Matt Price
2009-11-20 2:17 ` Ben Finney
@ 2009-11-20 7:28 ` Carsten Dominik
2009-11-20 13:03 ` Matt Price
1 sibling, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2009-11-20 7:28 UTC (permalink / raw)
To: Matt Price; +Cc: emacs-orgmode
On Nov 20, 2009, at 3:12 AM, Matt Price wrote:
> On Fri, 2009-11-20 at 09:33 +1100, Ben Finney wrote:
>> Matt Price <matt.price@utoronto.ca> writes:
>>
>>> Visual-line-mode is a replacement for longlines-mode; it soft-wraps
>>> text at the screen boundary, and does a much better job than
>>> longlines-mode did.
>>
>> I think you're confused by a (helpful) conflation.
>>
>> The ‘visual-lines-mode’ is indeed a replacement for ‘longlines-mode’,
>> but its job is to cause editing commands to act on visual, rather
>> than
>> logical lines.
>>
>> The wrapping behaviour you're describing is performed by ‘word-
>> wrap’, a
>> buffer-local variable that cuases lines to be visually broken at word
>> boundaries.
>>
>> The ‘word-wrap’ variable is set by ‘visual-lines-mode’, which is why
>> you're seeing it happen. But ‘word-wrap’ is independent of this.
>>
> that's very helpful. but see below...
>
>>> Is that what you needed? I'm not sure where the code for
>>> visual-line-mode lives -- there isn't a visual-line.el anywhere
>>> that i
>>> can find on my system.
>>
>> Fortunately, ‘visual-line-mode’ appears to be a distraction from what
>> you're describing; Carsten only needs to learn about ‘word-wrap’.
>>
> would you expect then that i should see the same difficulty if I
> evaluate '(word-wrap 1) in a buffer using org-indent-mode? Because
> when
> I do that, the wrapping seems to occur as expected and, importantly,
> the
> indentation level is preserved too. So to my extremely unpracticed
> eye
> it seems that visual-lines-mode does something to the wrapping
> behaviour
> that makes problems for org-mode.
>
> Does anyone else use visual-=line-mode with org? I'm sort of
> surprised
> no one would -- it seems a completely obvious choice to me and it
> may be
> that I'm just missing something about optimum work flows or similar.
Hi Matt,
personally, I never use visual-line-mode, mainly because cursor motion
becomes unpredictable to me (down doe not get me into the next line,
so for example keyboard macros are much harder to make to consistently).
That said, I would expect that what you are describing should work,
and my memory is also that it used to work - after all, I implemented
not only line-prefix, but also wrap-prefix in org-indent-mode. I am
quite sure that this used to work.
I am not sure how to proceed. Someone would have to bisect Emacs to
find which commit changed this behavior. Or maybe at lease someone
can try with a vanilla 23.1 Emacs? If it works there, we might have
enough to file a bug report.
- Carsten
- Carsten
>
> Anyway, thanks again,
> Matt
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Re: org-indent-mode and visual-line-mode
2009-11-20 7:28 ` Carsten Dominik
@ 2009-11-20 13:03 ` Matt Price
2009-11-20 13:21 ` Carsten Dominik
2009-11-20 13:54 ` Carsten Dominik
0 siblings, 2 replies; 11+ messages in thread
From: Matt Price @ 2009-11-20 13:03 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1480 bytes --]
On Fri, 2009-11-20 at 08:28 +0100, Carsten Dominik wrote:
> Hi Matt,
>
> personally, I never use visual-line-mode, mainly because cursor motion
> becomes unpredictable to me (down doe not get me into the next line,
> so for example keyboard macros are much harder to make to consistently).
>
> That said, I would expect that what you are describing should work,
> and my memory is also that it used to work - after all, I implemented
> not only line-prefix, but also wrap-prefix in org-indent-mode. I am
> quite sure that this used to work.
>
> I am not sure how to proceed. Someone would have to bisect Emacs to
> find which commit changed this behavior. Or maybe at lease someone
> can try with a vanilla 23.1 Emacs? If it works there, we might have
> enough to file a bug report.
>
I just tried it on the ubuntu karmic emacs23 packages. I get the same
behaviour i was seeing before. In case my description is misleading, i
just made a couple of screenshots and posted them here:
http://www.derailleur.org/screenshots/
one shows some quick text when indent-mode is enabled, the other shows
it with indent-mode disabled.
anyway if you have any ideas how i might help that'd be great --
bisecting the code is probably beyond what i can easily do but i could
try to dig around a bit somehow.
thanks - i appreciate how much effort you put into this carsten! -
matt
--
Matt Price
matt.price@utoronto.ca
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Re: org-indent-mode and visual-line-mode
2009-11-20 13:03 ` Matt Price
@ 2009-11-20 13:21 ` Carsten Dominik
2009-11-20 13:54 ` Carsten Dominik
1 sibling, 0 replies; 11+ messages in thread
From: Carsten Dominik @ 2009-11-20 13:21 UTC (permalink / raw)
To: Matt Price; +Cc: emacs-orgmode
On Nov 20, 2009, at 2:03 PM, Matt Price wrote:
> On Fri, 2009-11-20 at 08:28 +0100, Carsten Dominik wrote:
>
>> Hi Matt,
>>
>> personally, I never use visual-line-mode, mainly because cursor
>> motion
>> becomes unpredictable to me (down doe not get me into the next line,
>> so for example keyboard macros are much harder to make to
>> consistently).
>>
>> That said, I would expect that what you are describing should work,
>> and my memory is also that it used to work - after all, I implemented
>> not only line-prefix, but also wrap-prefix in org-indent-mode. I am
>> quite sure that this used to work.
>>
>> I am not sure how to proceed. Someone would have to bisect Emacs to
>> find which commit changed this behavior. Or maybe at lease someone
>> can try with a vanilla 23.1 Emacs? If it works there, we might have
>> enough to file a bug report.
>>
>
> I just tried it on the ubuntu karmic emacs23 packages. I get the same
> behaviour i was seeing before. In case my description is
> misleading, i
> just made a couple of screenshots and posted them here:
> http://www.derailleur.org/screenshots/
> one shows some quick text when indent-mode is enabled, the other shows
> it with indent-mode disabled.
>
> anyway if you have any ideas how i might help that'd be great --
> bisecting the code is probably beyond what i can easily do but i could
> try to dig around a bit somehow.
>
> thanks - i appreciate how much effort you put into this carsten! -
It clearly seems to me that this is a problem with the Emacs redisplay
engine. Because when I press C-l (control-ell) several times, than
the line actually
snaps into visual line mode.....
- Carsten
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Re: org-indent-mode and visual-line-mode
2009-11-20 13:03 ` Matt Price
2009-11-20 13:21 ` Carsten Dominik
@ 2009-11-20 13:54 ` Carsten Dominik
2009-11-20 15:10 ` Matt Price
1 sibling, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2009-11-20 13:54 UTC (permalink / raw)
To: Matt Price; +Cc: emacs-orgmode
Hi Matt,
can you please try the following patch?
-------------------------------------------------------------------------------
diff --git a/lisp/org-indent.el b/lisp/org-indent.el
index afce59f..53db9be 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -106,8 +106,8 @@ this variable can be set to nil to get rid of the
timer."
;; Initialize the indentation and star vectors
(setq org-indent-strings (make-vector (1+ org-indent-max) nil))
(setq org-indent-stars (make-vector (1+ org-indent-max) nil))
- (aset org-indent-strings 0 "")
- (aset org-indent-stars 0 "")
+ (aset org-indent-strings 0 nil)
+ (aset org-indent-stars 0 nil)
(loop for i from 1 to org-indent-max do
(aset org-indent-strings i
(org-add-props
--------------------------------------------------------------------------------
Also, you should have (I believe you do)
(setq org-startup-truncated nil)
Let me know if this solves the problem
- Carsten
On Nov 20, 2009, at 2:03 PM, Matt Price wrote:
> On Fri, 2009-11-20 at 08:28 +0100, Carsten Dominik wrote:
>
>> Hi Matt,
>>
>> personally, I never use visual-line-mode, mainly because cursor
>> motion
>> becomes unpredictable to me (down doe not get me into the next line,
>> so for example keyboard macros are much harder to make to
>> consistently).
>>
>> That said, I would expect that what you are describing should work,
>> and my memory is also that it used to work - after all, I implemented
>> not only line-prefix, but also wrap-prefix in org-indent-mode. I am
>> quite sure that this used to work.
>>
>> I am not sure how to proceed. Someone would have to bisect Emacs to
>> find which commit changed this behavior. Or maybe at lease someone
>> can try with a vanilla 23.1 Emacs? If it works there, we might have
>> enough to file a bug report.
>>
>
> I just tried it on the ubuntu karmic emacs23 packages. I get the same
> behaviour i was seeing before. In case my description is
> misleading, i
> just made a couple of screenshots and posted them here:
> http://www.derailleur.org/screenshots/
> one shows some quick text when indent-mode is enabled, the other shows
> it with indent-mode disabled.
>
> anyway if you have any ideas how i might help that'd be great --
> bisecting the code is probably beyond what i can easily do but i could
> try to dig around a bit somehow.
>
> thanks - i appreciate how much effort you put into this carsten! -
>
>
> matt
>
>
> --
> Matt Price
> matt.price@utoronto.ca
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Re: org-indent-mode and visual-line-mode
2009-11-20 13:54 ` Carsten Dominik
@ 2009-11-20 15:10 ` Matt Price
0 siblings, 0 replies; 11+ messages in thread
From: Matt Price @ 2009-11-20 15:10 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 491 bytes --]
On Fri, 2009-11-20 at 14:54 +0100, Carsten Dominik wrote:
> + (aset org-indent-strings 0 nil)
> + (aset org-indent-stars 0 nil)
>
That did it! I was in the middle of writing an apologetic email
explaining that it hadn't worked in either snapshot or 23.1, but then
remembered I had to run 'make' to get the changes to apply. glad I
caught myself in time!
This is so great for me, Carsten, I'm so grateful! thanks so much,
matt
--
Matt Price
matt.price@utoronto.ca
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-11-20 15:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-18 20:07 org-indent-mode and visual-line-mode Matt Price
2009-11-19 13:17 ` Carsten Dominik
2009-11-19 15:20 ` Matt Price
2009-11-19 22:33 ` Ben Finney
2009-11-20 2:12 ` Matt Price
2009-11-20 2:17 ` Ben Finney
2009-11-20 7:28 ` Carsten Dominik
2009-11-20 13:03 ` Matt Price
2009-11-20 13:21 ` Carsten Dominik
2009-11-20 13:54 ` Carsten Dominik
2009-11-20 15:10 ` Matt Price
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).