Re: [O] Visibility cycling at end of headline

2015-04-25 Thread Nicolas Goaziou
"Charles C. Berry"  writes:

> Done.

Thank you.

Regards,



Re: [O] Visibility cycling at end of headline

2015-04-25 Thread Charles C. Berry

On Sat, 25 Apr 2015, Nicolas Goaziou wrote:


Hello,

"Charles C. Berry"  writes:


This change in org-cycle line 131 seems to have the desired effect:



[snip]


It should work indeed. Can you wrap it into an appropriate patch and
commit it?

Regards,

--
Nicolas Goaziou



Done.

Chuck



Re: [O] Visibility cycling at end of headline

2015-04-25 Thread Eric S Fraga
On Friday, 24 Apr 2015 at 10:37, Charles C. Berry wrote:

[...]

> This change in org-cycle line 131 seems to have the desired effect:

Looks good.  Thanks!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1062-gce4e64



Re: [O] Visibility cycling at end of headline

2015-04-25 Thread Nicolas Goaziou
Hello,

"Charles C. Berry"  writes:

> This change in org-cycle line 131 seems to have the desired effect:
>
> --- 128,134  Original
>
>  ;; At an item/headline: delegate to `org-cycle-internal-local'.
>  ((and (or (and org-cycle-include-plain-lists (org-at-item-p))
> !  (save-excursion (beginning-of-line 1)
>(looking-at org-outline-regexp)))
>(or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol
>   (org-cycle-internal-local))
> *** 128,134  NEW
>
>  ;; At an item/headline: delegate to `org-cycle-internal-local'.
>  ((and (or (and org-cycle-include-plain-lists (org-at-item-p))
> !  (save-excursion (move-beginning-of-line 1)
>(looking-at org-outline-regexp)))
>(or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol
>   (org-cycle-internal-local))
>
> Caveat: I've not run this thru make test.

It should work indeed. Can you wrap it into an appropriate patch and
commit it?

Regards,

-- 
Nicolas Goaziou



Re: [O] Visibility cycling at end of headline

2015-04-24 Thread Charles C. Berry

On Fri, 24 Apr 2015, Eric S Fraga wrote:


On Thursday, 23 Apr 2015 at 21:59, Nikolaus Rath wrote:

[...]


Well, obviously I meant a way to *automatically* have Tab work at the
end of the line


I also would really like tab to work at the end of a headline with
hidden text as it would anywhere else on the line.  I see no benefit
from org treating the cursor at the absolute end of the line as being
within the hidden text but maybe somebody can explain?


This change in org-cycle line 131 seems to have the desired effect:

--- 128,134  Original

 ;; At an item/headline: delegate to `org-cycle-internal-local'.
 ((and (or (and org-cycle-include-plain-lists (org-at-item-p))
!(save-excursion (beginning-of-line 1)
 (looking-at org-outline-regexp)))
 (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol
(org-cycle-internal-local))
*** 128,134  NEW

 ;; At an item/headline: delegate to `org-cycle-internal-local'.
 ((and (or (and org-cycle-include-plain-lists (org-at-item-p))
!(save-excursion (move-beginning-of-line 1)
 (looking-at org-outline-regexp)))
 (or (bolp) (not (eq org-cycle-emulate-tab 'exc-hl-bol
(org-cycle-internal-local))

Caveat: I've not run this thru make test.




Having to hit C-a first is annoying...


Agree. Less (keystrokes) is more (productivity).

HTH,

Chuck



Re: [O] Visibility cycling at end of headline

2015-04-24 Thread Eric S Fraga
On Thursday, 23 Apr 2015 at 21:59, Nikolaus Rath wrote:

[...]

> Well, obviously I meant a way to *automatically* have Tab work at the
> end of the line

I also would really like tab to work at the end of a headline with
hidden text as it would anywhere else on the line.  I see no benefit
from org treating the cursor at the absolute end of the line as being
within the hidden text but maybe somebody can explain?

Having to hit C-a first is annoying...

Thanks,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-951-g2f58e3



Re: [O] Visibility cycling at end of headline

2015-04-23 Thread Nikolaus Rath
On Apr 23 2015, Kyle Meyer  wrote:
> Nikolaus Rath  wrote:
> [...]
>> * Sample heading 1...
>> * Sample heading 2
>>
>> If the cursor is to the right of the "1" (in particular if it's at the
>> end of the line), nothing happens.
>>
>> Why is this,
>
> I think this is because point is considered to be on the hidden text,
> not the headline, so the cycling behavior does not apply.  To test this,
> run `org-element-at-point' before and after '...'.

Yes, that seems to be a problem.

>> and is there a way to change it?
>
> C-a?

Well, obviously I meant a way to *automatically* have Tab work at the
end of the line (I think redefining Tab to first call C-a would break
stuff in other situations).

Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

 »Time flies like an arrow, fruit flies like a Banana.«



Re: [O] Visibility cycling at end of headline

2015-04-23 Thread Kyle Meyer
Nikolaus Rath  wrote:
[...]
> * Sample heading 1...
> * Sample heading 2
>
> If the cursor is to the right of the "1" (in particular if it's at the
> end of the line), nothing happens.
>
> Why is this,

I think this is because point is considered to be on the hidden text,
not the headline, so the cycling behavior does not apply.  To test this,
run `org-element-at-point' before and after '...'.

> and is there a way to change it?

C-a?

--
Kyle



[O] Visibility cycling at end of headline

2015-04-23 Thread Nikolaus Rath
Hello,

When I'm trying to expand a folded headline using Tab, this seems to
work only if the cursor is before the '...', i.e. just before the "1" in
the following example:

* Sample heading 1...
* Sample heading 2

If the cursor is to the right of the "1" (in particular if it's at the
end of the line), nothing happens.

Why is this, and is there a way to change it?

Thanks,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

 »Time flies like an arrow, fruit flies like a Banana.«