emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Unable to unfold a folded block having point directly after the folded block
@ 2011-12-21 13:43 Rainer Stengele
  2012-01-02 18:53 ` Bastien
  0 siblings, 1 reply; 11+ messages in thread
From: Rainer Stengele @ 2011-12-21 13:43 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I experience an annoying behaviour:

Having

*** Headline
    :LOGBOOK:....>

- point is at the end of the headline
- moving one line down I am at the end of the LOGBOOK line

There I cannot open the folded LOGBOOK block with <TAB>.
I have to move point one character back in order to unfold it with <TAB>.
After that I can no more reach the end of this line like before, where I could not unfold with <TAB>.

Is this intended?
I would appreciate being able to unfold a block when being directly after the last character of the folded thing.
Would it make sense to be able to configure such a behaviour?

Rainer

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

* Re: Unable to unfold a folded block having point directly after the folded block
  2011-12-21 13:43 Unable to unfold a folded block having point directly after the folded block Rainer Stengele
@ 2012-01-02 18:53 ` Bastien
  2012-01-03 10:58   ` Rainer Stengele
  0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2012-01-02 18:53 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: emacs-orgmode

Hi Rainer,

Rainer Stengele <rainer.stengele@online.de> writes:

> Having
>
> *** Headline
>     :LOGBOOK:....>
>
> - point is at the end of the headline
> - moving one line down I am at the end of the LOGBOOK line
>
> There I cannot open the folded LOGBOOK block with <TAB>.
> I have to move point one character back in order to unfold it with <TAB>.
> After that I can no more reach the end of this line like before, where I could not unfold with <TAB>.
>
> Is this intended?

No.  This is fixed now.

Thanks,

-- 
 Bastien

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

* Re: Unable to unfold a folded block having point directly after the folded block
  2012-01-02 18:53 ` Bastien
@ 2012-01-03 10:58   ` Rainer Stengele
  2012-01-04 10:27     ` Bastien
  0 siblings, 1 reply; 11+ messages in thread
From: Rainer Stengele @ 2012-01-03 10:58 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Am 02.01.2012 19:53, schrieb Bastien:
> Hi Rainer,
>
> Rainer Stengele<rainer.stengele@online.de>  writes:
>
>> Having
>>
>> *** Headline
>>      :LOGBOOK:....>
>>
>> - point is at the end of the headline
>> - moving one line down I am at the end of the LOGBOOK line
>>
>> There I cannot open the folded LOGBOOK block with<TAB>.
>> I have to move point one character back in order to unfold it with<TAB>.
>> After that I can no more reach the end of this line like before, where I could not unfold with<TAB>.
>>
>> Is this intended?
> No.  This is fixed now.
>
> Thanks,
>
Hi Bastien,

I just pulled and checked but cannot see a change.
Did you check in the fix already?

Thanks!

Rainer

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

* Re: Unable to unfold a folded block having point directly after the folded block
  2012-01-03 10:58   ` Rainer Stengele
@ 2012-01-04 10:27     ` Bastien
  2012-01-10  8:52       ` Rainer Stengele
  0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2012-01-04 10:27 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: emacs-orgmode

Hi Rainer,

Rainer Stengele <rainer.stengele@online.de> writes:

> I just pulled and checked but cannot see a change.
> Did you check in the fix already?

Yes I did.

Try with 

  (setq org-special-ctrl-a/e nil)

C-e goes *after* the end of the invisible region and TAB will do nothing
here, either in a folded subtree or in a folded drawer.

With

  (setq org-special-ctrl-a/e 'reversed)

C-e goes *right before* the end of the invisible region and TAB will
unfold as expected, both in a folded subtree or in a folded drawer.

This behavior is more consistent than the previous one.  But you need 
to set `org-special-ctrl-a/e' according to your needs.

HTH,

-- 
 Bastien

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

* Re: Unable to unfold a folded block having point directly after the folded block
  2012-01-04 10:27     ` Bastien
@ 2012-01-10  8:52       ` Rainer Stengele
  2023-07-20  8:37         ` Vlastimil Vondra
  0 siblings, 1 reply; 11+ messages in thread
From: Rainer Stengele @ 2012-01-10  8:52 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Am 04.01.2012 11:27, schrieb Bastien:
> Hi Rainer,
> 
> Rainer Stengele <rainer.stengele@online.de> writes:
> 
>> I just pulled and checked but cannot see a change.
>> Did you check in the fix already?
> 
> Yes I did.
> 
> Try with 
> 
>   (setq org-special-ctrl-a/e nil)
> 
> C-e goes *after* the end of the invisible region and TAB will do nothing
> here, either in a folded subtree or in a folded drawer.
> 
> With
> 
>   (setq org-special-ctrl-a/e 'reversed)
> 
> C-e goes *right before* the end of the invisible region and TAB will
> unfold as expected, both in a folded subtree or in a folded drawer.
> 
> This behavior is more consistent than the previous one.  But you need 
> to set `org-special-ctrl-a/e' according to your needs.
> 
> HTH,
> 
Hi Bastien and Carsten,

I do have
(setq org-special-ctrl-a/e 'reversed)
and it works as expected when jumping to the end of line with C-e.
But I do use cursor keys to move one line down.
Point at end of line and moving down one line with cursor down I cannot unfold the block by pressing TAB.
Is there a chance to get this done when using the cursor movement?

Thanks,
Rainer

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

* Re: Unable to unfold a folded block having point directly after the folded block
  2012-01-10  8:52       ` Rainer Stengele
@ 2023-07-20  8:37         ` Vlastimil Vondra
  2023-07-20  8:46           ` Ihor Radchenko
  0 siblings, 1 reply; 11+ messages in thread
From: Vlastimil Vondra @ 2023-07-20  8:37 UTC (permalink / raw)
  To: rainer.stengele; +Cc: bzg, emacs-orgmode

Hi all,

I solved it by using "(org-end-of-line)" before "(org-cycle)"

(defun my/org-cycle (&optional arg)
   "adjust org-cycle"
   (interactive "P")
   (org-end-of-line)
   (org-cycle arg)
   )

I hope it could be useful to somebody.

Best regards,

Vlastimil Vondra



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

* Re: Unable to unfold a folded block having point directly after the folded block
  2023-07-20  8:37         ` Vlastimil Vondra
@ 2023-07-20  8:46           ` Ihor Radchenko
       [not found]             ` <CACjq+cw3wMsyF=W-hPGYBkN_P9Ng5k96Ufk0J-9QRn6-+h16og@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Ihor Radchenko @ 2023-07-20  8:46 UTC (permalink / raw)
  To: Vlastimil Vondra; +Cc: rainer.stengele, bzg, emacs-orgmode

Vlastimil Vondra <vlastimil.vondra@gmail.com> writes:

> Unable to unfold a folded block having point directly after the folded block

I tried to reproduce the problem and I cannot.

May you please provide more details?
See https://orgmode.org/manual/Feedback.html#Feedback

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Unable to unfold a folded block having point directly after the folded block
       [not found]             ` <CACjq+cw3wMsyF=W-hPGYBkN_P9Ng5k96Ufk0J-9QRn6-+h16og@mail.gmail.com>
@ 2023-07-20  9:20               ` Ihor Radchenko
  2023-07-20  9:37                 ` Vlastimil Vondra
  0 siblings, 1 reply; 11+ messages in thread
From: Ihor Radchenko @ 2023-07-20  9:20 UTC (permalink / raw)
  To: Vlastimil Vondra; +Cc: emacs-orgmode

[ Adding Org mailing list back to CC ]

Vlastimil Vondra <vlastimil.vondra@gmail.com> writes:

> Sorry, I think I've sent the reply in wrong manner. I was trying to reply
> to this conversation https://list.orgmode.org/87ty4b7ofr.fsf@gnu.org/t/
> where Reiner wrote that he is not able to unfold tree if folded and at the
> end of line. You can get there if you are on line longer then previous,
> then up arrow and now you are not able to unfold. I've created function,
> which will first set cursor to end-of-line by function and then calling
> org-cycle which is then working.

You are replying to a thread that is 10 years old. That problem
discussed in the thread has been fixed in Org 9.4.4 or earlier (for
drawers).

> I'm sending video, so it is more obvious.

In the video, the situation is with folded headings of different length:

* asd
alskdj
* Headingalksjdlaskdj
alskdj

If everything is folded:

* asd...
* Headingalksjdlaskdj<point>...

Pressing C-p will yield

* asd...<point> <-- note <point> after ...
* Headingalksjdlaskdj...

Then, <TAB> will indeed not unfold, before the point is not actually on
heading.
This situation is one of the edge cases with point adjustment in Emacs.

The workaround is simple - M-x org-reveal (C-c C-r).
org-reveal generally works any time the cursor is stuck in the middle of
invisible text.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Unable to unfold a folded block having point directly after the folded block
  2023-07-20  9:20               ` Ihor Radchenko
@ 2023-07-20  9:37                 ` Vlastimil Vondra
  2023-07-20 22:04                   ` Evgenii Klimov
  2023-07-21  7:30                   ` Ihor Radchenko
  0 siblings, 2 replies; 11+ messages in thread
From: Vlastimil Vondra @ 2023-07-20  9:37 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2117 bytes --]

Perfect, org-reveal is working as well, haven't known about that! But it
would be good that org-reveal is called automatically before org-cycle,
because when going through the task list, I'm just expanding by tab. It is
not really convenient to use tab and when reaching error (or no unfold)
then hitting C-c C-r. Maybe it's just me.

Anyway thanks for letting me know.

BR,
Vlastimil

On Thu, 20 Jul 2023 at 11:20, Ihor Radchenko <yantar92@posteo.net> wrote:

> [ Adding Org mailing list back to CC ]
>
> Vlastimil Vondra <vlastimil.vondra@gmail.com> writes:
>
> > Sorry, I think I've sent the reply in wrong manner. I was trying to reply
> > to this conversation https://list.orgmode.org/87ty4b7ofr.fsf@gnu.org/t/
> > where Reiner wrote that he is not able to unfold tree if folded and at
> the
> > end of line. You can get there if you are on line longer then previous,
> > then up arrow and now you are not able to unfold. I've created function,
> > which will first set cursor to end-of-line by function and then calling
> > org-cycle which is then working.
>
> You are replying to a thread that is 10 years old. That problem
> discussed in the thread has been fixed in Org 9.4.4 or earlier (for
> drawers).
>
> > I'm sending video, so it is more obvious.
>
> In the video, the situation is with folded headings of different length:
>
> * asd
> alskdj
> * Headingalksjdlaskdj
> alskdj
>
> If everything is folded:
>
> * asd...
> * Headingalksjdlaskdj<point>...
>
> Pressing C-p will yield
>
> * asd...<point> <-- note <point> after ...
> * Headingalksjdlaskdj...
>
> Then, <TAB> will indeed not unfold, before the point is not actually on
> heading.
> This situation is one of the edge cases with point adjustment in Emacs.
>
> The workaround is simple - M-x org-reveal (C-c C-r).
> org-reveal generally works any time the cursor is stuck in the middle of
> invisible text.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>

[-- Attachment #2: Type: text/html, Size: 3115 bytes --]

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

* Re: Unable to unfold a folded block having point directly after the folded block
  2023-07-20  9:37                 ` Vlastimil Vondra
@ 2023-07-20 22:04                   ` Evgenii Klimov
  2023-07-21  7:30                   ` Ihor Radchenko
  1 sibling, 0 replies; 11+ messages in thread
From: Evgenii Klimov @ 2023-07-20 22:04 UTC (permalink / raw)
  To: Vlastimil Vondra; +Cc: emacs-orgmode


Hi

Vlastimil Vondra <vlastimil.vondra@gmail.com> writes:

> Perfect, org-reveal is working as well, haven't known about that! But it would be good that org-reveal is called automatically before org-cycle, because when
> going through the task list, I'm just expanding by tab. It is not really convenient to use tab and when reaching error (or no unfold) then hitting C-c C-r.
> Maybe it's just me.
[...]

Can't you move the point at the beginning of the line before starting to
expand by tab? That way =org-speed-commands= will be available for you
and moving/expanding will be even faster.


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

* Re: Unable to unfold a folded block having point directly after the folded block
  2023-07-20  9:37                 ` Vlastimil Vondra
  2023-07-20 22:04                   ` Evgenii Klimov
@ 2023-07-21  7:30                   ` Ihor Radchenko
  1 sibling, 0 replies; 11+ messages in thread
From: Ihor Radchenko @ 2023-07-21  7:30 UTC (permalink / raw)
  To: Vlastimil Vondra; +Cc: emacs-orgmode

Vlastimil Vondra <vlastimil.vondra@gmail.com> writes:

> Perfect, org-reveal is working as well, haven't known about that! But it
> would be good that org-reveal is called automatically before org-cycle,
> because when going through the task list, I'm just expanding by tab. It is
> not really convenient to use tab and when reaching error (or no unfold)
> then hitting C-c C-r. Maybe it's just me.

Try to customize `org-cycle-emulate-tab'. That way, `org-cycle' will try
to reveal current heading in more places instead of attempting to
perform indentation.

I do not think that calling org-reveal before org-cycle is a good idea -
it may lead to unexpected results depending on
`org-fold-show-context-detail'.

You can also create your own custom `personal/org-cycle' command that
will (1) call `org-reveal' (2) call `org-cycle'.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2023-07-21  7:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 13:43 Unable to unfold a folded block having point directly after the folded block Rainer Stengele
2012-01-02 18:53 ` Bastien
2012-01-03 10:58   ` Rainer Stengele
2012-01-04 10:27     ` Bastien
2012-01-10  8:52       ` Rainer Stengele
2023-07-20  8:37         ` Vlastimil Vondra
2023-07-20  8:46           ` Ihor Radchenko
     [not found]             ` <CACjq+cw3wMsyF=W-hPGYBkN_P9Ng5k96Ufk0J-9QRn6-+h16og@mail.gmail.com>
2023-07-20  9:20               ` Ihor Radchenko
2023-07-20  9:37                 ` Vlastimil Vondra
2023-07-20 22:04                   ` Evgenii Klimov
2023-07-21  7:30                   ` Ihor Radchenko

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