emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* property constants in elisp formulas
@ 2007-10-18 22:06 Eddward DeVilla
  2007-10-19 16:11 ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Eddward DeVilla @ 2007-10-18 22:06 UTC (permalink / raw)
  To: org-mode list

Hi,

    Is there a better way to do this?

===== sample file =====
* top
  :PROPERTIES:
  :d_5: 0
  :h_5: 8
  :m_5: 16
  :d_4: 2
  :h_4: 18
  :m_4: 58
  :d_3: 6
  :h_3: 11
  :m_3: 33
  :d_2: 3
  :h_2: 13
  :m_2: 36
  :d_1: 0
  :h_1: 13
  :m_1: 59
  :d_0: 0
  :h_0: 6
  :m_0: 23
  :d_n: 17
  :h_n: 8
  :m_n: 59
  :END:

*** test
|   | day | hour | minute |
|---+-----+------+--------|
| # |   0 |    8 |     16 |
| # |   2 |   18 |     58 |
| # |   6 |   11 |     33 |
| # |   3 |   13 |     36 |
| # |   0 |   13 |     59 |
| # |   0 |    6 |     23 |
| # |  17 |    8 |     59 |
#+TBLFM: @2$2='(car '$PROP_d_5)::@2$3='(car '$PROP_h_5)::@2$4='(car
'$PROP_m_5)::@3$2='(car '$PROP_d_4)::@3$3='(car
'$PROP_h_4)::@3$4='(car '$PROP_m_4)::@4$2='(car
'$PROP_d_3)::@4$3='(car '$PROP_h_3)::@4$4='(car
'$PROP_m_3)::@5$2='(car '$PROP_d_2)::@5$3='(car
'$PROP_h_2)::@5$4='(car '$PROP_m_2)::@6$2='(car
'$PROP_d_1)::@6$3='(car '$PROP_h_1)::@6$4='(car
'$PROP_m_1)::@7$2='(car '$PROP_d_0)::@7$3='(car
'$PROP_h_0)::@7$4='(car '$PROP_m_0)::@8$2='(car
'$PROP_d_n)::@8$3='(car '$PROP_h_n)::@8$4='(car '$PROP_m_n)

====================

Specifically, is there a better way to get at a property constant with
an elisp formula?  It seems the value is automatically put in parens
such that $h_3 is (11) which is a little awkward.  On the other hand,
maybe I can use that to store a list in a property.

Edd

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

* Re: property constants in elisp formulas
  2007-10-18 22:06 property constants in elisp formulas Eddward DeVilla
@ 2007-10-19 16:11 ` Carsten Dominik
  2007-10-19 20:32   ` Eddward DeVilla
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2007-10-19 16:11 UTC (permalink / raw)
  To: Eddward DeVilla; +Cc: org-mode list

You are right, there should be no parenthesis in Lisp interpolation.
Will be fixed in 5.14.

- Carsten

On Oct 19, 2007, at 0:06, Eddward DeVilla wrote:

> Hi,
>
>     Is there a better way to do this?
>
> ===== sample file =====
> * top
>   :PROPERTIES:
>   :d_5: 0
>   :h_5: 8
>   :m_5: 16
>   :d_4: 2
>   :h_4: 18
>   :m_4: 58
>   :d_3: 6
>   :h_3: 11
>   :m_3: 33
>   :d_2: 3
>   :h_2: 13
>   :m_2: 36
>   :d_1: 0
>   :h_1: 13
>   :m_1: 59
>   :d_0: 0
>   :h_0: 6
>   :m_0: 23
>   :d_n: 17
>   :h_n: 8
>   :m_n: 59
>   :END:
>
> *** test
> |   | day | hour | minute |
> |---+-----+------+--------|
> | # |   0 |    8 |     16 |
> | # |   2 |   18 |     58 |
> | # |   6 |   11 |     33 |
> | # |   3 |   13 |     36 |
> | # |   0 |   13 |     59 |
> | # |   0 |    6 |     23 |
> | # |  17 |    8 |     59 |
> #+TBLFM: @2$2='(car '$PROP_d_5)::@2$3='(car '$PROP_h_5)::@2$4='(car
> '$PROP_m_5)::@3$2='(car '$PROP_d_4)::@3$3='(car
> '$PROP_h_4)::@3$4='(car '$PROP_m_4)::@4$2='(car
> '$PROP_d_3)::@4$3='(car '$PROP_h_3)::@4$4='(car
> '$PROP_m_3)::@5$2='(car '$PROP_d_2)::@5$3='(car
> '$PROP_h_2)::@5$4='(car '$PROP_m_2)::@6$2='(car
> '$PROP_d_1)::@6$3='(car '$PROP_h_1)::@6$4='(car
> '$PROP_m_1)::@7$2='(car '$PROP_d_0)::@7$3='(car
> '$PROP_h_0)::@7$4='(car '$PROP_m_0)::@8$2='(car
> '$PROP_d_n)::@8$3='(car '$PROP_h_n)::@8$4='(car '$PROP_m_n)
>
> ====================
>
> Specifically, is there a better way to get at a property constant with
> an elisp formula?  It seems the value is automatically put in parens
> such that $h_3 is (11) which is a little awkward.  On the other hand,
> maybe I can use that to store a list in a property.
>
> Edd
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

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

* Re: property constants in elisp formulas
  2007-10-19 16:11 ` Carsten Dominik
@ 2007-10-19 20:32   ` Eddward DeVilla
  2007-10-23  5:10     ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Eddward DeVilla @ 2007-10-19 20:32 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode list

Now, just as a stupid question, if I put a lisp expression into a
property, can I use it in a formula?

===== sample ========
* top
  :PROPERTIES:
  :fives:    (0  8  16)
  :fours:    (2  18 58)
  :threes:   (6  11 33)
  :twos:     (3  13 36)
  :ones:     (0  13 59)
  :zeros:    (0  6  23)
  :null:     (17 8  59)
  :END:

*** test 1
    |   | day | hour | minute |
    |---+-----+------+--------|
    | # |   0 |    8 |     16 |
    | # |   2 |   18 |     58 |
    | # |   6 |   11 |     33 |
    | # |   3 |   13 |     36 |
    | # |   0 |   13 |     59 |
    | # |   0 |    6 |     23 |
    | # |  17 |    8 |     59 |
#+TBLFM: @2$2='(car   '$PROP_fives)::@2$3='(cadr
'$PROP_fives)::@2$4='(caddr '$PROP_fives)::@3$2='(car
'$PROP_fours)::@3$3='(cadr  '$PROP_fours)::@3$4='(caddr
'$PROP_fours)::@4$2='(car   '$PROP_threes)::@4$3='(cadr
'$PROP_threes)::@4$4='(caddr '$PROP_threes)::@5$2='(car
'$PROP_twos)::@5$3='(cadr  '$PROP_twos)::@5$4='(caddr
'$PROP_twos)::@6$2='(car   '$PROP_ones)::@6$3='(cadr
'$PROP_ones)::@6$4='(caddr '$PROP_ones)::@7$2='(car
'$PROP_zeros)::@7$3='(cadr  '$PROP_zeros)::@7$4='(caddr
'$PROP_zeros)::@8$2='(car   '$PROP_null)::@8$3='(cadr
'$PROP_null)::@8$4='(caddr '$PROP_null)

==========================

Also, in the above example, the property values were aligned for me.
In my previous example, that didn't happen.  It seems that the
alignment code does like underscores in names

===== sample ======
* top
  :PROPERTIES:
  :fives:    0  8  16
  :d_5: 0
  :fours:    2  18 58
  :END:

=================

Lastly, since I'm whining, there's a bug in the formula editor that
I'm not sure if I've mentioned before.  Edit the table below with C-c
'.  The '(@-I$2..$2) will become '(@-I$2..B&) which causes #ERRORs.

====== sample =======
* top
  :PROPERTIES:
  :fives:    0  8  16
  :fours:    2  18 58
  :threes:   6  11 33
  :twos:     3  13 36
  :ones:     0  13 59
  :zeros:    0  6  23
  :null:     17 8  59
  :END:

*** test 2
    |   | day |    |
    |---+-----+----|
    | # |   0 |  0 |
    | # |   2 |  2 |
    | # |   6 |  8 |
    | # |   3 | 11 |
    | # |   0 | 11 |
    | # |   0 | 11 |
    | # |  17 | 28 |
#+TBLFM: $3='(apply '+ '(@-I$2..$2));N::@2$2='(car
'$PROP_fives)::@3$2='(car   '$PROP_fours)::@4$2='(car
'$PROP_threes)::@5$2='(car   '$PROP_twos)::@6$2='(car
'$PROP_ones)::@7$2='(car   '$PROP_zeros)::@8$2='(car   '$PROP_null)

====================

Edd

On 10/19/07, Carsten Dominik <dominik@science.uva.nl> wrote:
> You are right, there should be no parenthesis in Lisp interpolation.
> Will be fixed in 5.14.
>
> - Carsten
>
> On Oct 19, 2007, at 0:06, Eddward DeVilla wrote:
>
> > Hi,
> >
> >     Is there a better way to do this?
> >
> > ===== sample file =====
> > * top
> >   :PROPERTIES:
> >   :d_5: 0
> >   :h_5: 8
> >   :m_5: 16
> >   :d_4: 2
> >   :h_4: 18
> >   :m_4: 58
> >   :d_3: 6
> >   :h_3: 11
> >   :m_3: 33
> >   :d_2: 3
> >   :h_2: 13
> >   :m_2: 36
> >   :d_1: 0
> >   :h_1: 13
> >   :m_1: 59
> >   :d_0: 0
> >   :h_0: 6
> >   :m_0: 23
> >   :d_n: 17
> >   :h_n: 8
> >   :m_n: 59
> >   :END:
> >
> > *** test
> > |   | day | hour | minute |
> > |---+-----+------+--------|
> > | # |   0 |    8 |     16 |
> > | # |   2 |   18 |     58 |
> > | # |   6 |   11 |     33 |
> > | # |   3 |   13 |     36 |
> > | # |   0 |   13 |     59 |
> > | # |   0 |    6 |     23 |
> > | # |  17 |    8 |     59 |
> > #+TBLFM: @2$2='(car '$PROP_d_5)::@2$3='(car '$PROP_h_5)::@2$4='(car
> > '$PROP_m_5)::@3$2='(car '$PROP_d_4)::@3$3='(car
> > '$PROP_h_4)::@3$4='(car '$PROP_m_4)::@4$2='(car
> > '$PROP_d_3)::@4$3='(car '$PROP_h_3)::@4$4='(car
> > '$PROP_m_3)::@5$2='(car '$PROP_d_2)::@5$3='(car
> > '$PROP_h_2)::@5$4='(car '$PROP_m_2)::@6$2='(car
> > '$PROP_d_1)::@6$3='(car '$PROP_h_1)::@6$4='(car
> > '$PROP_m_1)::@7$2='(car '$PROP_d_0)::@7$3='(car
> > '$PROP_h_0)::@7$4='(car '$PROP_m_0)::@8$2='(car
> > '$PROP_d_n)::@8$3='(car '$PROP_h_n)::@8$4='(car '$PROP_m_n)
> >
> > ====================
> >
> > Specifically, is there a better way to get at a property constant with
> > an elisp formula?  It seems the value is automatically put in parens
> > such that $h_3 is (11) which is a little awkward.  On the other hand,
> > maybe I can use that to store a list in a property.
> >
> > Edd
> >
> >
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Remember: use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> >
> >
>
> --
> Carsten Dominik
> Sterrenkundig Instituut "Anton Pannekoek"
> Universiteit van Amsterdam
> Kruislaan 403
> NL-1098SJ Amsterdam
> phone: +31 20 525 7477
>
>

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

* Re: property constants in elisp formulas
  2007-10-19 20:32   ` Eddward DeVilla
@ 2007-10-23  5:10     ` Carsten Dominik
  2007-10-23 15:06       ` Eddward DeVilla
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2007-10-23  5:10 UTC (permalink / raw)
  To: Eddward DeVilla; +Cc: org-mode list

I believe you can, yes.  Why don;y you just try and watch the effect
by turning on formula debugging?

BTW, 5.13d omits the parenthesis in Lisp formula interpolation...

- Carsten

On Oct 19, 2007, at 10:32 PM, Eddward DeVilla wrote:

> Now, just as a stupid question, if I put a lisp expression into a
> property, can I use it in a formula?
>
> ===== sample ========
> * top
>   :PROPERTIES:
>   :fives:    (0  8  16)
>   :fours:    (2  18 58)
>   :threes:   (6  11 33)
>   :twos:     (3  13 36)
>   :ones:     (0  13 59)
>   :zeros:    (0  6  23)
>   :null:     (17 8  59)
>   :END:
>
> *** test 1
>     |   | day | hour | minute |
>     |---+-----+------+--------|
>     | # |   0 |    8 |     16 |
>     | # |   2 |   18 |     58 |
>     | # |   6 |   11 |     33 |
>     | # |   3 |   13 |     36 |
>     | # |   0 |   13 |     59 |
>     | # |   0 |    6 |     23 |
>     | # |  17 |    8 |     59 |
> #+TBLFM: @2$2='(car   '$PROP_fives)::@2$3='(cadr
> '$PROP_fives)::@2$4='(caddr '$PROP_fives)::@3$2='(car
> '$PROP_fours)::@3$3='(cadr  '$PROP_fours)::@3$4='(caddr
> '$PROP_fours)::@4$2='(car   '$PROP_threes)::@4$3='(cadr
> '$PROP_threes)::@4$4='(caddr '$PROP_threes)::@5$2='(car
> '$PROP_twos)::@5$3='(cadr  '$PROP_twos)::@5$4='(caddr
> '$PROP_twos)::@6$2='(car   '$PROP_ones)::@6$3='(cadr
> '$PROP_ones)::@6$4='(caddr '$PROP_ones)::@7$2='(car
> '$PROP_zeros)::@7$3='(cadr  '$PROP_zeros)::@7$4='(caddr
> '$PROP_zeros)::@8$2='(car   '$PROP_null)::@8$3='(cadr
> '$PROP_null)::@8$4='(caddr '$PROP_null)
>
> ==========================
>
> Also, in the above example, the property values were aligned for me.
> In my previous example, that didn't happen.  It seems that the
> alignment code does like underscores in names
>
> ===== sample ======
> * top
>   :PROPERTIES:
>   :fives:    0  8  16
>   :d_5: 0
>   :fours:    2  18 58
>   :END:
>
> =================
>
> Lastly, since I'm whining, there's a bug in the formula editor that
> I'm not sure if I've mentioned before.  Edit the table below with C-c
> '.  The '(@-I$2..$2) will become '(@-I$2..B&) which causes #ERRORs.
>
> ====== sample =======
> * top
>   :PROPERTIES:
>   :fives:    0  8  16
>   :fours:    2  18 58
>   :threes:   6  11 33
>   :twos:     3  13 36
>   :ones:     0  13 59
>   :zeros:    0  6  23
>   :null:     17 8  59
>   :END:
>
> *** test 2
>     |   | day |    |
>     |---+-----+----|
>     | # |   0 |  0 |
>     | # |   2 |  2 |
>     | # |   6 |  8 |
>     | # |   3 | 11 |
>     | # |   0 | 11 |
>     | # |   0 | 11 |
>     | # |  17 | 28 |
> #+TBLFM: $3='(apply '+ '(@-I$2..$2));N::@2$2='(car
> '$PROP_fives)::@3$2='(car   '$PROP_fours)::@4$2='(car
> '$PROP_threes)::@5$2='(car   '$PROP_twos)::@6$2='(car
> '$PROP_ones)::@7$2='(car   '$PROP_zeros)::@8$2='(car   '$PROP_null)
>
> ====================
>
> Edd
>
> On 10/19/07, Carsten Dominik <dominik@science.uva.nl> wrote:
>> You are right, there should be no parenthesis in Lisp interpolation.
>> Will be fixed in 5.14.
>>
>> - Carsten
>>
>> On Oct 19, 2007, at 0:06, Eddward DeVilla wrote:
>>
>>> Hi,
>>>
>>>     Is there a better way to do this?
>>>
>>> ===== sample file =====
>>> * top
>>>   :PROPERTIES:
>>>   :d_5: 0
>>>   :h_5: 8
>>>   :m_5: 16
>>>   :d_4: 2
>>>   :h_4: 18
>>>   :m_4: 58
>>>   :d_3: 6
>>>   :h_3: 11
>>>   :m_3: 33
>>>   :d_2: 3
>>>   :h_2: 13
>>>   :m_2: 36
>>>   :d_1: 0
>>>   :h_1: 13
>>>   :m_1: 59
>>>   :d_0: 0
>>>   :h_0: 6
>>>   :m_0: 23
>>>   :d_n: 17
>>>   :h_n: 8
>>>   :m_n: 59
>>>   :END:
>>>
>>> *** test
>>> |   | day | hour | minute |
>>> |---+-----+------+--------|
>>> | # |   0 |    8 |     16 |
>>> | # |   2 |   18 |     58 |
>>> | # |   6 |   11 |     33 |
>>> | # |   3 |   13 |     36 |
>>> | # |   0 |   13 |     59 |
>>> | # |   0 |    6 |     23 |
>>> | # |  17 |    8 |     59 |
>>> #+TBLFM: @2$2='(car '$PROP_d_5)::@2$3='(car '$PROP_h_5)::@2$4='(car
>>> '$PROP_m_5)::@3$2='(car '$PROP_d_4)::@3$3='(car
>>> '$PROP_h_4)::@3$4='(car '$PROP_m_4)::@4$2='(car
>>> '$PROP_d_3)::@4$3='(car '$PROP_h_3)::@4$4='(car
>>> '$PROP_m_3)::@5$2='(car '$PROP_d_2)::@5$3='(car
>>> '$PROP_h_2)::@5$4='(car '$PROP_m_2)::@6$2='(car
>>> '$PROP_d_1)::@6$3='(car '$PROP_h_1)::@6$4='(car
>>> '$PROP_m_1)::@7$2='(car '$PROP_d_0)::@7$3='(car
>>> '$PROP_h_0)::@7$4='(car '$PROP_m_0)::@8$2='(car
>>> '$PROP_d_n)::@8$3='(car '$PROP_h_n)::@8$4='(car '$PROP_m_n)
>>>
>>> ====================
>>>
>>> Specifically, is there a better way to get at a property constant  
>>> with
>>> an elisp formula?  It seems the value is automatically put in parens
>>> such that $h_3 is (11) which is a little awkward.  On the other  
>>> hand,
>>> maybe I can use that to store a list in a property.
>>>
>>> Edd
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>>
>>
>> --
>> Carsten Dominik
>> Sterrenkundig Instituut "Anton Pannekoek"
>> Universiteit van Amsterdam
>> Kruislaan 403
>> NL-1098SJ Amsterdam
>> phone: +31 20 525 7477
>>
>>
>

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

* Re: property constants in elisp formulas
  2007-10-23  5:10     ` Carsten Dominik
@ 2007-10-23 15:06       ` Eddward DeVilla
  2007-11-01  8:36         ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Eddward DeVilla @ 2007-10-23 15:06 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode list

On 10/23/07, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> I believe you can, yes.  Why don;y you just try and watch the effect
> by turning on formula debugging?

It works now.  I just wasn't sure if it was supposed to.  cool.

> BTW, 5.13d omits the parenthesis in Lisp formula interpolation...

Great!  Thanks.  Did you notice the other two problems in my email?  I
wasn't sure if they got lost after the long example.  The underscore
in properties isn't that big of a deal, but the problem with the
formula editor is really annoying.

Edd

> - Carsten
>
> On Oct 19, 2007, at 10:32 PM, Eddward DeVilla wrote:
>
> > Now, just as a stupid question, if I put a lisp expression into a
> > property, can I use it in a formula?
> >
> > ===== sample ========
> > * top
> >   :PROPERTIES:
> >   :fives:    (0  8  16)
> >   :fours:    (2  18 58)
> >   :threes:   (6  11 33)
> >   :twos:     (3  13 36)
> >   :ones:     (0  13 59)
> >   :zeros:    (0  6  23)
> >   :null:     (17 8  59)
> >   :END:
> >
> > *** test 1
> >     |   | day | hour | minute |
> >     |---+-----+------+--------|
> >     | # |   0 |    8 |     16 |
> >     | # |   2 |   18 |     58 |
> >     | # |   6 |   11 |     33 |
> >     | # |   3 |   13 |     36 |
> >     | # |   0 |   13 |     59 |
> >     | # |   0 |    6 |     23 |
> >     | # |  17 |    8 |     59 |
> > #+TBLFM: @2$2='(car   '$PROP_fives)::@2$3='(cadr
> > '$PROP_fives)::@2$4='(caddr '$PROP_fives)::@3$2='(car
> > '$PROP_fours)::@3$3='(cadr  '$PROP_fours)::@3$4='(caddr
> > '$PROP_fours)::@4$2='(car   '$PROP_threes)::@4$3='(cadr
> > '$PROP_threes)::@4$4='(caddr '$PROP_threes)::@5$2='(car
> > '$PROP_twos)::@5$3='(cadr  '$PROP_twos)::@5$4='(caddr
> > '$PROP_twos)::@6$2='(car   '$PROP_ones)::@6$3='(cadr
> > '$PROP_ones)::@6$4='(caddr '$PROP_ones)::@7$2='(car
> > '$PROP_zeros)::@7$3='(cadr  '$PROP_zeros)::@7$4='(caddr
> > '$PROP_zeros)::@8$2='(car   '$PROP_null)::@8$3='(cadr
> > '$PROP_null)::@8$4='(caddr '$PROP_null)
> >
> > ==========================
> >
> > Also, in the above example, the property values were aligned for me.
> > In my previous example, that didn't happen.  It seems that the
> > alignment code does like underscores in names
> >
> > ===== sample ======
> > * top
> >   :PROPERTIES:
> >   :fives:    0  8  16
> >   :d_5: 0
> >   :fours:    2  18 58
> >   :END:
> >
> > =================
> >
> > Lastly, since I'm whining, there's a bug in the formula editor that
> > I'm not sure if I've mentioned before.  Edit the table below with C-c
> > '.  The '(@-I$2..$2) will become '(@-I$2..B&) which causes #ERRORs.
> >
> > ====== sample =======
> > * top
> >   :PROPERTIES:
> >   :fives:    0  8  16
> >   :fours:    2  18 58
> >   :threes:   6  11 33
> >   :twos:     3  13 36
> >   :ones:     0  13 59
> >   :zeros:    0  6  23
> >   :null:     17 8  59
> >   :END:
> >
> > *** test 2
> >     |   | day |    |
> >     |---+-----+----|
> >     | # |   0 |  0 |
> >     | # |   2 |  2 |
> >     | # |   6 |  8 |
> >     | # |   3 | 11 |
> >     | # |   0 | 11 |
> >     | # |   0 | 11 |
> >     | # |  17 | 28 |
> > #+TBLFM: $3='(apply '+ '(@-I$2..$2));N::@2$2='(car
> > '$PROP_fives)::@3$2='(car   '$PROP_fours)::@4$2='(car
> > '$PROP_threes)::@5$2='(car   '$PROP_twos)::@6$2='(car
> > '$PROP_ones)::@7$2='(car   '$PROP_zeros)::@8$2='(car   '$PROP_null)
> >
> > ====================
> >
> > Edd
> >
> > On 10/19/07, Carsten Dominik <dominik@science.uva.nl> wrote:
> >> You are right, there should be no parenthesis in Lisp interpolation.
> >> Will be fixed in 5.14.
> >>
> >> - Carsten
> >>
> >> On Oct 19, 2007, at 0:06, Eddward DeVilla wrote:
> >>
> >>> Hi,
> >>>
> >>>     Is there a better way to do this?
> >>>
> >>> ===== sample file =====
> >>> * top
> >>>   :PROPERTIES:
> >>>   :d_5: 0
> >>>   :h_5: 8
> >>>   :m_5: 16
> >>>   :d_4: 2
> >>>   :h_4: 18
> >>>   :m_4: 58
> >>>   :d_3: 6
> >>>   :h_3: 11
> >>>   :m_3: 33
> >>>   :d_2: 3
> >>>   :h_2: 13
> >>>   :m_2: 36
> >>>   :d_1: 0
> >>>   :h_1: 13
> >>>   :m_1: 59
> >>>   :d_0: 0
> >>>   :h_0: 6
> >>>   :m_0: 23
> >>>   :d_n: 17
> >>>   :h_n: 8
> >>>   :m_n: 59
> >>>   :END:
> >>>
> >>> *** test
> >>> |   | day | hour | minute |
> >>> |---+-----+------+--------|
> >>> | # |   0 |    8 |     16 |
> >>> | # |   2 |   18 |     58 |
> >>> | # |   6 |   11 |     33 |
> >>> | # |   3 |   13 |     36 |
> >>> | # |   0 |   13 |     59 |
> >>> | # |   0 |    6 |     23 |
> >>> | # |  17 |    8 |     59 |
> >>> #+TBLFM: @2$2='(car '$PROP_d_5)::@2$3='(car '$PROP_h_5)::@2$4='(car
> >>> '$PROP_m_5)::@3$2='(car '$PROP_d_4)::@3$3='(car
> >>> '$PROP_h_4)::@3$4='(car '$PROP_m_4)::@4$2='(car
> >>> '$PROP_d_3)::@4$3='(car '$PROP_h_3)::@4$4='(car
> >>> '$PROP_m_3)::@5$2='(car '$PROP_d_2)::@5$3='(car
> >>> '$PROP_h_2)::@5$4='(car '$PROP_m_2)::@6$2='(car
> >>> '$PROP_d_1)::@6$3='(car '$PROP_h_1)::@6$4='(car
> >>> '$PROP_m_1)::@7$2='(car '$PROP_d_0)::@7$3='(car
> >>> '$PROP_h_0)::@7$4='(car '$PROP_m_0)::@8$2='(car
> >>> '$PROP_d_n)::@8$3='(car '$PROP_h_n)::@8$4='(car '$PROP_m_n)
> >>>
> >>> ====================
> >>>
> >>> Specifically, is there a better way to get at a property constant
> >>> with
> >>> an elisp formula?  It seems the value is automatically put in parens
> >>> such that $h_3 is (11) which is a little awkward.  On the other
> >>> hand,
> >>> maybe I can use that to store a list in a property.
> >>>
> >>> Edd
> >>>
> >>>
> >>> _______________________________________________
> >>> Emacs-orgmode mailing list
> >>> Remember: use `Reply All' to send replies to the list.
> >>> Emacs-orgmode@gnu.org
> >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> >>>
> >>>
> >>
> >> --
> >> Carsten Dominik
> >> Sterrenkundig Instituut "Anton Pannekoek"
> >> Universiteit van Amsterdam
> >> Kruislaan 403
> >> NL-1098SJ Amsterdam
> >> phone: +31 20 525 7477
> >>
> >>
> >
>
>

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

* Re: property constants in elisp formulas
  2007-10-23 15:06       ` Eddward DeVilla
@ 2007-11-01  8:36         ` Carsten Dominik
  2007-11-03  0:37           ` Eddward DeVilla
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2007-11-01  8:36 UTC (permalink / raw)
  To: Eddward DeVilla; +Cc: org-mode list


On  23Oct2007, at 5:06 PM, Eddward DeVilla wrote:
>>> ==========================
>>>
>>> Also, in the above example, the property values were aligned for me.
>>> In my previous example, that didn't happen.  It seems that the
>>> alignment code does like underscores in names
>>>
>>> ===== sample ======
>>> * top
>>>   :PROPERTIES:
>>>   :fives:    0  8  16
>>>   :d_5: 0
>>>   :fours:    2  18 58
>>>   :END:

Fixed, thanks.
>>>
>>> Lastly, since I'm whining, there's a bug in the formula editor that
>>> I'm not sure if I've mentioned before.  Edit the table below with  
>>> C-c
>>> '.  The '(@-I$2..$2) will become '(@-I$2..B&) which causes #ERRORs.

This is the same, @-I$2..$2 is the same as @-I$2..B&

The errors are caused by interpolations: you get something like

(car '2 18 58)

which is obvioulsly a bug.  You need to enclose the properties in  
parenthesis,
or supply the parenthesis in the formula, so that interpolation will
lead to

(car '(2 18 58))


- Carsten

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

* Re: property constants in elisp formulas
  2007-11-01  8:36         ` Carsten Dominik
@ 2007-11-03  0:37           ` Eddward DeVilla
  2007-11-05 18:20             ` Eddward DeVilla
  0 siblings, 1 reply; 8+ messages in thread
From: Eddward DeVilla @ 2007-11-03  0:37 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode list

On 11/1/07, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> >>>
> >>> Lastly, since I'm whining, there's a bug in the formula editor that
> >>> I'm not sure if I've mentioned before.  Edit the table below with
> >>> C-c
> >>> '.  The '(@-I$2..$2) will become '(@-I$2..B&) which causes #ERRORs.
>
> This is the same, @-I$2..$2 is the same as @-I$2..B&
>
> The errors are caused by interpolations: you get something like
>
> (car '2 18 58)
>
> which is obvioulsly a bug.  You need to enclose the properties in
> parenthesis,
> or supply the parenthesis in the formula, so that interpolation will
> lead to
>
> (car '(2 18 58))

Actually, that wasn't what I was seeing.  In the table formula editor
it highlight the region represented by @-I$2..B& as though it were
@-I$2..$3.  I'll have to see if I can put together a better recreate.
I have this happen on my machine at work, but it's not happening not
at home.  Sorry.

Edd

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

* Re: property constants in elisp formulas
  2007-11-03  0:37           ` Eddward DeVilla
@ 2007-11-05 18:20             ` Eddward DeVilla
  0 siblings, 0 replies; 8+ messages in thread
From: Eddward DeVilla @ 2007-11-05 18:20 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode list

On 11/2/07, Eddward DeVilla <eddward@gmail.com> wrote:
> On 11/1/07, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> > >>>
> > >>> Lastly, since I'm whining, there's a bug in the formula editor that
> > >>> I'm not sure if I've mentioned before.  Edit the table below with
> > >>> C-c
> > >>> '.  The '(@-I$2..$2) will become '(@-I$2..B&) which causes #ERRORs.
> >
> > This is the same, @-I$2..$2 is the same as @-I$2..B&
> >
> > The errors are caused by interpolations: you get something like
> >
> > (car '2 18 58)
> >
> > which is obvioulsly a bug.  You need to enclose the properties in
> > parenthesis,
> > or supply the parenthesis in the formula, so that interpolation will
> > lead to
> >
> > (car '(2 18 58))
>
> Actually, that wasn't what I was seeing.  In the table formula editor
> it highlight the region represented by @-I$2..B& as though it were
> @-I$2..$3.  I'll have to see if I can put together a better recreate.
> I have this happen on my machine at work, but it's not happening not
> at home.  Sorry.

OK.  My fault.  I had an old version of org at work.  This has already
been fixed.

Edd

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

end of thread, other threads:[~2007-11-05 18:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18 22:06 property constants in elisp formulas Eddward DeVilla
2007-10-19 16:11 ` Carsten Dominik
2007-10-19 20:32   ` Eddward DeVilla
2007-10-23  5:10     ` Carsten Dominik
2007-10-23 15:06       ` Eddward DeVilla
2007-11-01  8:36         ` Carsten Dominik
2007-11-03  0:37           ` Eddward DeVilla
2007-11-05 18:20             ` Eddward DeVilla

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