emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Visibility cycling at end of headline
@ 2015-04-24  2:23 Nikolaus Rath
  2015-04-24  2:35 ` Kyle Meyer
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolaus Rath @ 2015-04-24  2:23 UTC (permalink / raw)
  To: emacs-orgmode

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.«

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Visibility cycling at end of headline
  2015-04-24  2:23 Visibility cycling at end of headline Nikolaus Rath
@ 2015-04-24  2:35 ` Kyle Meyer
  2015-04-24  4:59   ` Nikolaus Rath
  0 siblings, 1 reply; 9+ messages in thread
From: Kyle Meyer @ 2015-04-24  2:35 UTC (permalink / raw)
  To: emacs-orgmode

Nikolaus Rath <Nikolaus@rath.org> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Visibility cycling at end of headline
  2015-04-24  2:35 ` Kyle Meyer
@ 2015-04-24  4:59   ` Nikolaus Rath
  2015-04-24  7:34     ` Eric S Fraga
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolaus Rath @ 2015-04-24  4:59 UTC (permalink / raw)
  To: emacs-orgmode

On Apr 23 2015, Kyle Meyer <kyle@kyleam.com> wrote:
> Nikolaus Rath <Nikolaus@rath.org> 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.«

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Visibility cycling at end of headline
  2015-04-24  4:59   ` Nikolaus Rath
@ 2015-04-24  7:34     ` Eric S Fraga
  2015-04-24 17:37       ` Charles C. Berry
  0 siblings, 1 reply; 9+ messages in thread
From: Eric S Fraga @ 2015-04-24  7:34 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Visibility cycling at end of headline
  2015-04-24  7:34     ` Eric S Fraga
@ 2015-04-24 17:37       ` Charles C. Berry
  2015-04-25  7:13         ` Nicolas Goaziou
  2015-04-25  9:06         ` Eric S Fraga
  0 siblings, 2 replies; 9+ messages in thread
From: Charles C. Berry @ 2015-04-24 17:37 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Visibility cycling at end of headline
  2015-04-24 17:37       ` Charles C. Berry
@ 2015-04-25  7:13         ` Nicolas Goaziou
  2015-04-25 18:28           ` Charles C. Berry
  2015-04-25  9:06         ` Eric S Fraga
  1 sibling, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2015-04-25  7:13 UTC (permalink / raw)
  To: Charles C. Berry; +Cc: emacs-orgmode

Hello,

"Charles C. Berry" <ccberry@ucsd.edu> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Visibility cycling at end of headline
  2015-04-24 17:37       ` Charles C. Berry
  2015-04-25  7:13         ` Nicolas Goaziou
@ 2015-04-25  9:06         ` Eric S Fraga
  1 sibling, 0 replies; 9+ messages in thread
From: Eric S Fraga @ 2015-04-25  9:06 UTC (permalink / raw)
  To: Charles C. Berry; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Visibility cycling at end of headline
  2015-04-25  7:13         ` Nicolas Goaziou
@ 2015-04-25 18:28           ` Charles C. Berry
  2015-04-25 22:11             ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Charles C. Berry @ 2015-04-25 18:28 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On Sat, 25 Apr 2015, Nicolas Goaziou wrote:

> Hello,
>
> "Charles C. Berry" <ccberry@ucsd.edu> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Visibility cycling at end of headline
  2015-04-25 18:28           ` Charles C. Berry
@ 2015-04-25 22:11             ` Nicolas Goaziou
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2015-04-25 22:11 UTC (permalink / raw)
  To: Charles C. Berry; +Cc: emacs-orgmode

"Charles C. Berry" <ccberry@ucsd.edu> writes:

> Done.

Thank you.

Regards,

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-25 22:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-24  2:23 Visibility cycling at end of headline Nikolaus Rath
2015-04-24  2:35 ` Kyle Meyer
2015-04-24  4:59   ` Nikolaus Rath
2015-04-24  7:34     ` Eric S Fraga
2015-04-24 17:37       ` Charles C. Berry
2015-04-25  7:13         ` Nicolas Goaziou
2015-04-25 18:28           ` Charles C. Berry
2015-04-25 22:11             ` Nicolas Goaziou
2015-04-25  9:06         ` Eric S Fraga

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).