Re: [O] [PATCH] Lookup functions, take two

2012-09-26 Thread Jarmo Hurri
Bastien writes: > There was a typo, I attach the correct patch. Thanks! [A lot of good info snipped.] While you're waiting for my assignment papers, I will look into this and try to make everybody happy. Have fun. -- Jarmo

Re: [O] [PATCH] Lookup functions, take two

2012-09-26 Thread Bastien
Hi Jarmo, Jarmo Hurri writes: > I have nothing against the idea. However, I get only errors when I try > to apply your functions in my examples. I can track down the source of > the problems later (not today, though). There was a typo, I attach the correct patch. > But how about combining your

Re: [O] [PATCH] Lookup functions, take two

2012-09-26 Thread Jarmo Hurri
Bastien writes: > I suggest using this code: > > ... > > Less dense and elegant, of course, but more explicit. Users will be > able to check the docstring of org-lookup-first/last, which I think is > good for functions that we advertize in the manual. > > Jarmo, would you be okay if I commit thi

Re: [O] [PATCH] Lookup functions, take two

2012-09-26 Thread Bastien
Hi Jarmo, Jarmo Hurri writes: >> Jarmo, would you be okay reworking the patch with these directions? > > Will do that. Thanks! (If you don't mind, please use the equivalent code I sent yesterday.) > I assume that by "Elisp manuals" you mean org.texi? I mean the GNU Elisp manuals in genera

Re: [O] [PATCH] Lookup functions, take two

2012-09-26 Thread Jarmo Hurri
Bastien writes: > "Dominik, Carsten" writes: >> The documentation should be kept as compact as possible, I think without an >> example, just describe the functionality. Maybe Jarmo can write a little >> tutorial for Worg and document it there more extensively? > > Jarmo, would you be okay rewor

Re: [O] [PATCH] Lookup functions, take two

2012-09-25 Thread Bastien
Achim Gratz writes: > You could ask on the Emacs devel list if that'd be OK. I suggest using this code: (defun org-lookup (val s-list r-list lastp &optional predicate) "Look for VAL in S-LIST and return the corresponding element in R-LIST. If LASTP, ignore all matching VAL in SEARCH-LIST exce

Re: [O] [PATCH] Lookup functions, take two

2012-09-25 Thread Achim Gratz
Jarmo Hurri writes: > Also made org-table.el (require 'cl) in general, not only compile time, > because there was a warning of it being required at runtime, but there > is still a warning at compile time. Seemed like a reasonable thing to > do, although given the discussion on possible namespace cl

Re: [O] [PATCH] Lookup functions, take two

2012-09-25 Thread Bastien
Jarmo Hurri writes: > So if it does not fit the core, where should I add it so that the users > will still find it? I think that in general it is a very good idea to > have powerful tables in org. Right? Right :) > Many users in the land of spreadsheet programs have gotten used to these > funct

Re: [O] [PATCH] Lookup functions, take two

2012-09-25 Thread Bastien
Hi Carsten, "Dominik, Carsten" writes: > since you copied me, I guess you want my comment? yes, sorry for requesting this implicitely. > I think this is very useful functionality and I would vote for putting > it into the core. Okay, thanks. > The documentation should be kept as compact as p

Re: [O] [PATCH] Lookup functions, take two

2012-09-25 Thread Dominik, Carsten
Hi Bastien, since you copied me, I guess you want my comment? I think this is very useful functionality and I would vote for putting it into the core. The documentation should be kept as compact as possible, I think without an example, just describe the functionality. Maybe Jarmo can write a l

Re: [O] [PATCH] Lookup functions, take two

2012-09-24 Thread Jarmo Hurri
> It is a nice spreadsheet utility function but my feeling is that > having it in Org's core does not really fit, as it introduces > functions where we usually have references. Functions are fine for > users to add, though, that's the whole point of allowing Elisp in > table formulas. So if it d

Re: [O] [PATCH] Lookup functions, take two

2012-09-24 Thread Bastien
Hi Jarmo, thanks for the explanations -- I should I've read your doc patch more closely. It is a nice spreadsheet utility function but my feeling is that having it in Org's core does not really fit, as it introduces functions where we usually have references. Functions are fine for users to ad

Re: [O] [PATCH] Lookup functions, take two

2012-09-24 Thread Jarmo Hurri
Bastien writes: > I feel my brain is a bit slow today... so sorry in advance if the > question sounds stupid. What is the advantage of using org-lookup-* > functions instead of a simple reference in the table formulas? As noted in the documentation, most often you do something like this when f

Re: [O] [PATCH] Lookup functions, take two

2012-09-24 Thread Bastien
Hi Jarmo, Jarmo Hurri writes: > Modified the patch as requested: the ordering in the documentation is > now "Column formulas" before the new "Lookup functions". I feel my brain is a bit slow today... so sorry in advance if the question sounds stupid. What is the advantage of using org-lookup-*

[O] [PATCH] Lookup functions, take two

2012-09-23 Thread Jarmo Hurri
Greetings. Modified the patch as requested: the ordering in the documentation is now "Column formulas" before the new "Lookup functions". Also made org-table.el (require 'cl) in general, not only compile time, because there was a warning of it being required at runtime, but there is still a warn