>
> Just a thought apropos this script of Christian and getting
> greedier still.
>
> Something that would be seriously cool IMHO is a function
> that parses the mail body and extracts all filename like strings.
How do you define a filename-like string?
> Almost all my filenames have a 3 (or4) char suffix.
This is not true on Unix-like OSes (which is where mutt is usually
found). Most of my bash scripts, including most of those distributed
with my Linux distro, have no extension at all; and this is not limited
to executable scripts, see at bottom. Among the filenames that do have a
"suffix", as you call it, I see buffer.c, run-mozilla.sh, csh.cshrc,
csh.logout, as typical examples of well-known files or filetypes whose
extension has 1, 2, 5 or 6 characters.
> And then to attach these to the mail automatically, using the
> header Attach:.
>
> I would love something like that.
>
Let's say your mail (quoted above) was used as "the mail body". Then the
function would try to extract all the following files from the current
directory:
Just
a
thought
apropos
this
script
of
Christian
and
getting
greedier
still.
Something
that
would
...etc. Note that at least one of the above (apropos) is known to exist
"somewhere in the $PATH", with no extension, on most Unix-like
installations. (Here, /usr/bin/apropos is a softlink to whatis in the
same directory.)
Then also, there are "true" filenames -- let's say
~/.vim/doc/matchit.txt, cscope.out, src/eval.c, patches/001-100.gz --
which you wouldn't want to attach to any message that mentions them,
even if found on your system.
Best regards,
Tony.
--
THE LESSER-KNOWN PROGRAMMING LANGUAGES #2: RENE
Named after the famous French philosopher and mathematician Rene
DesCartes, RENE is a language used for artificial intelligence. The
language is being developed at the Chicago Center of Machine Politics
and Programming under a grant from the Jane Byrne Victory Fund. A
spokesman described the language as "Just as great as dis [sic] city of
ours."
The center is very pleased with progress to date. They say they have
almost succeeded in getting a VAX to think. However, sources inside the
organization say that each time the machine fails to think it ceases to
exist.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment