Changes between Version 2 and Version 3 of ScriptSupport


Ignore:
Timestamp:
Oct 21, 2013 6:58:02 PM (4 years ago)
Author:
MichaelRay
Comment:


mayhem to hold the formatting of the original

Legend:

Unmodified
Added
Removed
Modified
  • ScriptSupport

    v2 v3  
    1 Every so often the topic of adding a scripting language to Mutt comes up.
    2 Most people don't understand the issues involved, and why this hasn't been done so far.
    3 It's not a matter of the developers being lazy, it's just a very difficult problem to solve aesthetically.
     1Every so often the topic of adding a scripting language to Mutt comes up.[[br]]
     2Most people don't understand the issues involved, and why this hasn't been done so far.[[br]]
     3It's not a matter of the developers being lazy, it's just a very difficult problem to solve aesthetically.[[br]]
    44
    5 Probably by far the biggest issue would be of choosing ''which'' scripting language.
    6 S-Lang is often suggested since Mutt can already be linked against it to use its screen management capabilities in place of ncurses.
    7 The problem is that everyone has their own favorite scripting language (eg. Perl, Python, TCL, Scheme).
    8 If scripting support were ever to be added, it would probably follow the model used by the GIMP,
    9 with its procedural database (PDB) that allows you to write extensions in any language,
    10 and make it available to any other script no matter what language.
     5Probably by far the biggest issue would be of choosing ''which'' scripting language.[[br]]
     6S-Lang is often suggested since Mutt can already be linked against it to use its screen management capabilities in place of ncurses.[[br]]
     7The problem is that everyone has their own favorite scripting language (eg. Perl, Python, TCL, Scheme).[[br]]
     8If scripting support were ever to be added, it would probably follow the model used by the GIMP,[[br]]
     9with its procedural database (PDB) that allows you to write extensions in any language,[[br]]
     10and make it available to any other script no matter what language.[[br]]
    1111
    12 Engineering-wise, adding scripting to Mutt at this point is difficult.
    13 If you look at other applications with scripting support, primarily editors, they all operate on one basic mode (a buffer).
    14 Mutt on the other hand has several different modes--menus, pager.
    15 Not all functions can be applied to every mode (consider Emacs:
    16 even when you have different major modes, there is still a concept of a cursor-up or cursor-down operation).
    17 So each intrinsic function (the built-in functions available to scripts) would basically have to keep track
    18 of what modes it is allowed to be called from--messy.
    19 (ie, you can't call group-reply while in the file browser because that wouldn't make sense).
     12Engineering-wise, adding scripting to Mutt at this point is difficult.[[br]]
     13If you look at other applications with scripting support, primarily editors, they all operate on one basic mode (a buffer).[[br]]
     14Mutt on the other hand has several different modes--menus, pager.[[br]]
     15Not all functions can be applied to every mode (consider Emacs:[[br]]
     16even when you have different major modes, there is still a concept of a cursor-up or cursor-down operation).[[br]]
     17So each intrinsic function (the built-in functions available to scripts) would basically have to keep track[[br]]
     18of what modes it is allowed to be called from--messy.[[br]]
     19(ie, you can't call group-reply while in the file browser because that wouldn't make sense).[[br]]
    2020
    21 For the most part, the keyboard macros in Mutt allow you to do most everything you need to do.
    22 There are only a few places where scripting support would really make sense.
     21For the most part, the keyboard macros in Mutt allow you to do most everything you need to do.[[br]]
     22There are only a few places where scripting support would really make sense.[[br]]
    2323 * prompt in the middle of a macro is impossible
    2424 * applying a macro to all tagged messages
    2525 * arbitrary editing of the message header in compose mode
    26 Complex motions can be accomplished already, so they are not included here.
    27 Some ConfigTricks might guide you in the right direction, especially for "if" control.
     26Complex motions can be accomplished already, so they are not included here.[[br]]
     27Some ConfigTricks might guide you in the right direction, especially for "if" control.[[br]]