What if there were a different trigger for the extended completions? This way the user would have only one box to parse at a time.
john perry On Feb 9, 9:44 am, Jason Grout <jason-s...@creativetrax.com> wrote: > Hi all, > > Currently, anytime there is a command that contains a noun and an > adjective, there seems to be debate about what order they should be > listed. For example, there have been debates over whether to name a > function right_eigenvectors and eigenvectors_right. It seems the big > argument for eigenvectors_right is that it is easy to find with tab > completion (i.e., if you want to do a eigenvectors, you type > eigenvectors<tab> and pick the right function). The big argument for > right_eigenvectors is that is how things are normally said in English > (the adjective precedes the noun). So to satisfy both, we use both > names, which leads to cluttered namespace in which lots of function > names are actually the same function. > > The other day, someone suggested finding a function using syntax similar to: > > *eigenvectors*? > > This finds all functions that contain the word "eigenvectors". For a > matrix, for example, we get: > > sage: m=random_matrix(ZZ,5) > sage: m.*eigenvectors*? > m.eigenvectors_left > m.eigenvectors_right > m.left_eigenvectors > m.right_eigenvectors > > If tab completion returned the above choices instead of just the > functions that started with "eigenvectors", I believe that would satisfy > the crowd that wants function names to be easy to complete and guess > using tab completion. > > What if, at least for the notebook, and maybe for the command line too, > we listed two sets of completions: the first would be the list given > now, and the second would be the list given above? In other words, if > in the notebook, you typed m.eigenvectors<tab>, you would get a box > containing two lists: > _______________________________________ > | | > | list of current completions | > | | > |-------------------------------------- > | list of extended completions | > | given by the *word*? trick | > |_____________________________________| > > What do people think? I think this would finally answer the tension > between the people that want useful tab completion and the people who > want the function names to look "right". > > Too bad English doesn't put the adjectives after the noun :). > > Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---