Recent Changes - Search:



AlphaTcl to do...

This page is for discussion of things which we'd like to see in AlphaTcl (not in the Alpha/Alphatk core code).

Anyone should feel free to edit this with their own suggestions (click on the edit link at the bottom of the page) -- Vince.


Future to-do list (feel free to add your thoughts):

  • Figure out what type of alpha::package]] should be used for "Terminal". This is currently defined as a "feature" that needs to be turned on, but it looks like activation doesn't actually do anything for the UI -- the "Term" mode is already defined, the preferences already appear in the dialog, and the procedures are already available via "auto_load" functions. If this is just an alpha::library? package that is adding some preferences, we should change its construction to be more UI friendly. cbu

(status: none)

(status: none)

  • it appears that the "-s" flag in search is no longer needed, as the calls to this core command never change the "search string" in the Find dialog even if the flag is not included. If this is the case, we could do a massive removal of this flag. ("Use the -s, Luke" revisited :)

(status: none)

  • resolve issue of how to have Alpha (esp. AlphaX) read-only, while still allowing the user to add packages. This really requires moving the 'UserModifications' package to somewhere else, and also requires (perhaps) a more modular way of rebuilding package indices (would be nice if Alpha came with the package indices and only normally rebuilds them for the user's directory).

(status: none)

  • migrate some of the "Alpha Commands" that list newer preferred procs to the bottom of the file so that its more obvious that they are obsolete.

(status: none)

  • migrate some of the obsolete commands at the bottom of the "Alpha Commands" file from the AlphaDev "AlphaCommands" colorizing list and move them into the "ObsoleteProc" colorizing list. Some of these aren't listed in the "backCompatibility.tcl" file, not sure if they should be redefined or not.

(status: some done, more needed, including changes to colour-lists in alphaDeveloperMenu.tcl. Also a decision needs to be made on colorizing of core-procs (many of which used to be commands))

  • add some support for 'scp' or 'sftp' to alpha's internet communication capabilities.

(status: none)

  • replace all uses of 'sigs' by some more general appspec. This shouldn't require significant work, but is needed to properly deal with cross-platform (esp. MacOS X) issues. The current code assumes 'file exists $sig' implies an executable, and otherwise apple-events are to be used. This should really be changed.

(status: none)

  • ChangeLog support, like this (copied from comp.lang.tcl): I think many use emacs (including myself), which actually has some built-in support for ChangeLog files. For example, when you are in tcl/generic/tclBasic.c:Tcl_EvalEx() and have made some changes, just type ^x-4-a (IIRC, my fingers remember it better), and emacs loads the nearest ChangeLog in the directory hierarchy, adds your name and the date as well as the line like * generic/tclBasic.c (Tcl_EvalEx): and then you type in what you did. In any case, it is very important to keep the ChangeLogs accurate to understand changes over time.

(status: there is a changeLogHelper.tcl Package is the latest AlphaTcl, but it needs some work)

  • define a decent interface for mode-specific 'folding' of code.

(status: Alphatk now supports folding (see edit menu), and some simple code is in Tcl, C, Java, TeX, Bib modes and indentation.tcl to test this out. Any mode which wants to support folding need a <mode>::foldableRegion procedure. Probably need to add ability to fold both body of a function and the comments before it in one go).

  • put checking in 'Report A Bug' so it notices if you're using a development version of Alpha or AlphaTcl and perhaps checks directly if a newer version has been released (particularly with AlphaTcl a 'cvs update' would be useful).

(status: none)

  • now we're using namespaces more, and packaging code up into useful, consistent APIs, it is easier to make a distinction between the 'public API' of a package and internal-only helper functions. We should try to reach a convention about how such items should be named, as well. One option is that public functions look like pkg::callMe, and private ones like pkg::_dontCallMe. Tcl itself uses the convention of pkg::DontCallMe (i.e. a capital letter indicates privacy), which has its pros and cons.

(status: none)

  • several modes have been updated to put everything in <mode> namespaces which makes conflicts with similarly named procedures extremely unlikely. M2 currently defines a lot of procedures using the menu item names. There might be others that should be looked at.

(status: Bib, Perl, and GPLT have been updated for AlphaTcl 7.5 -- TeX has been updated for AlphaTcl 7.6d7. M2 is one of the larger projects remaining.)

  • some packages define text/regexp query procs which might be more appropriate if they were defined in the AlphaTcl core so that other packages would be able to count on them even if other packages have been uninstalled. isWordPrev in copyRing.tcl is one example that comes to mind, although I know that there are many more. Several of these fall is the category of is::SomeTest.

(status: none)

  • expose many of the primary 'core' commands in AlphaTcl so that they don't have to be defined internally by Alpha7/8/X/tk. Probably involves first identifying those commands which these applications using AlphaTcl must define to help avoid falling into recursive loop traps. For example, goto, getPos, selEnd, minPos, lineStart, and select are probably app level core commands, whereas beginningLineSelect, beginningOfBuffer and beginningBufferSelect could make use of them in AlphaTcl.

(status: none)

  • there are two different php Modes available. Can we put them together into one?

(status: none)

  • clarify what commands AlphaTcl needs at what stages of initialisation. We ideally want to be able to load prefs etc without relying on existence of the gui.

(status: mostly done, with new PreGui code and rebuilding code placed in SystemCode/Init, but some more work, cleanup still needed.)

  • pretty comments package:

    In modes which use a single comment character, AlphaTcl currently
    uses a style of paragraph comment like this:

     # Here is a
     # comment
    which may not appeal to everyone.  We should remove this from
    the core, and move that functionality into this package so it
    can be made optional.  The default (for any mode for which
    this feature is off) would then be:

    # Here is a
    # comment

    which is probably a better default.

    Of course none of this is yet implemented!

(status: none)

  • temporary filesets are made permanent by editing them. Is this the desired behaviour?

(status: nothing, but we should probably ask the user before making the fileset permanent, must look to see how hard that would be to implement)

  • better error handling when: (i) starting up and a package throws an error, (ii) when opening a file from a fileset - if the file does exist but the act of opening it causes an error, that should be handled quite differently to the case where we can't find the file.

(status: any ideas, anyone?)

  • the electric menu isn't much use, except perhaps for people new to Alpha, with the possible exception of the 'new document', 'create header' and 'function comments' items. Perhaps we can do something new with the menu which is more useful?

(status: any ideas, anyone? See Menus.ElectricMenuIdeas to read/add comments)

  • move more code into packages, or 'core packages'. We'd like the very core of AlphaTcl to be as simple and modular as possible. We may want to create a special flag or command which allows such packages to declare themselves as always on

(status: some done in 7.5/8.0, but probably more can be done)

  • need a better mechanism for adjusting key-bindings in menus (and therefore handling international keyboards, etc). The problem is that a package like 'open windows menu' would like to be able to declare that it has a few dodgy key-bindings, and then other packages can adjust those key-bindings if desired.

(status: none)

Items which used to be on the to-do list but which have been implemented and released:

In AlphaTcl 8.0dev

  • check an AlphaTcl fileset for all occurances of procs listed in "backCompatibility.tcl" and substitute as necessary.

(status: done)

  • add '-m' or '-mode' flag to 'edit' or 'editDocument'

(status: done)

In AlphaTcl 7.6

  • substitute all uses of 'posToRowCol' etc with new 'pos::' procs.

(status: done. Basically involves search and replace on an AlphaTcl fileset (containing all of SystemCode, Modes, etc) by someone with access to the cvs sources -- mostly done, but some Modes still need updating)

  • \eqnarray completion has no shortcut, no label and doesn't ask for the number of rows. Also TeX::equationarray is referenced in TeXcompletions.tcl but never defined.

(status: new version of TeX mode in the CVS HEAD addresses this -- \equationarray isn't a valid environment, so it shouldn't be defined. \eqnarray is now defined instead. It still needs some help to prompt for the number of rows, etc. Should be easy enough to fix if you know what the environment should look like.) (I didn't.)

  • integrate AlphaTcl with 'aspell' (or Cocoaspell). This ought to be possible on OSX/Unix/Windows through the use of pipes.

(status: available in latest AlphaTcl)

  • allow Wiki mode to http-post edited Wiki pages so they can be edited from within Alpha.

(status: available in latest AlphaTcl/Alphatk. Should work with Alpha 8/X too, although Alpha8 requires a fix for 'httpCopy'. See Bug# 529, [] and Bug# 530 [])

  • every time we make a change to supersearch, we break the Alpha7-support code (which works around problems in the string returned from 'dialog'). This code needs to be documented so it is obvious how not to break things!

(status: Dominique has provided a general fix --- thanks!)

  • a robust lineEnd and prevLineStart proc that would return the end of the line for a given position would eliminate a lot of uses like

    set pos [pos::math [nextLineStart [getPos]] - 1]

(Not as easy as just using the above, though, because there needs to be some check for lines at the very end of the window.)

(status: in positions.tcl. One advantage here is that all of the procs contained therein (such as pos::math) always return valid positions in Alpha7/8, as is currently the case in Alphatk. We need to go through AlphaTcl replacing obsolete versions ('lineEnd' and 'posX') and checking uses of 'posToRowCol' to see whether they should really be pos::toRowCol or pos::toRowChar).

In AlphaTcl 7.5

  • added various icon resources.

  • finish off 'encoding' cmd emulation in at least rudimentary fashion for Alpha 7.

  • added maple mode, objective C mode.

  • there is a basic Tcl implementation of 'clock' for Alpha 7 -- it needs improving!

  • new dialogs code is being revamped -- would be nice to add a date/time dialog type ('set' might allow this to be read from a file's modification date, or typed in manually or...)

  • the Packages -- install a package menu item will let you download and install local or remote packages (over http or ftp). It needs to be thoroughly tested and made more robust.

  • twiddleWords should be updated to behave like twiddle

  • Why does smartPaste need to be aware of copyRing? Can't it be coded differently to avoid this dependence? If this is not easy, perhaps smartPaste::paste is in error, and it should not implement 'paste' as a combination of deleteText and replaceText, but rather by adjusting the scrap and current selection and performing an ordinary 'paste' again? The problem with this last approach is that 'paste' will actually modify the current scrap/clipboard (by inserting/removing whitespace) which is peculiar.

  • Remove use of obsolete procedures from all code. Currently known examples are: stripNameCount (used extensively in HTML mode)...

In Alpha 7.4.2:

  • integrate HTML mode's concept of ftp-mirroring into any fileset (i.e. any fileset can potentially be mirrored somewhere, so the various 'upload' options can apply to any fileset which has various pieces of mirroring-data set).

  • the filesets and filesets menu's use of a cache doesn't seem right any more. Shouldn't they just use ordinary (variable/array) preferences to store their information.

  • electricSemicolon, etc., don't check if we're in the middle of a string before inserting a newline. We need to add a 'text::isInString' to match 'text::isInComment', and modify the ::electricSemi procedure.

  • remove mode-specific 'switch -- $mode ... "TeX" "HTML" ...' code from various paragraph/comment routines and place appropriate variable settings in those modes (TeX::startPara etc).

  • sort out the various quote::Url, html:: functions and pick the appropriate subset for inclusion in the core.

  • add web-page entry to alpha developer menu

  • line-indentation: preference for position of cursor after indentation.

  • errors raised by activation of a feature should result in de-activation of that feature and an automatic, sensible message to the user. (Note: this is complicated because we may need to remove this feature from either global::features or mode::features($mode) lists).

  • Why does smartPaste need to be aware of copyRing? Can't it be coded differently to avoid this dependence? (It doubles the length of the code at present). As a start, if we use:

  proc copyringReplace {} {
      global pasteFinish pasteStart pasteScrap

      if {1} {
          # pretend we are pasting just in case 'paste' has been
          # overridden (since that is the operation we are really
          # trying to imitate here).
          set oldScrap [getScrap]
          putScrap $pasteScrap
          select $pasteStart $pasteFinish
          putScrap $oldScrap
      } else {
          replaceText $pasteStart $pasteFinish $pasteScrap

instead of the existing version, then we should be able to delete from smartPaste.tcl the extra procedure smartPaste::replace and the various renaming associated with it. Can't we do something similar to remove the (smaller) remaining dependence? If this is not easy, perhaps smartPaste::paste is in error, and it should not implement 'paste' as a combination of deleteText and replaceText, but rather by adjusting the scrap and current selection and performing an ordinary 'paste' again? The problem with this last approach is that 'paste' will actually modify the current scrap/clipboard (by inserting/removing whitespace) which is peculiar.


Page last modified on January 23, 2006, at 02:27 PM
Hosted on Logo