Mathieu Lirzin (2015-08-28 00:04 +0300) wrote: > l...@gnu.org (Ludovic Courtès) writes: > >> With Benno being OK, we should start looking at implementing the change. >> The various parts that I can think of are: >> >> • Having a ‘package-description-string’ procedure that would return >> the description rendered as a string, using the (stexi) modules. >> >> • ‘--search’ could use the raw description (including markup). >> However, ‘package->recutils’ must use ‘package-description-string’ >> or similar. > > Here is a first attempt. It doesn't feel right to me but fornow I don't > know what to do without duplicating code or reorganizing the world. The > problem is that translations are handle in (guix ui) so we need to > regenerate texi->plain-text.
I don't understand what you mean by 'regenerate texi->plain-text'. > - (define (description->recutils str) > - (let ((str (P_ str))) > + (define (description->recutils str) > + (let ((str (texi->plain-text (P_ str)))) IIUC there is no need to use 'texi->plain-text' here. Instead you can replace 'package-description' with 'package-description-string' in the body of 'package->recutils'. Or did I miss anything? Also I think the same replacement should be done in (guix scripts lint) and (guix scripts package). The rest looks absolutely fine for me. -- Alex