Quick note to Simon: this issue is now fixed in master.

-Steve


On 9 May 2014, at 20:28, Steve Purcell <[email protected]> wrote:

> I think the following versions do pretty much the same thing with a bit less 
> mystery, if I'm understanding things correctly:
> 
> 
> (defun ledger-line-regex (elements)
>   (mapconcat (lambda (e)
>                (symbol-value
>                 (intern
>                  (concat "ledger-" (symbol-name e) "-string"))))
>              elements
>              "[ \t]*$"))
> 
> (defmacro ledger-single-line-config (&rest elements)
>   "Take list of ELEMENTS and return regex and element list for use in 
> context-at-point"
>   (let ((regex (ledger-line-regex elements)))
>     `(list ,regex (quote ,elements))))
> 
> 
> And ledger-single-line-config2 would also need a tweak.
> 
> -Steve
> 
> 
> On 9 May 2014, at 20:08, Steve Purcell <[email protected]> wrote:
> 
>> And who could blame you? :-)
>> 
>> -Steve
>> 
>> 
>> On 9 May 2014, at 20:04, Craig Earls <[email protected]> wrote:
>> 
>>> I was probably reveling in lispish macro nirvana when I wrote it. 
>>> --
>>> Craig
>>> 
>>> 
>>> On Fri, May 9, 2014 at 12:02 PM, Steve Purcell <[email protected]> wrote:
>>> 
>>> I don't think it's related to that change. Looks like a problem in 
>>> ledger-context.el expanding the ledger-single-line-config macro, which 
>>> evals the ledger-line-regex macro in an unusual way. Guessing there's an 
>>> easier version of that code waiting to get out.
>>> 
>>> 
>>> https://github.com/ledger/ledger/blob/master/lisp/ledger-context.el#L67
>>> 
>>> -Steve
>>> 
>>> 
>>> 
>>> On 9 May 2014, at 19:16, Craig Earls <[email protected]> wrote:
>>> 
>>>> I will look into it. Someone recently "made the regex better".  I tested 
>>>> it but didn't byte compile.  
>>>> --
>>>> Craig
>>>> 
>>>> 
>>>> On Fri, May 9, 2014 at 11:14 AM, Simon Michael <[email protected]> wrote:
>>>> 
>>>> Hi Craig, 
>>>> 
>>>> forgive me, I'm not up for Bugzilla right now: byte-compiling latest 
>>>> ledger-mode's *.el is failing here with: 
>>>> 
>>>> ledger-context.el:70:1:Error: Symbol's function definition is void: 
>>>> ledger-line-regex 
>>>> 
>>>> I'm not sure why. 
>>>> 
>>>> -- 
>>>> 
>>>> --- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Ledger" group. 
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to [email protected]. 
>>>> For more options, visit https://groups.google.com/d/optout. 
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>> 
>>>> --- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Ledger" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> 
>>> -- 
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Ledger" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> 
>>> 
>>> -- 
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Ledger" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ledger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to