# -*- mode: rec -*-
#
# TODO file for GNU recutils.
#
# Please execute ./tasktool --help
#
# Contact bug-recutils@gnu.org for any question or request concerning
# this file.

%rec: Task
%key: Id
%mandatory: Summary Status Category
%type: Id int
%type: Summary line
%type: Type enum
+ task
%type: Status enum 
+ TODO NEXT STARTED WAITING
+ DONE SOMEDAY DISCARDED
%type: Category enum
+ librec utils doc rec-mode torture tasktool
%type: Originator,AssignedTo email
%type: CreatedAt,ClosedAt date

Id: 1
Summary: Make rec_db_t smarter.
Category: librec
CreatedAt: Sat Nov  6 11:13:36 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
Description: The rec_db_t abstract data type could benefit of some obvious
+ optimizations that are not yet in place. Currently it loads all the
+ record sets found in the input file. It shall be possible to load
+ record sets on demand instead, so the typical recsel usage on a
+ concrete record type won't be loading all other record sets.

Id: 2
Summary: Optimize rec_sex_eval.
Category: librec
CreatedAt: Sat Nov  6 11:15:06 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
Description: There is an obvious optimization in the SEX evaluator that is not yet
+ in place: don't evaluate permuted records if the changed field is not
+ present in the expression.
+ 
+ See the comment in 'rec_sex_eval' in rec-sex.c

Id: 3
Summary: Write unit tests for rec_field.
Category: torture
CreatedAt: Sat Nov  6 11:19:55 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE

Id: 4
Summary: Write unit tests for rec_record.
Category: torture
CreatedAt: Sat Nov  6 11:22:07 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO

Id: 5
Summary: Write unit tests for rec_rset.
Category: torture
CreatedAt: Sat Nov  6 11:22:40 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO

Id: 6
Summary: Write unit tests for rec_db.
Category: torture
CreatedAt: Sat Nov  6 11:22:48 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO

Id: 7
Summary: Write unit tests for rec_int.
Category: torture
CreatedAt: Sat Nov  6 11:22:57 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO

Id: 8
Summary: Write unit tests for rec_parser.
Category: torture
CreatedAt: Sat Nov  6 11:23:03 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE

Id: 9
Summary: Write unit tests for rec_fex.
Category: torture
CreatedAt: Sat Nov  6 11:23:12 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE

Id: 10
Summary: Write unit tests for rec_writer.
Category: torture
CreatedAt: Sat Nov  6 11:23:21 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE

Id: 11
Summary: Write unit tests for rec_sex.
Category: torture
CreatedAt: Sat Nov  6 11:23:29 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE

Id: 12
Summary: Improve error reporting with invalid %type fields.
Category: librec
CreatedAt: Sat Nov  6 11:43:25 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: The error reporting on type definitions in %type fields is not very
+ good. An error reporting mechanism should be implemented in the
+ rec_type_new function. Maybe an I/O stream.

Id: 13
Summary: Check the return value of all system calls.
Category: librec
Category: utils
CreatedAt: Sat Nov  6 11:44:38 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
Description: There are some unchecked malloc() calls in both the library and the
+ utilities. Any system call shall have its return value checked.
Note: Sat Nov  6 11:44:49 CET 2010
+ 
+ The 'malloc' cases are done, but it would be better to use the gnulib
+ xmalloc module in the utilities.
Note: Sat Nov  6 11:45:14 CET 2010
+ 
+ The code of the utilities are now using xmalloc and xstrdup.

Id: 14
Summary: Fix rec-finish-editing in rec-mode.el.
Category: rec-mode
CreatedAt: Sun Nov  7 14:46:14 CET 2010
AssignedTo: jemarch@gnu.org
Status: TODO
Description: When opening a file foo.rec with the following contents:
+ 
+ -- begin of file
+ baz: val1
+ 
+ %rec: type1
+ 
+ foo: val1
+ 
+ foo: val2
+ 
+ foo: val3
+ 
+ %rec: type2
+ 
+ jo: ja
+ 
+ bar: val2
+ 
+ bar: val3
+ 
+ -- end of file
+ 
+ An error makes rec-mode to be in a "showing task" state.  There we can
+ press B and then C-cC-c.  We get an error:
+ 
+ Wrong type argument: number-or-marker-p, nil

Id: 15
Summary: Make rec-mode to honour the external descriptors.
Category: rec-mode
CreatedAt: Sun Nov  7 14:57:22 CET 2010
AssignedTo: jemarch@gnu.org
Status: TODO

Id: 16
Summary: Implement %fsort.
Category: librec
CreatedAt: Sun Nov  7 20:26:41 CET 2010
AssignedTo: jemarch@gnu.org
Status: DISCARDED
Description: The %fsort special field specifies the desired order of the fields
+ of records.  For example:
+ 
+ %rec: Employee
+ %fsort: Id,Name,Surname,Department
+ 
+ Determines the desired order for the fields of Employees.  Not any
+ field used in records of type Employee shall be specified in the
+ %fsort field.  The desired position for non explicitly mentioned
+ fields is at the end of the record.
Note: Tue Dec 20 17:23:43 CET 2011
+ Task resolved to 'DISCARDED'.
+ 
+ Probably not needed.
ClosedAt: Tue Dec 20 17:23:43 CET 2011

Id: 17
Summary: Make tasktool to reuse ChangeLog entries with the same date.
Category: tasktool
CreatedAt: Sun Nov  7 20:29:03 CET 2010
AssignedTo: jemarch@gnu.org
Status: TODO

Id: 18
Summary: Allow the usage of field lists in type declarations.
Category: librec
CreatedAt: Sun Nov  7 20:53:59 CET 2010
ClosedAt: Thu Nov 25 17:25:26 CET 2010
AssignedTo: jemarch@gnu.org
Status: DONE
Description: It is possible to specify more than one field name in type
+ declarations.  All the fields having that name will share the same
+ type.  For example:
+ 
+ @example
+ %type: Width,Height real
+ @end example

Id: 19
Summary: Fix over sized synopsis lines in the PDF manual.
Category: doc
CreatedAt: Mon Nov  8 11:36:58 CET 2010
Originator: Ralf.Wildenhues@gmx.de
AssignedTo: jemarch@gnu.org
Status: DONE
Description: @node recsel Invocation contains an overlong synopsis line in the PDF
+ output.
+ 
+ The problem may be present in the postscript and dvi output as well.
Note: Tue Nov 30 16:30:10 CET 2010
+ Task resolved to 'DONE'.
+ 
+ Fixed in a previous patch by Ralf Wildenhues.
ClosedAt: Tue Nov 30 16:30:10 CET 2010

Id: 20
Summary: Implement %sort.
Category: librec
CreatedAt: Mon Nov  8 12:57:20 CET 2010
AssignedTo: jemarch@gnu.org
Status: DONE
Description: Sorting of records in the described record set.  Usage:
+ 
+    %sort: FIELD_NAME
+ 
+ Just a single field name is supported.
Note: Tue Dec 20 17:18:22 CET 2011
+ Task resolved to 'DONE'.
+ 
ClosedAt: Tue Dec 20 17:18:22 CET 2011

Id: 21
Summary: Support maximum width in output in recsel.
Category: librec
Category: utils
CreatedAt: Fri Nov 19 19:13:29 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
Description: The w option shall be implemented in recsel:
+ 
+  -w,--width           maximum length (in characters) of values in
+                         the output.
+ 
+ Example:
+ 
+   $ echo "foo: 0123456789" | recsel -w 5
+   foo: 01234+   56789

Id: 22
Summary: Support external non-remote descriptors.
Category: librec
CreatedAt: Sat Nov 20 22:54:09 CET 2010
ClosedAt: Sat Nov 27 10:38:50 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: It shall be possible to use external desciptors not requiring a
+ URL.  External descriptions can then be non-remote.  Example:
+ 
+    %rec: foo /path/to/file
+ 
+ Compilation options shall be provided to disable the usage of libcurl.

Id: 23
Summary: Support renaming of fields in recset.
Category: librec
CreatedAt: Tue Nov 23 22:45:08 CET 2010
ClosedAt: Thu Nov 25 17:23:28 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: The recset utility shall support the -r option:
+ 
+   $ recset -n 0 -f field -r newname
+ 
+ that will rename the field field into newname in matching records.

Id: 24
Summary: Configuration file for tasktool.
Category: tasktool
CreatedAt: Wed Dec  1 18:03:14 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
Description: 
+ The tasktool script can use a configuration file to store some default
+ values and other information, such as teh name of the user and her
+ email.  The originator of newly created tasks, for example, would
+ default to that email address.
+ 
+ The format used to store the configuration file can be a recfile
+ (surprise! :D):
+ 
+    User: Jose E. Marchesi
+    Email: jemarch@gnu.org
+    # ... more configuration.
+ 
+ A new subcommand 'hello' can then be used to get introduced to
+ tasktool:
+ 
+    $ ./tasktool hello
+    Hello! my name is tasktool.
+    What is your name?: 
+    What is your email?:
+    ... and so on.
+ 
+ or non-interactively:
+ 
+    $ ./tasktool hello 'Jose E. Marchesi' jemarch@gnu.org
+ 
+ Whatever.
Note: Tue Dec 20 17:24:54 CET 2011
+ 
+ The configuration file must be ignored by the vcs.

Id: 25
Summary: Support for %size
Category: librec
CreatedAt: Wed Dec  1 18:51:23 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: 
+ %size fields can be used to define the minimum and the maximum
+ number of records that should exist in a record set.
+ 
+ Example:
+ 
+    %rec: TasktoolControl
+    %size: 1
+ 
+ The previous example requires the existence of one (and only one)
+ TasktoolControl record.
Note: Tue May 10 16:44:52 CEST 2011
+ Task resolved to 'DONE'.
+ 
+ Already implemented.
ClosedAt: Tue May 10 16:44:52 CEST 2011

Id: 26
Summary: rec_init shall build a list of predefined field names.
Category: librec
CreatedAt: Wed Dec  1 22:32:43 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: 
+ The librec codebase is full of places where some predefined field
+ name, such as '%rec' or '%type', is used.  In that case the following
+ sequence is used:
+ 
+        rec_fname = rec_parse_field_name_str ("%rec");
+ 
+        /* ... use it.  */
+ 
+        rec_field_name_destroy (rec_fname);
+ 
+ The idiom above is dangeous and undesirable because:
+ 
+ 1. It is prone to generate memory leaks.
+ 2. It is slow.
+ 3. If we wanted to change a predefined field we would need to change
+    all its appareances.
+ 
+ A solution could be to make 'rec_init' to create a list of predefined
+ field names and 'rec_fini' to destroy them.
ClosedAt: Tue Dec 20 17:19:58 CET 2011

Id: 27
Summary: tasktool list shall list assigned tasks by default.
Category: tasktool
CreatedAt: Wed Dec  1 22:36:50 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
Description: 
+ This would require the availability of the configuration file to
+ determine the user's email address.
+ 
+ See task 24.

Id: 28
Summary: support categories in tasktool.
Category: tasktool
CreatedAt: Wed Dec  1 22:38:35 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: 
+ Subcommands that need to be aware of categories:
+ 
+ - create: option to specify the category, otherwise ask.
+ - list: option to filter by category.
Note: Fri Dec 10 16:27:21 CET 2010
+ Task resolved to 'DONE'.
+ 
+ Command line option -c|--category added to the "list" subcommand.
ClosedAt: Fri Dec 10 16:27:21 CET 2010

Id: 29
Summary: Support set-or-add -S option in recset.
Category: utils
CreatedAt: Wed Dec  1 22:55:06 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: 
+ This option:
+ 
+   $ recset -f foo -S bar
+ 
+ would set the value of the fields named 'foo' in records to 'bar'.  If
+ no field named 'foo' is found in a record, one is created with the
+ given value.
ClosedAt: Fri Jan 14 20:45:58 CET 2011

Id: 30
Summary: Do not use open_memstream and fmemopen.
Category: librec
Category: torture
Category: utils
CreatedAt: Sat Dec  4 20:50:55 CET 2010
Originator: bruno@clisp.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: 
+ open_memstream and fmemopen are not portable.  Information sent by
+ Bruno Haible to the development mailing list:
+ 
+ libtool: link: gcc -Wall -fno-strict-aliasing -g -O2 -o .libs/recinf recutl.o recinf.o  ../lib/.libs/libgnu.a -L/Users/bruno/data/local-macos/lib ../src/.libs/librec.dylib /Users/bruno/data/local-macos/lib/libintl.dylib /Users/bruno/data/local-macos/lib/libiconv.dylib -lc -lcurl
+ Undefined symbols:
+   "_open_memstream", referenced from:
+       _recutl_eval_field_expression in recutl.o
+ ld: symbol(s) not found
+ collect2: ld returned 1 exit status
+ make[1]: *** [recinf] Error 1
+ make: *** [all-recursive] Error 1
+ 
+ This is because the function open_memstream(), and also fmemopen()
+ which is used in rec-parser.c, exist only on glibc, Cygwin 1.7, and
+ AIX 7.1:
+ 
+ $ ./show-portability open_memstream
+ libc                aix-7.1.0
+ libc                cygwin-1.7
+ libc                glibc-2.3.6
+ MISSING in          aix-4.3.2 aix-5.1.0 aix-5.2.0 aix-5.3.0a aix-6.1.0 beos cygwin-1.5 freebsd-5.2.1 freebsd-6.0 freebsd-6.4 hpux-10.20 hpux-11.00 hpux-11.11 hpux-11.23 hpux-11.31 interix-3.5 irix-5.3 irix-6.5 macosx-10.3 macosx-10.4 macosx-10.5 mingw netbsd-3.0 netbsd-5.0.1 netbsd-5.0 nsk-G06 openbsd-3.8 osf1-4.0d osf1-5.1a pips solaris-2.10 solaris-2.11_2010_11 solaris-2.4 solaris-2.5.1 solaris-2.6 solaris-2.7 solaris-2.8 solaris-2.9
+ 
+ $ ./show-portability fmemopen
+ libc                aix-7.1.0
+ libc                cygwin-1.7
+ libc                glibc-2.3.6
+ MISSING in          aix-4.3.2 aix-5.1.0 aix-5.2.0 aix-5.3.0a aix-6.1.0 beos cygwin-1.5 freebsd-5.2.1 freebsd-6.0 freebsd-6.4 hpux-10.20 hpux-11.00 hpux-11.11 hpux-11.23 hpux-11.31 interix-3.5 irix-5.3 irix-6.5 macosx-10.3 macosx-10.4 macosx-10.5 mingw netbsd-3.0 netbsd-5.0.1 netbsd-5.0 nsk-G06 openbsd-3.8 osf1-4.0d osf1-5.1a pips solaris-2.10 solaris-2.11_2010_11 solaris-2.4 solaris-2.5.1 solaris-2.6 solaris-2.7 solaris-2.8 solaris-2.9
+ 
+ See also the gnulib documentation:
+ http://www.gnu.org/software/gnulib/manual/html_node/open_005fmemstream.html
+ http://www.gnu.org/software/gnulib/manual/html_node/fmemopen.html
+ 
+ And no, gnulib cannot create a replacement for these functions,
+ because the 'FILE' type is simply not extensible and the stream
+ functions are hardcoded in many systems.
+ 
+ For open_memstream(), how about using an explicit in-memory buffer,
+ that is grown through x2nrealloc when needed?
+ 
+ For fmemopen(), I would suggest to change the rec_parser_s type so
+ that it contains a FILE * for reading from a file and a 'const char
+ *buf; const char *bufend;' for reading from a buffer in memory.
Note: Tue Dec 14 22:13:25 CET 2010
+ 
+ The library (and associated tests) has been modified to not use
+ fmemopen.  The parser now supports a buffer-backed operation mode.
+ The implementations of the rec_parse_xxx_str functions have been
+ modified to use the new kind of parsers instead of the non-portable
+ construction.
ClosedAt: Sat Dec 18 12:22:55 CET 2010

Id: 34
Summary: Embed a copy of libcsv in the sources tree.
Category: librec
CreatedAt: Thu Dec 16 19:39:19 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: 
+ The libcsv library (available in http://libcsv.sf.net) is composed by
+ a single header file and a source file.  It is licensed under the
+ LGPLv2.1+.
ClosedAt: Thu Dec 16 23:12:20 CET 2010

Id: 35
Summary: Support escaped characters in string literals.
Category: librec
CreatedAt: Tue May 10 16:49:10 CEST 2011
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: DONE
Description: The string literals supported in the selection expressions are not
+ supporting the escaping of characters, thus having to provide a real
+ newline character or tab character in order to have them included in
+ the value of the literal.
+ 
+ C-style scaped characters shall be supported in string literals.  An
+ initial list of supported characters is:
+ 
+   - \n   for newline.
+   - \t   for tab.
+   - \NNN for any ASCII character whose code is encoded in octal in NNN.
ClosedAt: Tue Dec 20 17:20:15 CET 2011

%rec: TasktoolControl
%type: NextFreeId int
%mandatory: NextFreeId
%unique: NextFreeId

NextFreeId: 36

# End of TODO
