Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Hello, Achim Gratz strom...@nexgo.de writes: Nicolas Goaziou n.goaz...@gmail.com writes: I don't see what is clumsy with affiliated keywords. Well, you write the arguments before starting the source block, getting everything wardbacks (and I don't think that's easier to parse, but you would know better(*)). I think you're mixing src blocks and Babel. A src block contains, fontifies and allows to edit source code. Babel arguments (or caption, or name) are meta-data that applies to the whole src block element, not to its contents. Last but not least I can never remember if any of the #+ stuff is supposed to end with a : Affiliated keywords all do. If one doesn't, it's a bug. and whether it wants another : in front of the arguments or not. That's another topic, and I agree that, at one point or another, we'll have to unify the way parameters are written. IMO, Babel usage is a good standard. (*) Reminds me I'll have to try what happens if I write header arguments that are detached from the source block. Devious, I know, but the manual does not really specify anything. But Org elements does. Affiliated keywords must be attached to their relative element. If you look carefully, that source block above does not contain a drawer. It has a (hypothetical) associated multiline header argument that happens to look and feel like a drawer. Then it's a duck. Though, drawers can contain src-blocks. Is there any specification that they must fully contain them? You may want to read comments in org-element.el. I also posted some explanations when I announced the library. Anyway, that was just an idea and if nobody likes it, that's fine with me, too. I just wanted to let you know that the idea of putting quasi-drawers within a src-block is against the model described by the current parser. Regards, -- Nicolas Goaziou
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Bastien b...@altern.org writes: #+begin_tblfm ... ... #+end_tblfm That has other problems I think. The idea is that the formulas are out of sight until you need them and so that block would need to be special w.r.t. visibility. Although if the #+TBLFM: content can be hidden by default, as Carsten hinted at, then everything else could easily stay as it is. Maybe even jump directly to the formula edit buffer with TAB if the user wants this to happen. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
[O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Hi all, I wrote a new tutorial on using Emacs lisp for Org spreadsheet formulas: http://orgmode.org/worg/org-tutorials/org-spreadsheet-lisp-formulas.html Enjoy, -- Bastien
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Bastien b...@altern.org writes: http://orgmode.org/worg/org-tutorials/org-spreadsheet-lisp-formulas.html Great. Now, I've long wished that instead of cramming these increasingly long formulas into that single #+TBLFM line one could have a :TBLFM: drawer and put it there on multiple lines and perhaps even with comments. How awesome would that be? :-) Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Hello, Achim Gratz strom...@nexgo.de writes: Now, I've long wished that instead of cramming these increasingly long formulas into that single #+TBLFM line one could have a :TBLFM: drawer and put it there on multiple lines and perhaps even with comments. How awesome would that be? :-) Multiple #+tblfm: lines would certainly be useful, as there already is multiple #+header: lines. Though, a table and a drawer are different elements. Affiliated keywords shouldn't be separated from the element they belong. Regards, -- Nicolas Goaziou
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Achim Gratz strom...@nexgo.de writes: I don't see what is clumsy with affiliated keywords. #+BEGIN_SRC emacs_lisp :+HEADERS: :var data1=1 :var data2=2 :END: (message data1:%S, data2:%S data1 data2) #END_SRC Src-blocks are elements. As such, they can't contain drawers. Though, drawers can contain src-blocks. Regards, -- Nicolas Goaziou
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
On 31.1.2012, at 19:33, Achim Gratz wrote: Bastien b...@altern.org writes: http://orgmode.org/worg/org-tutorials/org-spreadsheet-lisp-formulas.html Great. Now, I've long wished that instead of cramming these increasingly long formulas into that single #+TBLFM line one could have a :TBLFM: drawer and put it there on multiple lines and perhaps even with comments. How awesome would that be? :-) Bastien already mentions that you can use C-c ' to edit the formulas. What is less well known is that if you press TAB in one of those formulas in the formula editor, the list form is pretty-printed - this goes a long way for readability and editability. - Carsten Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
If multiple #+TBLFM: lines do ever get into legal org-mode syntax I think it will be a good idea to put an integer number inside the #+TBLFM: label so that org-mode can know in what order to use each of those lines. On Tue, 31 Jan 2012, Nicolas Goaziou wrote: Hello, Achim Gratz strom...@nexgo.de writes: Now, I've long wished that instead of cramming these increasingly long formulas into that single #+TBLFM line one could have a :TBLFM: drawer and put it there on multiple lines and perhaps even with comments. How awesome would that be? :-) Multiple #+tblfm: lines would certainly be useful, as there already is multiple #+header: lines. Though, a table and a drawer are different elements. Affiliated keywords shouldn't be separated from the element they belong. Regards, Jude jdashiel-at-shellworld-dot-net http://www.shellworld.net/~jdashiel/nj.html
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Nicolas Goaziou n.goaz...@gmail.com writes: I don't see what is clumsy with affiliated keywords. Well, you write the arguments before starting the source block, getting everything wardbacks (and I don't think that's easier to parse, but you would know better(*)). Then there is the verbosity of the headers themselves, but that's an argument based on aesthetics. Last but not least I can never remember if any of the #+ stuff is supposed to end with a : and whether it wants another : in front of the arguments or not. (*) Reminds me I'll have to try what happens if I write header arguments that are detached from the source block. Devious, I know, but the manual does not really specify anything. #+BEGIN_SRC emacs_lisp :+HEADERS: :var data1=1 :var data2=2 :END: (message data1:%S, data2:%S data1 data2) #END_SRC Src-blocks are elements. As such, they can't contain drawers. If you look carefully, that source block above does not contain a drawer. It has a (hypothetical) associated multiline header argument that happens to look and feel like a drawer. Though, drawers can contain src-blocks. Is there any specification that they must fully contain them? Anyway, that was just an idea and if nobody likes it, that's fine with me, too. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Carsten Dominik carsten.domi...@gmail.com writes: Bastien already mentions that you can use C-c ' to edit the formulas. What is less well known is that if you press TAB in one of those formulas in the formula editor, the list form is pretty-printed - this goes a long way for readability and editability. Indeed I did not know that, thanks for mentioning. But I'm just as concerned about the look of that line when browsing the document and the pretty-printing for edit doesn't help with that. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptation for Waldorf Blofeld V1.15B11: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
On 1.2.2012, at 07:37, Achim Gratz wrote: Carsten Dominik carsten.domi...@gmail.com writes: Bastien already mentions that you can use C-c ' to edit the formulas. What is less well known is that if you press TAB in one of those formulas in the formula editor, the list form is pretty-printed - this goes a long way for readability and editability. Indeed I did not know that, thanks for mentioning. But I'm just as concerned about the look of that line when browsing the document and the pretty-printing for edit doesn't help with that. The line is really not meant for looking nice in the buffer. maybe we should have an option for making (much of it) invisible. I don't really mind, because I always work with truncate-line set to t, so the line never bothers me. - Carsten Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptation for Waldorf Blofeld V1.15B11: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Achim Gratz strom...@nexgo.de writes: But I'm just as concerned about the look of that line when browsing the document and the pretty-printing for edit doesn't help with that. What about #+begin_tblfm ... ... #+end_tblfm ? -- Bastien
Re: [O] New tutorial on using Emacs lisp for Org spreadsheet formulas
Hi Carsten, Carsten Dominik carsten.domi...@gmail.com writes: Bastien already mentions that you can use C-c ' to edit the formulas. What is less well known is that if you press TAB in one of those formulas in the formula editor, the list form is pretty-printed - this goes a long way for readability and editability. I forgot to mention this because... I just discovered it :) I added a note in this turorial about TAB in the formulas editor. That's what I like about writing tutorials: that's the best way to teach yourself something new! Thanks, -- Bastien