Re: Sourcing scripts, screen flashes.

2002-09-12 Thread Nicolas Rachinsky

* Sven Guckes [EMAIL PROTECTED] [2002-09-11 17:23 +0200]:
 * Ryan Sorensen [EMAIL PROTECTED] [2002-09-10 06:32]:
  source ~/.mutt/hooks/folder.recip.sh ~/.Mail/lists/|
  source ~/.mutt/hooks/folder.recip.sh ~/.Mail/people/|
 
 *  Sven Guckes wrote:
  source filename
  source filename|
  filename foo is *not* a filename, i suppose.
 
 * [EMAIL PROTECTED] [EMAIL PROTECTED] [2002-09-11 14:57]:
  Hi Sven - I'm trying to understand what you meant by this.
  I'm guessing here - but does the vertical bar have to come at the
  end of the script name ?  Not at the end of the command line ?
 
 filename stands for the name of a file.  no more - no less.
 
 so - is foo bar a filename?  or more specifically -
 is there a file named folder.recip.sh ~/.Mail/lists/
 (note the space!) in Ryan's ~/.mutt/hooks directory?
 my guess is that this *file* does *not* exist.
[...]
  The admirable terseness of UNIX/Linux documentation sometimes
  cause gaps in understanding which are not apparent to those
  who are already familiar with the topics being examined.
  I believe this is one of those times.
 
 au contraire.  Ryan probably expected that he can use
 any kind of commmand with parameters in this value.
 and that's where he would be wrong because the
 parameter is explicitly described as a *filename*.
 or does it say put parameters here anywhere?
 exactly.

But it DOES work:
source awk -f ~/.mutt/gen_mailboxes.awk ~/.mutt/mailboxes|

Nicolas



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread Sven Guckes

* Ryan Sorensen [EMAIL PROTECTED] [2002-09-10 06:32]:
 Since I've added source lines for a couple scripts, when
 I start up mutt, the screen flashes several times.
 source ~/.mutt/hooks/folder.recip.sh ~/.Mail/lists/|
 source ~/.mutt/hooks/folder.recip.sh ~/.Mail/people/|
 That sort of thing.

  source filename
  source filename|

filename foo is *not a filename, i suppose.

 Anything I can do to avoid this?

rtfm?!

Sven



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread jkinz

On Wed, Sep 11, 2002 at 01:56:39PM +0200, Sven Guckes wrote:
 * Ryan Sorensen [EMAIL PROTECTED] [2002-09-10 06:32]:
  Since I've added source lines for a couple scripts, when
  I start up mutt, the screen flashes several times.
  source ~/.mutt/hooks/folder.recip.sh ~/.Mail/lists/|
  source ~/.mutt/hooks/folder.recip.sh ~/.Mail/people/|
  That sort of thing.
 
   source filename
   source filename|
 
 filename foo is *not a filename, i suppose.

Hi Sven - I'm trying to understand what you meant by this.
I'm guessing here - but does the vertical bar have to come at the 
end of the script name ?  Not at the end of the command line ?

Or does the sourced file have to limnit itself to mutt commands?
(I assume from the .sh ending of Ryan's files that the files being
sourced are shell scripts)

Or should Ryan be trying a wrapper script to encapsulate the 
logic above ? something like :

source ~/mywrapper!

== example file mywapper =
#!/bin/sh
~/.mutt/hooks/folder.recip.sh ~/.Mail/lists/
~/.mutt/hooks/folder.recip.sh ~/.Mail/people/
  end file =


Sometimes even reading the manual is not sufficient.  The admirable
terseness of UNIX/Linux documentation sometimes cause gaps in
understanding which are not apparent to those who are already familiar
with the topics being examined.  I believe this is one of those times.

(I still prefer this to the step by step robot instructions that 
are frequently passed off as documentation by some publishers.)
(click this, now click that, select from a list. etc... )

 
  Anything I can do to avoid this?
 
 rtfm?!

Which part of the manual would explain this please ?

I'm asking because I grepped the manual and I can't find anything about
how sourcing a file would cause screen flashes.  The only other thing
I can think of would be that a command in Ryan's scripts somehow invoke
the clear/redraw screen function (^L) in mutt.


-- 
   ( Memoriam )
;===;()
# # # #::
# # # #::
# # # #::
# # # #::
# # # # # # #
# # # # # # #
# # # # # # #
# # # # # # #
# # # # # # #
# # # # # # #

For all the victims from over one hundred 
countries who died one year ago today.



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread René Clerc

* [EMAIL PROTECTED] [EMAIL PROTECTED] [11-09-2002 16:57]:

 On Wed, Sep 11, 2002 at 01:56:39PM +0200, Sven Guckes wrote:
  * Ryan Sorensen [EMAIL PROTECTED] [2002-09-10 06:32]:
   Since I've added source lines for a couple scripts, when
   I start up mutt, the screen flashes several times.
   source ~/.mutt/hooks/folder.recip.sh ~/.Mail/lists/|
   source ~/.mutt/hooks/folder.recip.sh ~/.Mail/people/|
   That sort of thing.
  
source filename
source filename|
  
  filename foo is *not a filename, i suppose.
 
 Hi Sven - I'm trying to understand what you meant by this.
 I'm guessing here - but does the vertical bar have to come at the 
 end of the script name ?  Not at the end of the command line ?

man muttrc
/source

source takes one argument, which should be a file.

-- 
René Clerc  - ([EMAIL PROTECTED])

No woman, no cry.
-Bob Marley 



msg30879/pgp0.pgp
Description: PGP signature


Re: Sourcing scripts, screen flashes.

2002-09-11 Thread Sven Guckes

* Ryan Sorensen [EMAIL PROTECTED] [2002-09-10 06:32]:
 source ~/.mutt/hooks/folder.recip.sh ~/.Mail/lists/|
 source ~/.mutt/hooks/folder.recip.sh ~/.Mail/people/|

*  Sven Guckes wrote:
 source filename
 source filename|
 filename foo is *not* a filename, i suppose.

* [EMAIL PROTECTED] [EMAIL PROTECTED] [2002-09-11 14:57]:
 Hi Sven - I'm trying to understand what you meant by this.
 I'm guessing here - but does the vertical bar have to come at the
 end of the script name ?  Not at the end of the command line ?

filename stands for the name of a file.  no more - no less.

so - is foo bar a filename?  or more specifically -
is there a file named folder.recip.sh ~/.Mail/lists/
(note the space!) in Ryan's ~/.mutt/hooks directory?
my guess is that this *file* does *not* exist.

 Sometimes even reading the manual is not sufficient.

yep - understanding it is required, too.  *ehem*

 The admirable terseness of UNIX/Linux documentation sometimes
 cause gaps in understanding which are not apparent to those
 who are already familiar with the topics being examined.
 I believe this is one of those times.

au contraire.  Ryan probably expected that he can use
any kind of commmand with parameters in this value.
and that's where he would be wrong because the
parameter is explicitly described as a *filename*.
or does it say put parameters here anywhere?
exactly.

 (I still prefer this to the step by step robot instructions that
 are frequently passed off as documentation by some publishers.)
 (click this, now click that, select from a list. etc... )

mutt for dummies includes all the manuals with examples -
these are 42 volumes if printed out and available
for just some bucks to get you a linux.

   Anything I can do to avoid this?
  rtfm?!
 Which part of the manual would explain this please ?

the part which says Usage: source filename
yes, it is terse.  but read on - there
are more sentences and even an example!

  For example:
  source /usr/local/share/Mutt.aliases
  source ~/.mail_aliases

and well, if this is not clear now
then, um, get the windows version.

 I'm asking because I grepped the manual and I can't find
 anything about how sourcing a file would cause screen flashes.

error - beep - visual bell (aka flash).

 --
( Memoriam )
 ;===;()
 # # # #::
 # # # #::
 # # # #::
 # # # #::
 # # # # # # #
 # # # # # # #
 # # # # # # #
 # # # # # # #
 # # # # # # #
 # # # # # # #

 For all the victims from over one hundred
 countries who died one year ago today.

the worst part about 9/11 is the reference
to the Eternal September and its signatures.
Osama is going to rot in /dev/null for that!

Sven

--
___ground_zero_



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread Johan Almqvist

* Sven Guckes [EMAIL PROTECTED] [020911 17:23]:
 * Ryan Sorensen [EMAIL PROTECTED] [2002-09-10 06:32]:
  source ~/.mutt/hooks/folder.recip.sh ~/.Mail/lists/|
  source ~/.mutt/hooks/folder.recip.sh ~/.Mail/people/|
 *  Sven Guckes wrote:
  source filename
  source filename|
  filename foo is *not* a filename, i suppose.
 filename stands for the name of a file.  no more - no less.
 so - is foo bar a filename?  or more specifically -
 is there a file named folder.recip.sh ~/.Mail/lists/
 (note the space!) in Ryan's ~/.mutt/hooks directory?
 my guess is that this *file* does *not* exist.

Sorry Sven, but I can't confirm what you're saying.

If I enter

source 'echo alias foobar [EMAIL PROTECTED]'|

at mutts : prompt, the screen will flash. But the alias (that wasn't
defined before...) will work, too!

It seems to be the same screen flash that would occur on entering

!chmod 644 public_html/test.txt

(i e running a program from within mutt that doesn't give any stdout to
display, either because there is none or because mutt uses it
internally...)

Regards,

-Johan
-- 
Johan Almqvist
http://www.almqvist.net/johan/qmail/



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread Sven Guckes

* Johan Almqvist [EMAIL PROTECTED] [2002-09-11 15:52]:
 :source 'echo alias foobar [EMAIL PROTECTED]'|
 the screen will flash.  But the alias
 (that wasn't defined before) will work, too!

aha - so the pipe symbol at the end forces an evaluation..  hmm..

  $ cat /tmp/test
  echo 'set signature=/etc/passwd'
  echo 'set pager=vim -'

  $ mutt
  :source /tmp/test|

ok - mutt flashes but it does
execute the set commands.

now, how to have all this executed silently?

Sven  [thinking about recursion, too, but...]



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread Sven Guckes

* David Champion [EMAIL PROTECTED] [2002-09-11 16:09]:
 The pipe symbol needs to be inside the quotation
 marks, but it's not allowed to take arguments.
   source ~/.mutt/hooks/folder.recip.lists.sh |
   source ~/.mutt/hooks/folder.recip.people.sh |

why use quotation marks at all then?
source file| suffices, doesn't it?

Sven



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread Johan Almqvist

* David Champion [EMAIL PROTECTED] [020911 18:08]:
 Ryan:
 The pipe symbol needs to be inside the quotation marks, but it's not
 allowed to take arguments.

What no arguments? Worked fine for me - see previous mail.

-Johan
-- 
Johan Almqvist
http://www.almqvist.net/johan/qmail/



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread David Champion

* On 2002.09.11, in [EMAIL PROTECTED],
*   Johan Almqvist [EMAIL PROTECTED] wrote:
 * David Champion [EMAIL PROTECTED] [020911 18:08]:
  Ryan:
  The pipe symbol needs to be inside the quotation marks, but it's not
  allowed to take arguments.
 
 What no arguments? Worked fine for me - see previous mail.

I've tried this in the past (with args), and ran into trouble,
concluding that arguments didn't work for source. (This was when I
changed my muttrc to call m4 as a preprocessor on my real muttrc, as
some might recall.) But you're certainly right; it works now. Maybe this
was changed in a patch, or maybe I diagnosed my problem incorrectly back
whenever.

-- 
 -D.We establised a fine coffee. What everybody can say
 Sun Project, APC/UCCO  TASTY! It's fresh, so-mild, with some special coffee's
 University of Chicago  bitter and sourtaste. LET'S HAVE SUCH A COFFEE! NOW!
 [EMAIL PROTECTED]   Please love CAFE MIAMI. Many thanks.



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread darren chamberlain

* David Champion [EMAIL PROTECTED] [2002-09-11 15:22]:
 (This was when I changed my muttrc to call m4 as a preprocessor on my
 real muttrc, as some might recall.)

I recall this, and also recall a promise to post said m4 config to the
list, so we could see what it looked like...

(darren)

-- 
The language Unix is vastly more inconsistent than the language Perl.
And guaranteed to remain that way, forever and ever, amen.
-- Larry Wall



Re: Sourcing scripts, screen flashes.

2002-09-11 Thread David T-G

David --

...and then darren chamberlain said...
% 
% * David Champion [EMAIL PROTECTED] [2002-09-11 15:22]:
%  (This was when I changed my muttrc to call m4 as a preprocessor on my
%  real muttrc, as some might recall.)
% 
% I recall this, and also recall a promise to post said m4 config to the
% list, so we could see what it looked like...

Same here!  Is it ready *yet*? ;-)


TIA  HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg30897/pgp0.pgp
Description: PGP signature


Sourcing scripts, screen flashes.

2002-09-10 Thread Ryan Sorensen


Since I've added source lines for a couple scripts, when I start up
mutt, the screen flashes several times.


source ~/.mutt/hooks/folder.recip.sh ~/.Mail/lists/|
source ~/.mutt/hooks/folder.recip.sh ~/.Mail/people/|

That sort of thing.


Anything I can do to avoid this?