From: Alpha-Bugzilla <alp...@ic...> - 2004-07-23 18:51:58
|
[This e-mail has been automatically generated.] http://www.maths.mq.edu.au/~steffen/Alpha/bugzilla/show_bug.cgi?id=1454 Summary: RFE: -indices flag to [listpick] Product: Alpha Version: 8.0b15 Platform: Macintosh PowerPC OS/Version: All Status: NEW Status Whiteboard: Keywords: Resolution: Severity: enhancement Priority: P2 Component: Core AssignedTo: alp...@li... ReportedBy: ko...@ma... It would be nice if [listpick] had an option -indices which would make the proc return the index of the chosen list item instead of the item itself. This is needed in many places where the list presented to the user is some sort of primitive version of the list that really matters internally. For example, when electric-completing a file name, the relevant list internally is of course the list of full path names, but for the user it would be much more convenient to see only the tail of each item. In fact, if you are more than around 32 chars down in a file hierarchy and you try to complete a file name, the amount of text shown in the listpick doesn't even show the tail because truncation at listpick-width takes place... Other examples: when completing a bibitem, what matters internally is the citekey, but what you would like to present in the listpick is the list of titles (and possibly authors). In general, whenever you are requested to select a record in a database, internally you want to refer to the record by its uid, but at the user interface level you will rather present a list of some other key from the database, since the uid might be pretty useless for the user to choose from. Sure, it is not extremely difficult to perform an additional [lsearch] for the return value of [listpick] and get the index in this way, but it is sort of backwards and awkward. Without knowing what I am talking about I guess that it would be easy to implement in the core: probably the core proc knows the index before it knows the value at that index...? -- This e-mail has been sent to you by the Alpha-Bugzilla bugsystem (http://www.maths.mq.edu.au/~steffen/Alpha/bugzilla/) I am an automated system, please direct your replies or complaints to my maintainer <st...@ma...> |