emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] #+constants line has to be at column 0
@ 2014-03-11 11:17 Eric S Fraga
  2014-03-12 18:04 ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Eric S Fraga @ 2014-03-11 11:17 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello,

Unlike some other #+ directives, the #+constants: one has to be at
column 0 or else it is not understood/parsed by org.  This has
consequences for lists.  See attached example.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: examplebug.org --]
[-- Type: text/x-org, Size: 454 bytes --]

#+TITLE:     examplebug.org
#+AUTHOR:    Eric S Fraga

* Table constants
Assume that I have a list:
1. and in this list, one of the entries is a table
2. This is the table
#+constants: param=-5

   |   | X |  Y |
   | ! | x |  y |
   |---+---+----|
   | # | 1 | -4 |
   | # | 2 | -3 |
   | # | 3 | -2 |
   #+TBLFM: $3=$x+$param

1. The constants line cannot be indented as it is not understood if it is.
2. This means that the list has been interrupted.

[-- Attachment #3: Type: text/plain, Size: 322 bytes --]


Obviously, I can move the constants line elsewhere and/or use the $
directive within the table but I thought that this was an inconsistency
in the parsing of org files?  Maybe not?

Org up to date and verified with emacs -Q.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.2, Org release_8.2.5h-687-g9d39aa

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

* Re: [bug] #+constants line has to be at column 0
  2014-03-11 11:17 [bug] #+constants line has to be at column 0 Eric S Fraga
@ 2014-03-12 18:04 ` Bastien
  2014-03-12 18:18   ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2014-03-12 18:04 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

Hi Eric,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Unlike some other #+ directives, the #+constants: one has to be at
> column 0 or else it is not understood/parsed by org.

This is the same behavior than all #+ directives except these four:

#+TITLE: 
#+AUTHOR: 
#+DATE: 
#+EMAIL:

Fontification should tell you in all cases.

HTH,

-- 
 Bastien

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

* Re: [bug] #+constants line has to be at column 0
  2014-03-12 18:04 ` Bastien
@ 2014-03-12 18:18   ` Nicolas Goaziou
  2014-03-12 18:21     ` Bastien
  2014-03-13  8:11     ` Eric S Fraga
  0 siblings, 2 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2014-03-12 18:18 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hello,

Bastien <bzg@gnu.org> writes:

> This is the same behavior than all #+ directives except these four:
>
> #+TITLE: 
> #+AUTHOR: 
> #+DATE: 
> #+EMAIL:
>
> Fontification should tell you in all cases.

Most user-defined keywords ignore indentation
(e.g., #+LATEX_HEADER:, #+MACRO: ...).

I think we should remove this historical limitation, as there is no
reason to keep it any longer. The benefit is that such a change will be
backward compatible.


Regards,

-- 
Nicolas Goaziou

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

* Re: [bug] #+constants line has to be at column 0
  2014-03-12 18:18   ` Nicolas Goaziou
@ 2014-03-12 18:21     ` Bastien
  2014-03-12 20:31       ` Nicolas Goaziou
  2014-03-13  8:11     ` Eric S Fraga
  1 sibling, 1 reply; 9+ messages in thread
From: Bastien @ 2014-03-12 18:21 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> I think we should remove this historical limitation, as there is no
> reason to keep it any longer. The benefit is that such a change will be
> backward compatible.

Agreed, please go ahead,

-- 
 Bastien

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

* Re: [bug] #+constants line has to be at column 0
  2014-03-12 18:21     ` Bastien
@ 2014-03-12 20:31       ` Nicolas Goaziou
  2014-03-13  7:40         ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2014-03-12 20:31 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Agreed, please go ahead,

Done.


Regards,

-- 
Nicolas Goaziou

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

* Re: [bug] #+constants line has to be at column 0
  2014-03-12 20:31       ` Nicolas Goaziou
@ 2014-03-13  7:40         ` Bastien
  0 siblings, 0 replies; 9+ messages in thread
From: Bastien @ 2014-03-13  7:40 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Bastien <bzg@gnu.org> writes:
>
>> Agreed, please go ahead,
>
> Done.

Thanks!

-- 
 Bastien

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

* Re: [bug] #+constants line has to be at column 0
  2014-03-12 18:18   ` Nicolas Goaziou
  2014-03-12 18:21     ` Bastien
@ 2014-03-13  8:11     ` Eric S Fraga
  2014-03-13 11:22       ` Bastien
  1 sibling, 1 reply; 9+ messages in thread
From: Eric S Fraga @ 2014-03-13  8:11 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Bastien <bzg@gnu.org> writes:
>
>> This is the same behavior than all #+ directives except these four:
>>
>> #+TITLE: 
>> #+AUTHOR: 
>> #+DATE: 
>> #+EMAIL:
>>
>> Fontification should tell you in all cases.
>
> Most user-defined keywords ignore indentation
> (e.g., #+LATEX_HEADER:, #+MACRO: ...).
>
> I think we should remove this historical limitation, as there is no
> reason to keep it any longer. The benefit is that such a change will be
> backward compatible.

Nicolas,

thanks for this.  Works very well now.  

The fontification doesn't as I guess org-fontify-meta-lines-and-blocks-1
hasn't been updated.  I suggest adding "+constants:" to the first cond
entry in this function?

Thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.2, Org release_8.2.5h-709-g99f1ff

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

* Re: [bug] #+constants line has to be at column 0
  2014-03-13  8:11     ` Eric S Fraga
@ 2014-03-13 11:22       ` Bastien
  2014-03-13 15:54         ` Eric S Fraga
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2014-03-13 11:22 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode, Nicolas Goaziou

Hi Eric,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> The fontification doesn't as I guess org-fontify-meta-lines-and-blocks-1
> hasn't been updated.  I suggest adding "+constants:" to the first cond
> entry in this function?

this is now fixed in master -- *sorry* for not crediting you in the
commit message, my memory thought Alan reported this.

-- 
 Bastien

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

* Re: [bug] #+constants line has to be at column 0
  2014-03-13 11:22       ` Bastien
@ 2014-03-13 15:54         ` Eric S Fraga
  0 siblings, 0 replies; 9+ messages in thread
From: Eric S Fraga @ 2014-03-13 15:54 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Nicolas Goaziou

Bastien <bzg@gnu.org> writes:

> Hi Eric,
>
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> The fontification doesn't as I guess org-fontify-meta-lines-and-blocks-1
>> hasn't been updated.  I suggest adding "+constants:" to the first cond
>> entry in this function?
>
> this is now fixed in master -- *sorry* for not crediting you in the
> commit message, my memory thought Alan reported this.

Works perfectly!  Thanks.  No worries re: credit.  It's not something
that matters.  Org itself is thanks enough.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.2, Org release_8.2.5h-709-g99f1ff

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

end of thread, other threads:[~2014-03-13 15:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11 11:17 [bug] #+constants line has to be at column 0 Eric S Fraga
2014-03-12 18:04 ` Bastien
2014-03-12 18:18   ` Nicolas Goaziou
2014-03-12 18:21     ` Bastien
2014-03-12 20:31       ` Nicolas Goaziou
2014-03-13  7:40         ` Bastien
2014-03-13  8:11     ` Eric S Fraga
2014-03-13 11:22       ` Bastien
2014-03-13 15:54         ` 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).