emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-tree-slide annoyance
@ 2013-07-15  8:33 henry atts
  2013-07-15 10:35 ` Carsten Dominik
  2013-07-16  5:46 ` Takaaki ISHIKAWA
  0 siblings, 2 replies; 7+ messages in thread
From: henry atts @ 2013-07-15  8:33 UTC (permalink / raw)
  To: emacs-orgmode

I use org-tree-slide-mode by default with 

  (add-hook 'org-mode-hook 'org-tree-slide-mode)

This works kind of acceptable minus some minor annoyances. But one thing
makes it nearly unusuable. tree-slide rigidly expects at least one
header. So if I open an org file without heading, or if I create a new
one, I get an error message:

File mode specification error: (error "before first heading")

If I include a setup file with `#+SETUPFILE:', which of course has no
headings in it,  org-tree-slide stops working at all.

henry

-- 
web: http://literaturlatenight.de
jabberID: atting@jabber.at

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

* Re: org-tree-slide annoyance
  2013-07-15  8:33 org-tree-slide annoyance henry atts
@ 2013-07-15 10:35 ` Carsten Dominik
  2013-07-15 13:33   ` henry atts
  2013-07-16  5:46 ` Takaaki ISHIKAWA
  1 sibling, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2013-07-15 10:35 UTC (permalink / raw)
  To: henry atts; +Cc: emacs-orgmode


On 15.7.2013, at 10:33, henry atts <snd@online.de> wrote:

> I use org-tree-slide-mode by default with 
> 
>  (add-hook 'org-mode-hook 'org-tree-slide-mode)
> 
> This works kind of acceptable minus some minor annoyances. But one thing
> makes it nearly unusuable. tree-slide rigidly expects at least one
> header. So if I open an org file without heading, or if I create a new
> one, I get an error message:
> 
> File mode specification error: (error "before first heading")
> 
> If I include a setup file with `#+SETUPFILE:', which of course has no
> headings in it,  org-tree-slide stops working at all.


Hi Henry,

you could wrap turning on of the mode into a function
that checks if there is a node, and if not, just add one.

- Carsten

> 
> henry
> 
> -- 
> web: http://literaturlatenight.de
> jabberID: atting@jabber.at
> 
> 

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

* Re: org-tree-slide annoyance
  2013-07-15 10:35 ` Carsten Dominik
@ 2013-07-15 13:33   ` henry atts
  2013-07-15 13:43     ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: henry atts @ 2013-07-15 13:33 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, henry atts

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 15.7.2013, at 10:33, henry atts <snd@online.de> wrote:
>
>> I use org-tree-slide-mode by default with 
>> 
>>  (add-hook 'org-mode-hook 'org-tree-slide-mode)
>> 
>> This works kind of acceptable minus some minor annoyances. But one thing
>> makes it nearly unusuable. tree-slide rigidly expects at least one
>> header. So if I open an org file without heading, or if I create a new
>> one, I get an error message:
>> 
>> File mode specification error: (error "before first heading")
>> 
>> If I include a setup file with `#+SETUPFILE:', which of course has no
>> headings in it,  org-tree-slide stops working at all.
>
>
> Hi Henry,
>
> you could wrap turning on of the mode into a function
> that checks if there is a node, and if not, just add one.
>
> - Carsten

Okay, but on the one hand this doesn't solve the problem with
`SETUPFILE'. On the other hand what if I want an org file without any
heading on purpose? Or otherwise asked is a file a `real' org file only
if it has headings in it?

You might say if you want some features of orgmode _and_ an org file
without heading you can always use, say, text-mode and load orgstruct as
a minor mode. Which does not solve the problem as well because with the
org-tree-mode hook for orgmode it shows some strange behaviour equally.

I like org-tree-mode but I think it does not play well with orgmode in
some cases. And as far as I see it even is not in contrib.

henry

-- 
web: http://literaturlatenight.de
jabberID: atting@jabber.at

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

* Re: org-tree-slide annoyance
  2013-07-15 13:33   ` henry atts
@ 2013-07-15 13:43     ` Nick Dokos
  2013-07-16  3:09       ` Ishikawa Takaaki
  2013-07-21  9:04       ` Takaaki ISHIKAWA
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Dokos @ 2013-07-15 13:43 UTC (permalink / raw)
  To: emacs-orgmode

henry atts <snd@online.de> writes:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On 15.7.2013, at 10:33, henry atts <snd@online.de> wrote:
>>
>>> I use org-tree-slide-mode by default with 
>>> 
>>>  (add-hook 'org-mode-hook 'org-tree-slide-mode)
>>> 
>>> This works kind of acceptable minus some minor annoyances. But one thing
>>> makes it nearly unusuable. tree-slide rigidly expects at least one
>>> header. So if I open an org file without heading, or if I create a new
>>> one, I get an error message:
>>> 
>>> File mode specification error: (error "before first heading")
>>> 
>>> If I include a setup file with `#+SETUPFILE:', which of course has no
>>> headings in it,  org-tree-slide stops working at all.
>>
>>
>> Hi Henry,
>>
>> you could wrap turning on of the mode into a function
>> that checks if there is a node, and if not, just add one.
>>
>> - Carsten
>
> Okay, but on the one hand this doesn't solve the problem with
> `SETUPFILE'. On the other hand what if I want an org file without any
> heading on purpose? Or otherwise asked is a file a `real' org file only
> if it has headings in it?
>

No, I don't think so, but there are bugs (there was a bug in the latex
exporter once that required a heading at the beginning). I presume
Carsten's suggestion was as a workaround to a bug (although I might
have misinterpreted his comment).

> You might say if you want some features of orgmode _and_ an org file
> without heading you can always use, say, text-mode and load orgstruct as
> a minor mode. Which does not solve the problem as well because with the
> org-tree-mode hook for orgmode it shows some strange behaviour equally.
>
> I like org-tree-mode but I think it does not play well with orgmode in
> some cases. And as far as I see it even is not in contrib.
>

Yes, I went looking for it there and did not find it :-) So maybe you
can ping the author about the bug - s/he might even fix it, particularly
now that the package is being used by at least one other person! Or
contribute the fix yourself - if you like the package, then others might
too, so it might even end up in contrib at some point.

-- 
Nick

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

* Re: org-tree-slide annoyance
  2013-07-15 13:43     ` Nick Dokos
@ 2013-07-16  3:09       ` Ishikawa Takaaki
  2013-07-21  9:04       ` Takaaki ISHIKAWA
  1 sibling, 0 replies; 7+ messages in thread
From: Ishikawa Takaaki @ 2013-07-16  3:09 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

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

Hi Henry,

Thank you for using org-tree-slide and reporting the issue.
Please use the following patch to avoid the error.

PATCH:
Replace the original code with
----
(defun ots-display-tree-with-narrow ()
  "Show a tree with narrowing and also set a header at the head of slide."
  (goto-char (point-at-bol))
  (when (ots-last-heading-position)
    (hide-subtree) ; support CONTENT (subtrees are shown)
    (org-show-entry)
    (show-children)
    (org-cycle-hide-drawers 'all)
    (org-narrow-to-subtree))
  (setq display-tree-slide-string
(if (equal org-tree-slide-modeline-display 'outside)
    (ots-count-slide (point))
  ""))
  (when org-tree-slide-slide-in-effect
    (ots-slide-in org-tree-slide-slide-in-brank-lines))
  (when org-tree-slide-header
    (ots-show-slide-header)))
----

This patch is a tentative code for checking behavior in your environments,
but I think you will be able to open org files without heading.
I'll update it again within a few days.


Best,
Takaaki



2013/7/15 Nick Dokos <ndokos@gmail.com>

> henry atts <snd@online.de> writes:
>
> > Carsten Dominik <carsten.dominik@gmail.com> writes:
> >
> >> On 15.7.2013, at 10:33, henry atts <snd@online.de> wrote:
> >>
> >>> I use org-tree-slide-mode by default with
> >>>
> >>>  (add-hook 'org-mode-hook 'org-tree-slide-mode)
> >>>
> >>> This works kind of acceptable minus some minor annoyances. But one
> thing
> >>> makes it nearly unusuable. tree-slide rigidly expects at least one
> >>> header. So if I open an org file without heading, or if I create a new
> >>> one, I get an error message:
> >>>
> >>> File mode specification error: (error "before first heading")
> >>>
> >>> If I include a setup file with `#+SETUPFILE:', which of course has no
> >>> headings in it,  org-tree-slide stops working at all.
> >>
> >>
> >> Hi Henry,
> >>
> >> you could wrap turning on of the mode into a function
> >> that checks if there is a node, and if not, just add one.
> >>
> >> - Carsten
> >
> > Okay, but on the one hand this doesn't solve the problem with
> > `SETUPFILE'. On the other hand what if I want an org file without any
> > heading on purpose? Or otherwise asked is a file a `real' org file only
> > if it has headings in it?
> >
>
> No, I don't think so, but there are bugs (there was a bug in the latex
> exporter once that required a heading at the beginning). I presume
> Carsten's suggestion was as a workaround to a bug (although I might
> have misinterpreted his comment).
>
> > You might say if you want some features of orgmode _and_ an org file
> > without heading you can always use, say, text-mode and load orgstruct as
> > a minor mode. Which does not solve the problem as well because with the
> > org-tree-mode hook for orgmode it shows some strange behaviour equally.
> >
> > I like org-tree-mode but I think it does not play well with orgmode in
> > some cases. And as far as I see it even is not in contrib.
> >
>
> Yes, I went looking for it there and did not find it :-) So maybe you
> can ping the author about the bug - s/he might even fix it, particularly
> now that the package is being used by at least one other person! Or
> contribute the fix yourself - if you like the package, then others might
> too, so it might even end up in contrib at some point.
>
> --
> Nick
>
>
>

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

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

* Re: org-tree-slide annoyance
  2013-07-15  8:33 org-tree-slide annoyance henry atts
  2013-07-15 10:35 ` Carsten Dominik
@ 2013-07-16  5:46 ` Takaaki ISHIKAWA
  1 sibling, 0 replies; 7+ messages in thread
From: Takaaki ISHIKAWA @ 2013-07-16  5:46 UTC (permalink / raw)
  To: henry atts; +Cc: emacs-orgmode

Hi Henry,

Thank you for using org-tree-slide and reporting the issue.
Please use the following patch to avoid the error.

PATCH: 
  Replace the original code with
----
(defun ots-display-tree-with-narrow ()
  "Show a tree with narrowing and also set a header at the head of slide."
  (goto-char (point-at-bol))
  (when (ots-last-heading-position)
    (hide-subtree)			; support CONTENT (subtrees are shown)
    (org-show-entry)
    (show-children)
    (org-cycle-hide-drawers 'all)
    (org-narrow-to-subtree))
  (setq display-tree-slide-string
	(if (equal org-tree-slide-modeline-display 'outside)
	    (ots-count-slide (point))
	  ""))
  (when org-tree-slide-slide-in-effect
    (ots-slide-in org-tree-slide-slide-in-brank-lines))
  (when org-tree-slide-header
    (ots-show-slide-header)))
----

This patch is a tentative code for checking behavior in your environments,
but I think you will be able to open org files without heading.
I'll update it again within a few days.


Best,
Takaaki

On Jul 15, 2013, at 5:33 PM, henry atts <snd@online.de> wrote:

> I use org-tree-slide-mode by default with 
> 
>  (add-hook 'org-mode-hook 'org-tree-slide-mode)
> 
> This works kind of acceptable minus some minor annoyances. But one thing
> makes it nearly unusuable. tree-slide rigidly expects at least one
> header. So if I open an org file without heading, or if I create a new
> one, I get an error message:
> 
> File mode specification error: (error "before first heading")
> 
> If I include a setup file with `#+SETUPFILE:', which of course has no
> headings in it,  org-tree-slide stops working at all.
> 
> henry
> 
> -- 
> web: http://literaturlatenight.de
> jabberID: atting@jabber.at
> 
> 

--
Takaaki ISHIKAWA <takaxp@ieee.org>
  GITI, Waseda University
    :) http://about.me/takaxp

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

* Re: org-tree-slide annoyance
  2013-07-15 13:43     ` Nick Dokos
  2013-07-16  3:09       ` Ishikawa Takaaki
@ 2013-07-21  9:04       ` Takaaki ISHIKAWA
  1 sibling, 0 replies; 7+ messages in thread
From: Takaaki ISHIKAWA @ 2013-07-21  9:04 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

Hi Carsten and Nick,

I'd like to contribute my code[*1][*2] to org-mode, but I don't know
the procedure or rules to put it into the contrib dir.

Could you give me some information?

[*1] https://github.com/takaxp/org-tree-slide
[*2] http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html

Best regards,
Takaaki

On Jul 15, 2013, at 10:43 PM, Nick Dokos <ndokos@gmail.com> wrote:

> henry atts <snd@online.de> writes:
> 
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> 
>>> On 15.7.2013, at 10:33, henry atts <snd@online.de> wrote:
>>> 
>>>> I use org-tree-slide-mode by default with 
>>>> 
>>>> (add-hook 'org-mode-hook 'org-tree-slide-mode)
>>>> 
>>>> This works kind of acceptable minus some minor annoyances. But one thing
>>>> makes it nearly unusuable. tree-slide rigidly expects at least one
>>>> header. So if I open an org file without heading, or if I create a new
>>>> one, I get an error message:
>>>> 
>>>> File mode specification error: (error "before first heading")
>>>> 
>>>> If I include a setup file with `#+SETUPFILE:', which of course has no
>>>> headings in it,  org-tree-slide stops working at all.
>>> 
>>> 
>>> Hi Henry,
>>> 
>>> you could wrap turning on of the mode into a function
>>> that checks if there is a node, and if not, just add one.
>>> 
>>> - Carsten
>> 
>> Okay, but on the one hand this doesn't solve the problem with
>> `SETUPFILE'. On the other hand what if I want an org file without any
>> heading on purpose? Or otherwise asked is a file a `real' org file only
>> if it has headings in it?
>> 
> 
> No, I don't think so, but there are bugs (there was a bug in the latex
> exporter once that required a heading at the beginning). I presume
> Carsten's suggestion was as a workaround to a bug (although I might
> have misinterpreted his comment).
> 
>> You might say if you want some features of orgmode _and_ an org file
>> without heading you can always use, say, text-mode and load orgstruct as
>> a minor mode. Which does not solve the problem as well because with the
>> org-tree-mode hook for orgmode it shows some strange behaviour equally.
>> 
>> I like org-tree-mode but I think it does not play well with orgmode in
>> some cases. And as far as I see it even is not in contrib.
>> 
> 
> Yes, I went looking for it there and did not find it :-) So maybe you
> can ping the author about the bug - s/he might even fix it, particularly
> now that the package is being used by at least one other person! Or
> contribute the fix yourself - if you like the package, then others might
> too, so it might even end up in contrib at some point.
> 
> -- 
> Nick
> 
> 

--
Takaaki ISHIKAWA <takaxp@ieee.org>
  GITI, Waseda University
    :) http://about.me/takaxp

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

end of thread, other threads:[~2013-07-21  9:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15  8:33 org-tree-slide annoyance henry atts
2013-07-15 10:35 ` Carsten Dominik
2013-07-15 13:33   ` henry atts
2013-07-15 13:43     ` Nick Dokos
2013-07-16  3:09       ` Ishikawa Takaaki
2013-07-21  9:04       ` Takaaki ISHIKAWA
2013-07-16  5:46 ` Takaaki ISHIKAWA

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