all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-show-context-detail and tree expansion
@ 2019-03-26 20:01 pinkanon pinkanon
  2019-03-27 14:29 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: pinkanon pinkanon @ 2019-03-26 20:01 UTC (permalink / raw)
  To: emacs-orgmode

Hi! I use helm, which can list all headings using helm-org-in-buffer-headings, 
and lets you choose one to jump to.
When I jump to a heading, the tree is expanded.

My problem is as follows. 

When I expand this tree on "(2) Downers" (when it is collapsed):

* (1) Uppers
** (2) Downers
   screamers
*** laughers
    ...and also a quart of tequila
** (3) a quart of rum,
   a case of Budweiser,
** (4) a pint of raw ether and two dozen amyls.

I get:

* (1) Uppers
** (2) Downers
   screamers
...
** (3) a quart of rum,...
** (4) a pint of raw ether and two dozen amyls....

Instead of:

* (1) Uppers
** (2) Downers
   screamers
*** laughers...
** (3) a quart of rum,...
** (4) a pint of raw ether and two dozen amyls.


I was advised to modify 'org-show-context-detail, as helm uses org-show-context function.
But none of the possible values fixed the behaviour for me.
I used 'canonical for the example above:
(setf (alist-get 'default org-show-context-detail) 'canonical)

Is there a workaround?

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

* Re: org-show-context-detail and tree expansion
  2019-03-26 20:01 org-show-context-detail and tree expansion pinkanon pinkanon
@ 2019-03-27 14:29 ` Nicolas Goaziou
  2019-03-27 17:10   ` pinkanon pinkanon
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2019-03-27 14:29 UTC (permalink / raw)
  To: pinkanon pinkanon; +Cc: emacs-orgmode

Hello,

pinkanon pinkanon <pinkanon.pinkanon@yandex.ru> writes:

> Hi! I use helm, which can list all headings using helm-org-in-buffer-headings, 
> and lets you choose one to jump to.
> When I jump to a heading, the tree is expanded.
>
> My problem is as follows. 
>
> When I expand this tree on "(2) Downers" (when it is collapsed):
>
> * (1) Uppers
> ** (2) Downers
>    screamers
> *** laughers
>     ...and also a quart of tequila
> ** (3) a quart of rum,
>    a case of Budweiser,
> ** (4) a pint of raw ether and two dozen amyls.
>
> I get:
>
> * (1) Uppers
> ** (2) Downers
>    screamers
> ...
> ** (3) a quart of rum,...
> ** (4) a pint of raw ether and two dozen amyls....
>
> Instead of:
>
> * (1) Uppers
> ** (2) Downers
>    screamers
> *** laughers...
> ** (3) a quart of rum,...
> ** (4) a pint of raw ether and two dozen amyls.
>
>
> I was advised to modify 'org-show-context-detail, as helm uses org-show-context function.
> But none of the possible values fixed the behaviour for me.
> I used 'canonical for the example above:
> (setf (alist-get 'default org-show-context-detail) 'canonical)

You may want to debug `org-show-set-visibility' first. If it gives no
clue, you may want to report it to Helm.

Regards,

-- 
Nicolas Goaziou

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

* Re: org-show-context-detail and tree expansion
  2019-03-27 14:29 ` Nicolas Goaziou
@ 2019-03-27 17:10   ` pinkanon pinkanon
  0 siblings, 0 replies; 3+ messages in thread
From: pinkanon pinkanon @ 2019-03-27 17:10 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode@gnu.org

OK, problem found.

The helm code is this:

(defun helm-org-goto-marker (marker)
  (switch-to-buffer (marker-buffer marker))
  (goto-char (marker-position marker))
  (org-show-context)
  (re-search-backward "^\\*+ " nil t)
  (org-show-entry))

So, org-show-entry is called and it results in ellipsis instead of children.

> org-show-entry
> Show the body directly following this heading.
> Show the heading too, if it is currently invisible.

Fair to say, it does what it says.

I will go w/ custom a function which uses org-cycle for now,
though the helm implementation would probably be better off
having some general org-show function which works like org-show-context
(i.e. refers to some list of customizable defaults + takes an argument)
 but for headings. Is there such function?


27.03.2019, 16:29, "Nicolas Goaziou" <mail@nicolasgoaziou.fr>:
> Hello,
>
> pinkanon pinkanon <pinkanon.pinkanon@yandex.ru> writes:
>
>>  Hi! I use helm, which can list all headings using helm-org-in-buffer-headings,
>>  and lets you choose one to jump to.
>>  When I jump to a heading, the tree is expanded.
>>
>>  My problem is as follows.
>>
>>  When I expand this tree on "(2) Downers" (when it is collapsed):
>>
>>  * (1) Uppers
>>  ** (2) Downers
>>     screamers
>>  *** laughers
>>      ...and also a quart of tequila
>>  ** (3) a quart of rum,
>>     a case of Budweiser,
>>  ** (4) a pint of raw ether and two dozen amyls.
>>
>>  I get:
>>
>>  * (1) Uppers
>>  ** (2) Downers
>>     screamers
>>  ...
>>  ** (3) a quart of rum,...
>>  ** (4) a pint of raw ether and two dozen amyls....
>>
>>  Instead of:
>>
>>  * (1) Uppers
>>  ** (2) Downers
>>     screamers
>>  *** laughers...
>>  ** (3) a quart of rum,...
>>  ** (4) a pint of raw ether and two dozen amyls.
>>
>>  I was advised to modify 'org-show-context-detail, as helm uses org-show-context function.
>>  But none of the possible values fixed the behaviour for me.
>>  I used 'canonical for the example above:
>>  (setf (alist-get 'default org-show-context-detail) 'canonical)
>
> You may want to debug `org-show-set-visibility' first. If it gives no
> clue, you may want to report it to Helm.
>
> Regards,
>
> --
> Nicolas Goaziou

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

end of thread, other threads:[~2019-03-27 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-26 20:01 org-show-context-detail and tree expansion pinkanon pinkanon
2019-03-27 14:29 ` Nicolas Goaziou
2019-03-27 17:10   ` pinkanon pinkanon

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.