Re: [O] org-yank improvement?

2012-04-12 Thread Thorsten
Bastien b...@gnu.org writes:

Hi Bastien,

 Thorsten quintf...@googlemail.com writes:

 Memnon Anon gegendosenflei...@googlemail.com writes:

 pin...@iro.umontreal.ca (François Pinard) writes:

 However, by mistake, it happens that the cursor is on the only visible
 bullet star of the next heading  instead of really being at the start
 of the line. 

 I recently edited some org files in clean mode for the first time (It
 might be the default mode on Worg?) and was surprised and a bit confused
 that my cursor(point) was invisible when on the invisible bullet stars
 at the beginning of the line. 
 I had to move point to the (only) visible bullet star on the line to find out
 where I am in the buffer. Maybe only a peculiarity of my color-settings,
 but nevertheless convincing me not to use clean mode. 

 Then we should fix org-indent.el accordingly.

 (Please avoid Clean mode as a way to refer to org-indent, it suggests
 other views are not clean!  Maybe the doc should be updated wrt this.)

 I must confess I'm not a user of org-indent.  I have been testing it a
 few times and always had the feeling it goes against Org's What You See
 is What You Have core principle.  But let's fix bugs in it anyway.

It might not really be a bug. I just double-checked in both my console
and my X11 session, and the symptom only appears in the console session
(overlays not visible?). 

So, on a user level, the solution might be to activate org-indent-mode
conditional of the display type, something like this:

,---
| (defun my-org-indent-conditional-activation-function ()
| Activates org-indent-mode conditional on the display type.
| (if (display-graphic-p)
|   (setq org-indent-mode t)))
`---

If Emacs is used 'the standard way', call this function once in your
.emacs should suffice. When using one Emacs daemon with many Emacsclients
in console as well as X11 sessions (as I do), this function should be
added to the server-visit-hook, so each emacsclient acts conditional on
the display-type of his session. 

-- 
cheers,
Thorsten



Re: [O] org-yank improvement?

2012-04-12 Thread Thorsten
Bastien b...@altern.org writes:

 Bernt Hansen be...@norang.ca writes:

 Carsten Dominik carsten.domi...@gmail.com writes:

 On 11.4.2012, at 08:38, Bastien wrote:

 I must confess I'm not a user of org-indent.  I have been testing it a
 few times and always had the feeling it goes against Org's What
 You See
 is What You Have core principle.  But let's fix bugs in it anyway.

 For what it is worth, I constantly use it.

 - Carsten

 Me too! 

 Okay -- a great relief to know I can count on Carsten and you 
 to help solve possible issues there!

I just posted a proposal how to activate org-indent conditional on the
sessions display-type, since the irritating behaviour I had only happens
in a console session, so I guess some overlays involved are only visible
in X11. 

i must admit I never used org-indent since I prefer book-like headlines,
I only had the problem of an unvisible cursor when editing Worg pages
(probably in a console session without being aware of that fact). 

-- 
cheers,
Thorsten



Re: [O] org-yank improvement?

2012-04-12 Thread Nicolas Goaziou
Hello,

Thorsten quintf...@googlemail.com writes:

 I just posted a proposal how to activate org-indent conditional on the
 sessions display-type, since the irritating behaviour I had only happens
 in a console session, so I guess some overlays involved are only visible
 in X11.

There are no overlays involved in Org Indent mode.

You may want to customize `org-indent-mode-turns-on-hiding-stars' (or
use #+STARTUP: showstars) instead of completely disabling org-indent for
console sessions.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-yank improvement?

2012-04-12 Thread Thorsten
Nicolas Goaziou n.goaz...@gmail.com writes:

Hello,

 Thorsten quintf...@googlemail.com writes:

 I just posted a proposal how to activate org-indent conditional on the
 sessions display-type, since the irritating behaviour I had only happens
 in a console session, so I guess some overlays involved are only visible
 in X11.

 There are no overlays involved in Org Indent mode.

 You may want to customize `org-indent-mode-turns-on-hiding-stars' (or
 use #+STARTUP: showstars) instead of completely disabling org-indent for
 console sessions.

Actually, the stars are hidden with this function from org-faces.el, it
seems:

,
| (defface org-hide
|   'background light)) (:foreground white))
| (((background dark)) (:foreground black)))
|   Face used to hide leading stars in headlines.
| The foreground color of this face should be equal to the background
| color of the frame.
|   :group 'org-faces)
`

so the whole issue might be the following:

when using Emacs on the console (at least in my case), the default
colors (-fg black -bg white) are reverted on the display, i.e. the
background is shown black and the (foreground-)text white. Thats exactly
what I want.

To achieve the same in an X11 session, I added a function
to the server-visit-hook that changes -bg to black and -fg to wheat
when emacsclient visits a server file. 

Now what is happening when I open a org-mode buffer in a console
session?

I see a blinking white underscore as cursor/point on a black background.
When I move it over a hidden star, point becomes invisible.  
(background-color-at-point) gives nil.
(foreground-color-at-point) gives 'black' instead of nil like in the
other parts of the buffer, and the black cursor on a black background
becomes invisible. 

In an X11 session, with point on hidden stars, the hidden star becomes
visible again instead, together with the cursor. 
What is the mechanism responsable for that?


-- 
cheers,
Thorsten




Re: [O] org-yank improvement?

2012-04-11 Thread Bastien
Hi François,

pin...@iro.umontreal.ca (François Pinard) writes:

 pin...@iro.umontreal.ca (François Pinard) writes:

 [...] so what I usually do is position the cursor at
 the beginning of the /next/ heading and yank the list item there.   [...]
 However, by mistake, it happens that the cursor is on the only visible
 bullet star of the next heading (I'm using org-indent-mode
 instead of really being at the start of the line.

 It never really make sense, in my opinion, to yank in the middle of an
 invisible string.  Luckily enough, yanking is done through a special
 org-yank function, so it is at least theoretically possible to prevent
 this.  My suggestion would be that whenever yanking into a start string,
 that the yanking really occurs at the beginning of it.

 While revising old email, I'm stumbling on this, and just got a small
 idea.  I do not know if it would work.  While playing with the
 visibility of the stars, maybe that the text between the beginning of
 the line up to the last and only visible star in a header could be given
 the intangible attribute.  I did not play with this in a very long
 while, but if I remember well, this would prevent inserting in the
 middle of this region.

If you play with this idea, make sure basic commands like `org-demote'
are still working.

-- 
 Bastien



Re: [O] org-yank improvement?

2012-04-11 Thread Bastien
Hi Thorsten,

Thorsten quintf...@googlemail.com writes:

 Memnon Anon gegendosenflei...@googlemail.com writes:

 pin...@iro.umontreal.ca (François Pinard) writes:

 However, by mistake, it happens that the cursor is on the only visible
 bullet star of the next heading  instead of really being at the start
 of the line. 

 I recently edited some org files in clean mode for the first time (It
 might be the default mode on Worg?) and was surprised and a bit confused
 that my cursor(point) was invisible when on the invisible bullet stars
 at the beginning of the line. 
 I had to move point to the (only) visible bullet star on the line to find out
 where I am in the buffer. Maybe only a peculiarity of my color-settings,
 but nevertheless convincing me not to use clean mode. 

Then we should fix org-indent.el accordingly.

(Please avoid Clean mode as a way to refer to org-indent, it suggests
other views are not clean!  Maybe the doc should be updated wrt this.)

I must confess I'm not a user of org-indent.  I have been testing it a
few times and always had the feeling it goes against Org's What You See
is What You Have core principle.  But let's fix bugs in it anyway.

Thanks,

-- 
 Bastien



Re: [O] org-yank improvement?

2012-04-11 Thread Carsten Dominik

On 11.4.2012, at 08:38, Bastien wrote:

 Hi Thorsten,
 
 Thorsten quintf...@googlemail.com writes:
 
 Memnon Anon gegendosenflei...@googlemail.com writes:
 
 pin...@iro.umontreal.ca (François Pinard) writes:
 
 However, by mistake, it happens that the cursor is on the only visible
 bullet star of the next heading  instead of really being at the start
 of the line. 
 
 I recently edited some org files in clean mode for the first time (It
 might be the default mode on Worg?) and was surprised and a bit confused
 that my cursor(point) was invisible when on the invisible bullet stars
 at the beginning of the line. 
 I had to move point to the (only) visible bullet star on the line to find out
 where I am in the buffer. Maybe only a peculiarity of my color-settings,
 but nevertheless convincing me not to use clean mode. 
 
 Then we should fix org-indent.el accordingly.
 
 (Please avoid Clean mode as a way to refer to org-indent, it suggests
 other views are not clean!  Maybe the doc should be updated wrt this.)
 
 I must confess I'm not a user of org-indent.  I have been testing it a
 few times and always had the feeling it goes against Org's What You See
 is What You Have core principle.  But let's fix bugs in it anyway.

For what it is worth, I constantly use it.

- Carsten

 
 Thanks,
 
 -- 
 Bastien
 




Re: [O] org-yank improvement?

2012-04-11 Thread Bernt Hansen
Carsten Dominik carsten.domi...@gmail.com writes:

 On 11.4.2012, at 08:38, Bastien wrote:

 I must confess I'm not a user of org-indent.  I have been testing it a
 few times and always had the feeling it goes against Org's What You See
 is What You Have core principle.  But let's fix bugs in it anyway.

 For what it is worth, I constantly use it.

 - Carsten

Me too! 

-Bernt



Re: [O] org-yank improvement?

2012-04-11 Thread Bastien
Bernt Hansen be...@norang.ca writes:

 Carsten Dominik carsten.domi...@gmail.com writes:

 On 11.4.2012, at 08:38, Bastien wrote:

 I must confess I'm not a user of org-indent.  I have been testing it a
 few times and always had the feeling it goes against Org's What You See
 is What You Have core principle.  But let's fix bugs in it anyway.

 For what it is worth, I constantly use it.

 - Carsten

 Me too! 

Okay -- a great relief to know I can count on Carsten and you 
to help solve possible issues there!

-- 
 Bastien



Re: [O] org-yank improvement?

2012-04-10 Thread François Pinard
Memnon Anon gegendosenflei...@googlemail.com writes:

 pin...@iro.umontreal.ca (François Pinard) writes:

 I often cut a list item (or a hierarchy of list items) to reinsert it
 into another heading which I know contains only list items.  All the
 headings are collapsed, so what I usually do is position the cursor at
 the beginning of the /next/ heading and yank the list item there, this
 has the effect of inserting it at the end of the previous heading, no
 need to open it.

 Mhh, why don't you just insert a newline above the next heading and yank
 then? 

Hi, Memnon :-).

Because it would induce a spurious white line.

 However, by mistake, it happens that the cursor is on the only visible
 bullet star of the next heading  instead of really being at the start
 of the line. 

 I wonder how you end up between two stars in the first place...

Usually through Emacs C-n.

 Of course, it is my error.  Yet, Org mode could be friendlier, here!

 Lets say 'safer'.

Safer *is* friendlier :-).

 But while ... indicating folded content at the end
 of a line is an integral part of org, things like org-hide-leading-stars
 seemed to me always to be purely cosmetic.  Nice to have, but if one
 really edits org files by hand (it is all plain text, right),
 potentially a problem.

Agreed that it's all plain text.  Yet, this is Emacs, and Org mode is
a very powerful mode, from which people may expect a lot.

François



Re: [O] org-yank improvement?

2012-04-10 Thread François Pinard
pin...@iro.umontreal.ca (François Pinard) writes:

 [...] so what I usually do is position the cursor at
 the beginning of the /next/ heading and yank the list item there.   [...]
 However, by mistake, it happens that the cursor is on the only visible
 bullet star of the next heading (I'm using org-indent-mode
 instead of really being at the start of the line.

 It never really make sense, in my opinion, to yank in the middle of an
 invisible string.  Luckily enough, yanking is done through a special
 org-yank function, so it is at least theoretically possible to prevent
 this.  My suggestion would be that whenever yanking into a start string,
 that the yanking really occurs at the beginning of it.

While revising old email, I'm stumbling on this, and just got a small
idea.  I do not know if it would work.  While playing with the
visibility of the stars, maybe that the text between the beginning of
the line up to the last and only visible star in a header could be given
the intangible attribute.  I did not play with this in a very long
while, but if I remember well, this would prevent inserting in the
middle of this region.

François



Re: [O] org-yank improvement?

2012-03-04 Thread François Pinard
François Pinard sadly writes:

 It never really make sense [...] whenever yanking into a start string
 [...]

Well, I should learn to re-read me better...

  s/make sense/makes sense/
  s/a start string/a star string/

Gentle readers, I invite you to email me (privately) when I err so
blatantly, and help me improve! :-)

François



Re: [O] org-yank improvement?

2012-03-04 Thread Memnon Anon
pin...@iro.umontreal.ca (François Pinard) writes:

 I often cut a list item (or a hierarchy of list items) to reinsert it
 into another heading which I know contains only list items.  All the
 headings are collapsed, so what I usually do is position the cursor at
 the beginning of the /next/ heading and yank the list item there, this
 has the effect of inserting it at the end of the previous heading, no
 need to open it.

Mhh, why don't you just insert a newline above the next heading and yank
then? 

 (I'm using clean mode, as probably everybody does!)

No.

 However, by mistake, it happens that the cursor is on the only visible
 bullet star of the next heading  instead of really being at the start
 of the line. 

I wonder how you end up between two stars in the first place...
With `org-special-ctrl-a/e' t, I would not expect this to be an issue.
But as indicated above, I don't use clean mode aka org-indent-mode.

 Of course, it is my error.  Yet, Org mode could be friendlier, here!

Lets say 'safer'. But while ... indicating folded content at the end
of a line is an integral part of org, things like org-hide-leading-stars
seemed to me always to be purely cosmetic. Nice to have, but if one
really edits org files by hand (it is all plain text, right),
potentially a problem.

Memnon




Re: [O] org-yank improvement?

2012-03-04 Thread Thorsten
Memnon Anon gegendosenflei...@googlemail.com writes:

 pin...@iro.umontreal.ca (François Pinard) writes:

 However, by mistake, it happens that the cursor is on the only visible
 bullet star of the next heading  instead of really being at the start
 of the line. 

I recently edited some org files in clean mode for the first time (It
might be the default mode on Worg?) and was surprised and a bit confused
that my cursor(point) was invisible when on the invisible bullet stars
at the beginning of the line. 
I had to move point to the (only) visible bullet star on the line to find out
where I am in the buffer. Maybe only a peculiarity of my color-settings,
but nevertheless convincing me not to use clean mode. 

-- 
cheers,
Thorsten




Re: [O] org-yank improvement?

2012-03-04 Thread Bernt Hansen
Memnon Anon gegendosenflei...@googlemail.com writes:

 pin...@iro.umontreal.ca (François Pinard) writes:

 (I'm using clean mode, as probably everybody does!)

 No.

What's this 'clean mode' you're taking about?  I can't find any
reference to that on worg.

-Bernt



Re: [O] org-yank improvement?

2012-03-04 Thread Memnon Anon
Bernt Hansen be...@norang.ca writes:

 (I'm using clean mode, as probably everybody does!)
 No.
 What's this 'clean mode' you're taking about?  I can't find any
 reference to that on worg.

,[ (info (org)Clean view) ]
| 15.8 A cleaner outline view
| ===
| 
| Some people find it noisy and distracting that the Org headlines start
| with a potentially large number of stars, and that text below the
| headlines is not indented.  While this is no problem when writing a
| _book-like_ document where the outline headings are really section
| headings, in a more _list-oriented_ outline, indented structure is a
| lot cleaner:
`

Memnon



Re: [O] org-yank improvement?

2012-03-04 Thread Bernt Hansen
Memnon Anon gegendosenflei...@googlemail.com writes:

 Bernt Hansen be...@norang.ca writes:

 (I'm using clean mode, as probably everybody does!)
 No.
 What's this 'clean mode' you're taking about?  I can't find any
 reference to that on worg.

 ,[ (info (org)Clean view) ]
 | 15.8 A cleaner outline view
 | ===
 | 
 | Some people find it noisy and distracting that the Org headlines start
 | with a potentially large number of stars, and that text below the
 | headlines is not indented.  While this is no problem when writing a
 | _book-like_ document where the outline headings are really section
 | headings, in a more _list-oriented_ outline, indented structure is a
 | lot cleaner:
 `

Ah org-indent-mode :)

Thanks,
Bernt