# -*- mode: rec -*-
#
# TODO file for GNU recutils.
#
# Please contact bug-recutils@gnu.org for any question or
# request concerning this file.

%rec: Task
%key: Id
%mandatory: Summary Status
%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
%type: Originator,AssignedTo email
%type: CreatedAt,ClosedAt date

Id: 1
Summary: Make rec_db_t smarter.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
CreatedAt: Sun Nov  7 14:57:22 CET 2010
AssignedTo: jemarch@gnu.org
Status: TODO

Id: 16
Summary: Implement %fsort.
CreatedAt: Sun Nov  7 20:26:41 CET 2010
AssignedTo: jemarch@gnu.org
Status: TODO
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.

Id: 17
Summary: Make tasktool to reuse ChangeLog entries with the same date.
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.
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.
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.
CreatedAt: Mon Nov  8 12:57:20 CET 2010
AssignedTo: jemarch@gnu.org
Status: TODO
Description: Sorting of records in the described record set.  Usage:
+ 
+    %sort: FIELD_NAME
+ 
+ Just a single field name is supported.

Id: 21
Summary: Support maximum width in output in recsel.
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.
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.
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.
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.

Id: 25
Summary: Support for %size, %max-size and %min-size special fields.
CreatedAt: Wed Dec  1 18:51:23 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
Description: 
+ %size, %max-size and %min-size special fields can be used to define
+ the minimum and the maximum number of records that should exist in a
+ record set.
+ 
+ Example:
+ 
+    %rec: TasktoolControl
+    %min-size: 1
+    %max-size: 1
+ 
+ that is equivalent to
+ 
+    %rec: TasktoolControl
+    %size: 1
+ 
+ The previous example requires the existence of one (and only one)
+ TasktoolControl record.
+ 
+ Note that %size is not compatible with %max-size or %min-size.

Id: 26
Summary: rec_init shall build a list of predefined field names.
CreatedAt: Wed Dec  1 22:32:43 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
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.

Id: 27
Summary: tasktool list shall list assigned tasks by default.
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.
CreatedAt: Wed Dec  1 22:38:35 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
Description: 
+ Subcommands that need to be aware of categories:
+ 
+ - create: option to specify the category, otherwise ask.
+ - list: option to filter by category.

Id: 29
Summary: Support set-or-add -S option in recset.
CreatedAt: Wed Dec  1 22:55:06 CET 2010
Originator: jemarch@gnu.org
AssignedTo: jemarch@gnu.org
Status: TODO
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.

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

NextFreeId: 30

# End of TODO
