Re: [O] beamer_env tag issue with empty headlines

2015-08-27 Thread Pip Cet
On Thu, Aug 27, 2015 at 6:53 PM, Nicolas Goaziou 
wrote:

> Pip Cet  writes:
>
> > Could you explain your reasoning for this in some more detail? I use
> > empty headlines + tags (properties, actually) in my "set properties in
> > headlines rather than special drawers" code, and I wouldn't want it to
> > break even more than it currently is because of this limitation.
>
> The reasoning is that it is a tricky situation, which may not be handled
> everywhere in code base, e.g., depending on the regexp used. As
> a consequence you're in /terra incognita/ anytime you use such
> constructs.
>

IMHO it would be a good idea to reduce the number of regexps anyway; for
example, there are more than twenty regexps trying to match the tags at the
end of the line. (I've fixed that here, and will submit a patch as soon as
the copyright papers have been accepted)

> I don't, but empty headlines are useful for setting tags (or, in my
> > case, properties) without making up a title, so in my humble opinion
> > it's a clear-cut case to support empty headlines + tags.
>
> Possible. The fact that we're having this discussion means we should
> probably choose one option, write it down in Org syntax, then deal with
> the bugs. Which option is open for debate. I am not married to any of
> them.
>

I think we have three options:
1. declare empty headlines forbidden
2. declare empty headlines allowed, and hope everything goes well
3. declare empty headlines allowed and go through the code making sure we
deal with them everywhere.

My preference is 3, but 1 is better than 2. I'm volunteering to try to find
the time for #3 (if only there were some sort of Emacs extension to help me
organize things better), but can't really promise anything. However, I
think we should make the decision first so it's not a total waste of effort.

I should clarify that I consider only headlines with at least one space
following the stars "empty headlines". A star on a line of its own doesn't
count.

Thanks!
Pip


Re: [O] beamer_env tag issue with empty headlines

2015-08-27 Thread Nicolas Goaziou
Pip Cet  writes:

> Could you explain your reasoning for this in some more detail? I use
> empty headlines + tags (properties, actually) in my "set properties in
> headlines rather than special drawers" code, and I wouldn't want it to
> break even more than it currently is because of this limitation.

The reasoning is that it is a tricky situation, which may not be handled
everywhere in code base, e.g., depending on the regexp used. As
a consequence you're in /terra incognita/ anytime you use such
constructs.

> As you say, there are limitations in both cases, but do you actually
> see headlines beginning with a colon being useful anywhere?

FWIW, I don't even see empty headlines useful anywhere. You can, for
example, use \nbsp{} or some such to hide a headline. But IMO, it looks
weird in overview display and is totally uninformative.

> I don't, but empty headlines are useful for setting tags (or, in my
> case, properties) without making up a title, so in my humble opinion
> it's a clear-cut case to support empty headlines + tags.

Possible. The fact that we're having this discussion means we should
probably choose one option, write it down in Org syntax, then deal with
the bugs. Which option is open for debate. I am not married to any of
them.

Regards,



Re: [O] beamer_env tag issue with empty headlines

2015-08-21 Thread Pip Cet
On 8/19/15, Nicolas Goaziou  wrote:
> Prateek Mehta  writes:
>
>> That probably makes sense, though I still feel it is a little
>> inconsistent.
>> One could argue that anything within colons is an org tag (regardless of
>> whether the title is empty), and isn't meant to be exported. It's
>> probably
>> rare to start a headline with a colon anyway.
>>
>> Plus, I guess you are still somewhat restricted if you want to export a
>> headline ** foo :bar:, where :bar: is not a tag. ;)
>
> Of course, there are limitations (and workarounds) in each case.
>
> This is why I suggest to stay away from the "empty headlines + tags".
> The only empty headline supported in Org is the one without anything.

Could you explain your reasoning for this in some more detail? I use
empty headlines + tags (properties, actually) in my "set properties in
headlines rather than special drawers" code, and I wouldn't want it to
break even more than it currently is because of this limitation.

As you say, there are limitations in both cases, but do you actually
see headlines beginning with a colon being useful anywhere? I don't,
but empty headlines are useful for setting tags (or, in my case,
properties) without making up a title, so in my humble opinion it's a
clear-cut case to support empty headlines + tags.



Re: [O] beamer_env tag issue with empty headlines

2015-08-21 Thread Rafael
Nicolas Goaziou  writes:

> Rafael  writes:
>
>> I mean that I would like to have a new variable, say,
>> 'org-no-headlines-between-colons', that when set to t, would cause org
>> to treat any part of a heading between colons as a tag.
>
> My question was: what for? Do you have a (simple) use-case?

Just like the OP said: When exporting to beamer, there are some headings
that do not merit a named heading. Like columns. Or for example, in my
case, I have theorems without a name. Say:

***   :B_theorem:
:PROPERTIES:
:BEAMER_env: theorem
:END:
Let \(X\) be a \(T_{1}\) space. Then \(X\) is regular if an only
if given a point \(x\in X\) and a neighborhood \(U\) of \(x\)
there is a neighborhood \(V\) of \(x\) such that
\(\overline{V}\subseteq U\).

Or sometimes, in definitions, I could include a named heading, but it
looks redundant to me, as the defined term is already emphasized.

*** Normal space   :B_definition:
:PROPERTIES:
:BEAMER_env: definition
:END:
Let \(X\) be a \(T_{1}\) space. We say that \(X\) is *normal* if for
any \(F\subseteq X\) and \(G\subseteq X\) disjoint closed sets,
there are disjoint open sets \(U,V\) such that 
\(F\subseteq U\) and \(G\subseteq V\).

I do not think I will ever need two colons in a heading. Hence I think
the option to interpret anything between colons in a heading as a tag
would be useful.

Thanks for your answers,

Rafael



Re: [O] beamer_env tag issue with empty headlines

2015-08-21 Thread Nicolas Goaziou
Rafael  writes:

> I mean that I would like to have a new variable, say,
> 'org-no-headlines-between-colons', that when set to t, would cause org
> to treat any part of a heading between colons as a tag.

My question was: what for? Do you have a (simple) use-case?

Regards,



Re: [O] beamer_env tag issue with empty headlines

2015-08-20 Thread Rafael
Nicolas Goaziou  writes:

> Rafael  writes:
>
>> On the other hand, I wish there would be a variable
>> "org-no-headlines-between-colons", to solve these sort of ambiguities.
>
> What do you mean exactly? What beamer code do you want to generate?

Hi,

I mean that I would like to have a new variable, say,
'org-no-headlines-between-colons', that when set to t, would cause org
to treat any part of a heading between colons as a tag. 

Best regards,

Rafael



Re: [O] beamer_env tag issue with empty headlines

2015-08-20 Thread Nicolas Goaziou
Hello,

Rafael  writes:

> On the other hand, I wish there would be a variable
> "org-no-headlines-between-colons", to solve these sort of ambiguities.

What do you mean exactly? What beamer code do you want to generate?

Regards,

-- 
Nicolas Goaziou



Re: [O] beamer_env tag issue with empty headlines

2015-08-20 Thread Rafael
Nicolas Goaziou  writes:

> This is an ambiguous headline. Indeed, it's impossible to tell if it is
> an empty headline with tags or a headline without tags whose title is
> ":B_block:BMCOL:".
>
> I think the last option is better as the first one prevents any
> headline's title from being enclosed within colons. This is restrictive.
>
> In any case, there are workarounds available for what you have to do.

I've been using filters to "fix" this, is there any other trick that
works for all exporters?

On the other hand, I wish there would be a variable
"org-no-headlines-between-colons", to solve these sort of ambiguities.

Regards,
Rafael



Re: [O] beamer_env tag issue with empty headlines

2015-08-19 Thread Nicolas Goaziou
Prateek Mehta  writes:

> That probably makes sense, though I still feel it is a little inconsistent.
> One could argue that anything within colons is an org tag (regardless of
> whether the title is empty), and isn't meant to be exported. It's probably
> rare to start a headline with a colon anyway.
>
> Plus, I guess you are still somewhat restricted if you want to export a
> headline ** foo :bar:, where :bar: is not a tag. ;)

Of course, there are limitations (and workarounds) in each case.

This is why I suggest to stay away from the "empty headlines + tags".
The only empty headline supported in Org is the one without anything.

Regards,



Re: [O] beamer_env tag issue with empty headlines

2015-08-19 Thread Prateek Mehta
On Wed, Aug 19, 2015 at 4:56 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Prateek Mehta  writes:
>
> > I have a beamer block setup like below, so that it does not have a
> headline.
> >
> >
> > **  :B_block:BMCOL:
> >:PROPERTIES:
> >:BEAMER_col: 0.64
> >:BEAMER_env: block
> >:END:
> >
> > - Some text here
> >
> > When I export it, the beamer environment tags show up in the pdf. This
> was
> > not the case a couple of months ago, when the tags didn't appear in the
> > pdf.
> >
> > If the the headline is not empty, the tags do not show in the pdf and it
> > works as it used to.
> >
> > Has there been a recent change that introduced this?
>
> This is an ambiguous headline. Indeed, it's impossible to tell if it is
> an empty headline with tags or a headline without tags whose title is
> ":B_block:BMCOL:".
>
> I think the last option is better as the first one prevents any
> headline's title from being enclosed within colons. This is restrictive.
>

That probably makes sense, though I still feel it is a little inconsistent.
One could argue that anything within colons is an org tag (regardless of
whether the title is empty), and isn't meant to be exported. It's probably
rare to start a headline with a colon anyway.

Plus, I guess you are still somewhat restricted if you want to export a
headline ** foo :bar:, where :bar: is not a tag. ;)

In any case, there are workarounds available for what you have to do.
>

Yes, either way works.

Thanks,

Prateek

>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] beamer_env tag issue with empty headlines

2015-08-19 Thread Nicolas Goaziou
Hello,

Prateek Mehta  writes:

> I have a beamer block setup like below, so that it does not have a headline.
>
>
> **  :B_block:BMCOL:
>:PROPERTIES:
>:BEAMER_col: 0.64
>:BEAMER_env: block
>:END:
>
> - Some text here
>
> When I export it, the beamer environment tags show up in the pdf. This was
> not the case a couple of months ago, when the tags didn't appear in the
> pdf.
>
> If the the headline is not empty, the tags do not show in the pdf and it
> works as it used to.
>
> Has there been a recent change that introduced this?

This is an ambiguous headline. Indeed, it's impossible to tell if it is
an empty headline with tags or a headline without tags whose title is
":B_block:BMCOL:".

I think the last option is better as the first one prevents any
headline's title from being enclosed within colons. This is restrictive.

In any case, there are workarounds available for what you have to do.


Regards,

-- 
Nicolas Goaziou



Re: [O] beamer_env tag issue with empty headlines

2015-08-18 Thread Prateek Mehta
On Tue, Aug 18, 2015 at 12:00 PM,  wrote:

>
> Message: 14
> Date: Tue, 18 Aug 2015 14:43:39 +0200
> From: Suvayu Ali 
> To: emacs-orgmode@gnu.org
> Subject: Re: [O] beamer_env tag issue with empty headlines
> Message-ID: <20150818124339.gd18...@chitra.no-ip.org>
> Content-Type: text/plain; charset=us-ascii
>
> On Mon, Aug 17, 2015 at 11:11:59PM -0400, Prateek Mehta wrote:
> >
> > I have a beamer block setup like below, so that it does not have a
> headline.
> >
> >
> > **  :B_block:BMCOL:
> >:PROPERTIES:
> >:BEAMER_col: 0.64
> >:BEAMER_env: block
> >:END:
> >
> > - Some text here
> >
> > When I export it, the beamer environment tags show up in the pdf. This
> was
> > not the case a couple of months ago, when the tags didn't appear in the
> > pdf.
> >
> > If the the headline is not empty, the tags do not show in the pdf and it
> > works as it used to.
>
> I can confirm this behaviour.  I do not know if this is a regression,
> but it is inconsistent for sure.  That said, you can hack around this by
> using \phantom{dummy}.
>
> For now I'm simply getting rid of the tags after specifying the
environments I want to work around the issue. But I do believe that this is
inconsistent behavior.

Prateek



> Hope this helps,
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>
>


[O] beamer_env tag issue with empty headlines

2015-08-18 Thread Prateek Mehta
Hi,

I have a beamer block setup like below, so that it does not have a headline.


**  :B_block:BMCOL:
   :PROPERTIES:
   :BEAMER_col: 0.64
   :BEAMER_env: block
   :END:

- Some text here

When I export it, the beamer environment tags show up in the pdf. This was
not the case a couple of months ago, when the tags didn't appear in the
pdf.

If the the headline is not empty, the tags do not show in the pdf and it
works as it used to.

Has there been a recent change that introduced this?

I am using emacs 24.5.1 and org 8.3.1.

Thanks,

Prateek


Re: [O] beamer_env tag issue with empty headlines

2015-08-18 Thread Suvayu Ali
On Mon, Aug 17, 2015 at 11:11:59PM -0400, Prateek Mehta wrote:
> 
> I have a beamer block setup like below, so that it does not have a headline.
> 
> 
> **  :B_block:BMCOL:
>:PROPERTIES:
>:BEAMER_col: 0.64
>:BEAMER_env: block
>:END:
> 
> - Some text here
> 
> When I export it, the beamer environment tags show up in the pdf. This was
> not the case a couple of months ago, when the tags didn't appear in the
> pdf.
> 
> If the the headline is not empty, the tags do not show in the pdf and it
> works as it used to.

I can confirm this behaviour.  I do not know if this is a regression,
but it is inconsistent for sure.  That said, you can hack around this by
using \phantom{dummy}.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.