keyboard paste address in compose, To: line

2009-09-03 Thread brownh
Often, when composing a message, I want to past an address in the To: 
line without using my mouse. However, the usual C-y or C-v keyboard 
commands don't work. Any suggestions?

If I may, a minor secondary question. When I type in an address on the 
To: line, the insertion point is not visible. This is annoying when I 
need to go back to correct a typo. I don't know where I am so that I 
can do a DEL or type at the right place. Can I change this behavior?

Haines Brown


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Dan Ritter
On Thu, Sep 03, 2009 at 01:19:43PM -0400, brownh wrote:
> Often, when composing a message, I want to past an address in the To: 
> line without using my mouse. However, the usual C-y or C-v keyboard 
> commands don't work. Any suggestions?

Entirely dependent on your terminal program, not Mutt. Mutt
doesn't know you're running in a graphical environment.

If you say what terminal program you're using, or what's
available to you, people may be able to help.

> If I may, a minor secondary question. When I type in an address on the 
> To: line, the insertion point is not visible. This is annoying when I 
> need to go back to correct a typo. I don't know where I am so that I 
> can do a DEL or type at the right place. Can I change this behavior?

Probably terminal program dependent as well.

-dsr-

-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.


Selecting INBOX...gdbm fatal: lseek error

2009-09-03 Thread Tim Tebbit
Subject says it all.  Debian Sid. I have purged and reinstalled
everything except my .muttrc file, which works under Lenny and Squeeze.

Any ideas?

$ mutt -v
Mutt 1.5.20 (2009-06-14)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 2.6.30-1-686 (i686)
ncurses: ncurses 5.7.20090803 (compiled with 5.7)
libidn: 1.15 (compiled with 1.15)
hcache backend: GDBM version 1.8.3. 10/15/2002 (built Aug 13 2009 22:25:33)
Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL
-USE_FLOCK
+USE_POP  +USE_IMAP  +USE_SMTP
-USE_SSL_OPENSSL  +USE_SSL_GNUTLS  +USE_SASL  +USE_GSS  +HAVE_GETADDRINFO
+HAVE_REGCOMP  -USE_GNU_REGEX
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME
+CRYPT_BACKEND_GPGME
-EXACT_ADDRESS  -SUN_ATTACHMENT
+ENABLE_NLS  -LOCALES_HACK  +COMPRESSED  +HAVE_WC_FUNCS
+HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  +USE_HCACHE
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"
To contact the developers, please mail to .
To report a bug, please visit http://bugs.mutt.org/.

patch-1.5.13.cd.ifdef.2

###
# .muttrc #
###

set realname = '' # default: ''
set editor = "vim -c 'set tw=74' -c 'set wrap' +:2"
set sig_dashes = yes ### default yes
set signature = '~/.signature'
set timeout = '15'
set pager_index_lines = '7'
set alias_file = '~/.alias'
set from = '' # default: ''
set mail_check = '90'
set imap_check_subscribed = yes # default: no
set imap_login = '' # default: ''
set imap_pass = '' # default: ''
set imap_user = '' # default: ''
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed="+[Gmail]/Drafts"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
set sort = 'threads'
set sort_aux = 'last-date-received'
set imap_check_subscribed
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc
set pgp_autoinline = yes   ## default no
set record = '~/sent'
set write_bcc = no # default: yes
color attachment brightmagenta default
color error brightwhite red   # errors yell at you in red
color hdrdefault red default  # headers
color indicator brightyellow magenta # currently selected message
color markers brightcyan default # the + for wrapped pager lines
color message brightcyan default # informational messages, not mail
color normal white default   # plain text
color quoted green default # quoted text
color search brightgreen default# hilite search patterns in the pager
color signature red default   # signature (after "-- ") is red
color status brightyellow blue # status bar is yellow *on blue*
color tilde blue default # ~'s after message body
color tree green default   # thread tree in index menu is magenta
color signature brightred default
color underline yellow default
color header cyan default ^(From|Subject): # Important headers
color body magenta default "(ftp|http)://[^ ]+"  # picks up URLs
color body magenta default [-a-z_0-9...@[-a-z_0-9.]+
color quotedcyan default
color quoted1   yellow default
color quoted2   red default
color quoted3   green default
color quoted4   cyan default
color quoted5   yellow default
color quoted6   red default
color quoted7   green default
color index brightyellow default ~N  # New
color index yellow default ~O  # Old
color index magenta default ~F
color index blue default ~T
color index red default ~D
ignore *
unignore From:
unignore To:
unignore Reply-To:
unignore Mail-Followup-To:
unignore Subject:
unignore Date:
unignore Organization:
unignore Newsgroups:
unignore CC:
unignore BCC:
unignore X-Mailer:
unignore User-Agent:
unignore X-Junked-Because:
unignore X-SpamProbe:
unignore X-Virus-hagbard:
hdr_order From: Subject: To: CC: BCC: Reply-To: Mail-Followup-To: Date:
Organization: User-Agent: X-Mailer:
set sidebar_visible
set sidebar_width
bind index \CP sidebar-prev
bind index \CN sidebar-next
bind index \CO sidebar-open
bind pager \CP sidebar-prev
bind pager \CN sidebar-next
bind pager \CO sidebar-open
mailboxes /var/mail/user
mailboxes ~/sent



Re: keyboard paste address in compose, To: line

2009-09-03 Thread Gary Johnson
On 2009-09-03, brownh  wrote:
> Often, when composing a message, I want to past an address in the To: 
> line without using my mouse. However, the usual C-y or C-v keyboard 
> commands don't work. Any suggestions?

Here's an idea.  Mutt has a 'query_command' variable (see the mutt
manual) that's intended to allow the user to query an external
database of addresses.  It's normally invoked by typing Ctrl-T while
entering an address at the To: or other address prompt.  You could
set this variable to "xclip -o" (I'm not sure about the options)
where xclip is a command-line program for accessing the X clipboard.

If you're already using 'query_command' to access an address
database, you could simply write a wrapper that would do something
like integrate the clipboard output with the other address choices,
or recognize an empty address line or special character on the
address line as a trigger to use xclip instead of the database.

> If I may, a minor secondary question. When I type in an address on the 
> To: line, the insertion point is not visible. This is annoying when I 
> need to go back to correct a typo. I don't know where I am so that I 
> can do a DEL or type at the right place. Can I change this behavior?

I believe this is a terminal issue.

HTH,
Gary




S/MIME recipient address/key selection

2009-09-03 Thread Morris, Patrick
I've been wrestling with this for a while, and I'm finally at the point
where I think I need help.

I've got a working S/MIME setup with mutt, and everything's great except
when it comes to selecting the right key to use when S/MIME kicks in.

For example, I have two keys: one for patrick.mor...@hp.com and another
for anotheraddr...@somewhereelse.com. When encrypted mail comes in to
anotheraddr...@somewhereelse.com, what I'd really like (and what I could
swear I've had before) is for mutt to use the key that matches that
email, but it doesn't even seem to look at the "To:" address.

Instead, I get something more like the following:

Enter keyID for pmor...@myhostname.mydomain.com:

The above is an example... what I get is the FQDN of my local machine,
which does not appear anywhere in the email message itself.

Below are my S/MIME config settings, which I'm using on Mutt 1.5.20
(2009-06-14, Gentoo 1.5.20-r4):

set smime_is_default
set smime_timeout=7200
set smime_ask_cert_label

set smime_default_key="cf8014d7.0"  # my KeyID
unset smime_decrypt_use_default_key

set smime_ca_location="/etc/ssl/certs"
set smime_certificates="~/.smime/certificates"
set smime_keys="~/.smime/keys"
set smime_encrypt_with="des3"

set smime_pk7out_command="openssl smime -verify -in %f -noverify -pk7out"
set smime_get_cert_command="openssl pkcs7 -print_certs -in %f"
set smime_get_signer_cert_command="openssl smime -verify -in %f -noverify 
-signer %c -out /dev/null"
set smime_get_cert_email_command="openssl x509 -in  %f -noout -email"
set smime_import_cert_command="smime_keys add_cert %f"
set smime_encrypt_command="openssl smime -encrypt -%a -outform DER -in %f %c"
set smime_sign_command="openssl smime -sign -signer %c -inkey %k -passin
stdin -in %f -certfile %i -outform DER"
set smime_decrypt_command="openssl smime -decrypt  -passin stdin -inform DER 
-in %f -inkey %k -recip %c"
set smime_verify_command="openssl smime -verify -inform DER -in %s %C -content 
%f"
set smime_verify_opaque_command="openssl smime -verify -inform DER -in %s %C || 
openssl smime -verify -inform DER -in %s -noverify 2>/dev/null"



Re: keyboard paste address in compose, To: line

2009-09-03 Thread Patrick Gen-Paul

brownh wrote:
Often, when composing a message, I want to past an address in the To: 
line without using my mouse. However, the usual C-y or C-v keyboard 
commands don't work. Any suggestions?


What terminal are you running mutt in?

How do you select the address you want to paste?

Where are you copying from - same mutt session, an address book running 
in another terminal?


Are you running a "Desktop environment"?

I run mutt under gnu/screen, a terminal multiplexer that provides a 
powerful copy/paste mechanism between "windows".


You may want to read this:

http://www.kuro5hin.org/story/2004/3/9/16838/14935

If I may, a minor secondary question. When I type in an address on the 
To: line, the insertion point is not visible. This is annoying when I 
need to go back to correct a typo. I don't know where I am so that I 
can do a DEL or type at the right place. Can I change this behavior?


Does not happen here in an xterm.

If the "To:" line is at the bottom of the screen, I have seen something 
similar on the linux (framebuffer) console. In the case of a bash shell, 
a Ctrl-L would re-display the screen with the command input line at the 
top of the screen and make the cursor visible again. Not that this would 
help with mutt, of course.


Otherwise if your default cursor is of the "underline" type, you could 
check whether your terminal has an option to set it to something more 
visible such as a block cursor?


Gen-Paul.




[solved] Re: Selecting INBOX...gdbm fatal: lseek error

2009-09-03 Thread Tim Tebbit
Tim Tebbit wrote:

> set header_cache=~/.mutt/cache/headers
> set message_cachedir=~/.mutt/cache/bodies
> set certificate_file=~/.mutt/certificates

After reviewing my post I saw this. And decided to try rm -r .mutt which
worked like a charm.

I still have no idea the why behind this. Could someone fill me in?



[pgenp...@gmail.com: Re: keyboard paste address in compose, To: line]

2009-09-03 Thread brownh
- Forwarded message from Patrick Gen-Paul  -

Envelope-to: bro...@localhost
Delivery-date: Thu, 03 Sep 2009 14:44:11 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: 
AjgCACuin0qnzgTGkWdsb2JhbACSAok7AQEBAQkLCgcTA61ykVSEGwU
X-IronPort-AV: E=Sophos;i="4.44,326,1249254000"; 
d="scan'208";a="134970770"
From: Patrick Gen-Paul 
Subject: Re: keyboard paste address in compose, To: line
To: mutt-users@mutt.org
List-Post: 
List-Unsubscribe: send mail to majord...@mutt.org, body only "unsubscribe 
mutt-users"
X-Virus-Scanned: clamav-milter 0.95.2 at mail-hub-c.omnis.com
X-Virus-Status: Clean
X-Spam-Status: No, score=0.0 required=5.0 report=
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on postoffice.omnis.com

brownh wrote:
> Often, when composing a message, I want to past an address in the To:  
> line without using my mouse. However, the usual C-y or C-v keyboard  
> commands don't work. Any suggestions?

What terminal are you running mutt in?

How do you select the address you want to paste?

Where are you copying from - same mutt session, an address book running in 
another terminal?

Are you running a "Desktop environment"?

I run mutt under gnu/screen, a terminal multiplexer that provides a  
powerful copy/paste mechanism between "windows".

You may want to read this:

http://www.kuro5hin.org/story/2004/3/9/16838/14935

> If I may, a minor secondary question. When I type in an address on the  
> To: line, the insertion point is not visible. This is annoying when I  
> need to go back to correct a typo. I don't know where I am so that I  
> can do a DEL or type at the right place. Can I change this behavior?

Does not happen here in an xterm.

If the "To:" line is at the bottom of the screen, I have seen something  
similar on the linux (framebuffer) console. In the case of a bash shell, a 
Ctrl-L would re-display the screen with the command input line at the top 
of the screen and make the cursor visible again. Not that this would help 
with mutt, of course.

Otherwise if your default cursor is of the "underline" type, you could  
check whether your terminal has an option to set it to something more  
visible such as a block cursor?

Gen-Paul.



- End forwarded message -


Mail index page lines in X window (was Re: Associating..."mbox" in Firefox)

2009-09-03 Thread Thomas Baker
On Sun, Aug 30, 2009 at 04:22:03PM -0400, Thomas Baker wrote:
> So that when I clicked on a link such as:
> 
> 
> Foobar
> 
> 
> in Firefox, it would run mutt, opening the mailbox bar.mbox.  It
> was fantastic!

It may interest readers of this list to know that I was able to solve
this problem by downloading and installing rxvt, then modifying mbox.bat
to execute:


C:\Cygwin\bin\rxvt.exe -fn courier -fg Black -bg Wheat -sr -e E:\mbox.sh 
"%1"


This works great - I can open mbox files with mutt by clicking
on them in Firefox.

However, now I have a different (though minor) problem, which
may in fact be more closely related to mutt than my original
question:

When I call up mutt, the first mail line covers the help line, like this:

q:Q1   T 2009-05-27 John Johnston10K  RE: Metadaten
   2 r T 2009-05-27 John Johnston10K  |=>
   3 r C 2009-05-29 Barbara Jones13K  `->  

Only when I read a message and return to the index do the index lines return
to their proper position, showing the help line:

q:Quit  d:Del  u:Undel  s:Save  m:Mail  r:Reply  g:Group  ?:Help
   1   T 2009-05-27 John Johnston10K  RE: Metadaten
   2 r T 2009-05-27 John Johnston10K  |=>
   3 r C 2009-05-29 Barbara Jones13K  `->  

A minor annoyance, but is this perhaps a known problem, particularly with X 
windows?

Many thanks,
Tom Baker

-- 
Tom Baker 


Re: keyboard paste address in compose, To: line

2009-09-03 Thread brownh
I'm running a rxvt-unicode terminal. In it (and in mutt), text
selected with the mouse (and pointer location) shows up in reverse
color. However, the only way I know how to mark, copy and paste is
with the use of the mouse. Much of my work is with emacs, where
selecting text, copying and pasting from the keyboard is no problem.

My addresses are not in a database, although a simple little one would
make sense (a lot of categories for groups of addresses). I think
I'll try to identify a simple database that I can run in
console/emacs, but then the issue remains the same (I do run bbdb in
emacs, but have never tried to develop its use for multiple address
books).

But the answer would seem to be the screen utility. I was not aware of
it, and thank you for pointing it out. By spawning a terminal
with it, I gain access to mark, copy and paste, and so this should
work in any terminal application, including mutt.

I've not tried it yet, but it sounds like it will work.

Thanks.

Haines Brown



Re: keyboard paste address in compose, To: line

2009-09-03 Thread Derek Martin

On Thu, Sep 03, 2009 at 01:19:43PM -0400, brownh wrote:
> Often, when composing a message, I want to past an address in the To: 
> line without using my mouse. However, the usual C-y or C-v keyboard 
> commands don't work. Any suggestions?

Under Unix, the pasting is possible, but I know of no way to copy
something to the X (i.e. The X Window System) clipboard without using
the mouse.  But whereas in Windows, if you highlight something to copy
it, it is simply highlighted until you press ctrl-c, under X if you
highlight it, it is automatically and immediately copied to the
clipboard.  As others have pointed out, the pasting key binding is
dependent on the terminal program you're using, and is probably
configurable.

Note in particular that ctrl-x/c/v are primarily Windows keyboard
shortcuts, which a handful of platform-independent GUI programs have
copied.  You should generally not expect they will work in a Unix
environment, though they sometimes do (e.g. Firefox, etc.).  In
terminal-oriented programs like Mutt, ctrl-c normally will cause the
foreground process (the currently running program) to terminate.

As for pasting, if you are using xterm, or some other xterm-like
program, you can generally paste something which is already in your
clipboard by pressing shift-insert.

> If I may, a minor secondary question. When I type in an address on the 
> To: line, the insertion point is not visible. This is annoying when I 
> need to go back to correct a typo. I don't know where I am so that I 
> can do a DEL or type at the right place. Can I change this behavior?

With most X terminal programs, the insertion point is wherever your
cursor is.  This is usually fixed (i.e. it changes only when you
type), though with some modern terminal programs it may sometimes be
possible to drag the cursor around with the mouse.  Again, this
behavior is terminal-dependent, and may also be dependent on the
program which is running in the terminal window.

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgp0KC2BRTCOu.pgp
Description: PGP signature


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Gary Johnson
On 2009-09-03, brownh  wrote:
> I'm running a rxvt-unicode terminal. In it (and in mutt), text
> selected with the mouse (and pointer location) shows up in reverse
> color. However, the only way I know how to mark, copy and paste is
> with the use of the mouse. Much of my work is with emacs, where
> selecting text, copying and pasting from the keyboard is no problem.
> 
> My addresses are not in a database, although a simple little one would
> make sense (a lot of categories for groups of addresses). I think
> I'll try to identify a simple database that I can run in
> console/emacs, but then the issue remains the same (I do run bbdb in
> emacs, but have never tried to develop its use for multiple address
> books).

Just to clarify, I was not suggesting that you use a database; I was
suggesting that you hijack that mutt function to access the xclip
command, which prints the clipboard contents to stdout.  Then, when
you are at the To: prompt, typing Ctrl-T will insert the contents of
the clipboard into the To: line.

> But the answer would seem to be the screen utility. I was not aware of
> it, and thank you for pointing it out. By spawning a terminal
> with it, I gain access to mark, copy and paste, and so this should
> work in any terminal application, including mutt.

That's true, and I use it frequently, but it will only copy and
paste among windows running in that terminal.  You can't, for
example, use it to copy from Firefox and paste into mutt.

Regards,
Gary




Re: keyboard paste address in compose, To: line

2009-09-03 Thread Gary Johnson
On 2009-09-03, Derek Martin  wrote:
> 
> On Thu, Sep 03, 2009 at 01:19:43PM -0400, brownh wrote:
> > Often, when composing a message, I want to past an address in the To: 
> > line without using my mouse. However, the usual C-y or C-v keyboard 
> > commands don't work. Any suggestions?
> 
> Under Unix, the pasting is possible, but I know of no way to copy
> something to the X (i.e. The X Window System) clipboard without using
> the mouse. 

Man page:

http://linux.die.net/man/1/xclip

Source:

http://sourceforge.net/projects/xclip/

Regards,
Gary




Re: [solved] Re: Selecting INBOX...gdbm fatal: lseek error

2009-09-03 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Thursday, September  3 at 02:04 PM, quoth Tim Tebbit:
>> set header_cache=~/.mutt/cache/headers
>> set message_cachedir=~/.mutt/cache/bodies
>> set certificate_file=~/.mutt/certificates
>
>After reviewing my post I saw this. And decided to try rm -r .mutt which
>worked like a charm.
>
>I still have no idea the why behind this. Could someone fill me in?

It sounds like you got a corrupted file there somehow. Of course, 
since it's just a cache, it's safe to delete it and let mutt start 
over.

~Kyle
- -- 
Imagine what it would be like if TV actually were good. It would be 
the end of everything we know.
   -- Marvin Minsky
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKoC7mAAoJECuveozR/AWepWYP+gM4SZT7AR5gSDQNMaOGekN0
EHIKlCy7sgjfI0X/TS+bokSiSTZgMjvlB+gae7InaGOORB8gS/IczV+VGF3vU3xz
kHKwq7ibsy3rtTiE1W++LeuOGOSv3zSh6jQROeNPfGwwzbnxyYvsuFvtg8ymR2U9
Gx2rXWHhe6jagr9LB7hNMGUcTaxoyKYaPlt6R9OhAQ+ZP45D6+Fgj5mXEq+Hk2RH
jacAPAzA7MhJa32z6qd0fRaBPQJ19l6S+XSZqS2O0XmPA6cW+HB0yUum4HSGW0sg
sgdt+rgl5KxbokH8vVrlWYSUNymHVPfK8dhxyIBfBABGmPcmioHduGul8HoP4HzF
X2n9gn/LEririMxkngoRnOoxLeF+nMAKJ9OI5JViD2w2NgNFyjbpZyCQjXTW+ycX
AFtf5OysuDMvsOJwPZlewUhv00KzN5jFD57i832wZU4AHsXCFzbsAwtdGtuy0K0q
FuB/r29lfQe0DXwrY+tHBMQZM5S91YxEG8usM0XW/WVtL6wCzonqp9YMsy7toR7a
ZfdAL0bxgzFRybT5UzHIWT5v+fpHPQNFo3ujujTKolxI+0Yl9D9mpbuKdXjGIcgV
P19I9q6HJbQ1uClqThWFSOmWcmU/YDheUW4RGuujm78PtrCjmLB2XaxQEEdW45fO
QV7kRoKPbZXVT6P3w12X
=njk7
-END PGP SIGNATURE-


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Dave Dodge
On Thu, Sep 03, 2009 at 03:10:17PM -0500, Derek Martin wrote:
> under X if you highlight it, it is automatically and immediately
> copied to the clipboard.

It's more complicated than that:

  http://www.jwz.org/oc/x-cut-and-paste.html

Some of the newer applications, toolkits, and desktop managers may try
to hide the details.  For example Gnome has a built-in clipboard
service which monitors selection activity and grabs a copy of any
selected data.  I think KDE has something similar, and there's an
old standalone "xclipboard" program which does the same thing.

Back in the 90s the mess was much more user-visible, especially if you
were running Sun OpenLook applications alongside plain X11
applications.

  -Dave Dodge


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Chris G
On Thu, Sep 03, 2009 at 05:56:42PM -0400, Dave Dodge wrote:
> On Thu, Sep 03, 2009 at 03:10:17PM -0500, Derek Martin wrote:
> > under X if you highlight it, it is automatically and immediately
> > copied to the clipboard.
> 
> It's more complicated than that:
> 
>   http://www.jwz.org/oc/x-cut-and-paste.html
> 
> Some of the newer applications, toolkits, and desktop managers may try
> to hide the details.  For example Gnome has a built-in clipboard
> service which monitors selection activity and grabs a copy of any
> selected data.  I think KDE has something similar, and there's an
> old standalone "xclipboard" program which does the same thing.
> 
> Back in the 90s the mess was much more user-visible, especially if you
> were running Sun OpenLook applications alongside plain X11
> applications.
> 
... but even "Back in the 90s" the 'mess' was a whole lot more usable
than MS Windows cut and paste.

-- 
Chris Green



Re: Associating mutt/cygwin with MIME Type "mbox" in Firefox

2009-09-03 Thread George Davidovich
On Sun, Aug 30, 2009 at 04:22:03PM -0400, Thomas Baker wrote:
> I use mutt with Cygwin and Windows XP.

Your problems are unrelated to mutt and would be more appropriate on the
Cygwin mailing list and/or Firefox forums.  But out of sympathy and
because the underlying *nix/Windows questions tend not to fall into any
single category, I'll try to answer the questions you've already asked and
beg everyone's indulgence, or at least hope no one notices or complains.
;-)

> Until Firefox release 2.0.0.12, I very happily used the plug-in MIME
> Edit [1] to associate the extension ".mbox" with a batch file,
> mbox.bat:

I'd recommend you start first with investigating one of the
network.protocol-handler settings made available in about:config.
 
> 
> @echo off
> c:\cygwin\bin\bash.exe -i e:\u\config\mbox.sh "%1"
> 

Ugh.  And if the value passed to mbox.sh is 

  C:\Documents and Settings\Thomas Baker\Mail\some.mbox

you expect mutt to do what? 

Aside from being ugly and unmanageable. there's generally no reason to
write DOS batch files or use per-application wrapper scripts as Cygwin
provides you with more sane alternatives, none of which are plagued by
the file association nonsense and the lack of a meaningful path that
Windows traditionally suffers from.  Assuming you had the foresight when
installing Cygwin to add the Windows equivalent of /c/Cygwin/bin and
~/bin to your path (Start -> Run -> sysdm.cpl -> Advanced / Environment
Variables), and you have ~/.Xdefaults configured (irrespective of
whether you're running X), the following would be preferrable

rxvt -e mutt -f /path/to/mbox
rxvt -e bash
bash -c /path/to/script
perl ...
python ...

Each of the above could be used most anywhere a regular Windows command
or program is used (the 'Start -> Run' dialog, for example), and if the
full Windows-style path to the first program called is provided,
everywhere else (shortcuts, configurable menu or toolbar items,
registry, etc.).

As a side note, on Windows, installed programs (third-party utilities,
GUI programs, etc.) are rarely in your path, so be sure to symlink any
or all of them into some place like ~/bin, giving them meaningful names
(preferrably lowercase and without .EXE extensions) in the process.

The ugly exception to all this harmony occurs when you're mixing Cygwin
and Windows programs and need to reference a path other than the current
working directory.  Cygwin programs require Unix paths, and Windows
programs require Windows paths.  In the registry, DOS files, etc., any
%1 %2 ... arguments that end up being passed to a Cygwin program must be
converted to a Unix-style path *before* the program receives it (modulo
cd tricks); the inverse is also true.  See below for my solution.

> which ran mbox.sh - essentially:
> 
> 
> #!/bin/bash
> mutt -F /home/tbaker/u/config/muttrc/muttrc -f "$1"
> 
>
> So that when I clicked on a link such as:
> 
> 
> Foobar
> 
> 
> in Firefox, it would run mutt, opening the mailbox bar.mbox.  It
> was fantastic!

If you say so.  ;-)

> With Firefox 3, I can use a "patched" version of [1] (see [2])
> to associate the extension ".mbox" with mbox.bat, as before --
> only this time it does not work.  When I click on a link, nothing
> happens.
> 
> This is perhaps ultimately a Firefox issue, having to do perhaps
> with the way arguments are passed.  

What I would do is configure mime edit or Firefox to use the "default
associations".  To create those default associations so that you can
click away on URLs that reference mbox files (i.e., have an '.mbox'
extension) or whatever it is you're trying to do, you can use the
following working but minimal regfile:

-cut here
Windows Registry Editor Version 5.00

; Associate .mbox extension with rxvt -e mutt (without batch files
; or wrappers), using run(1) to deal with cmd.exe window issues.

[HKEY_CLASSES_ROOT\.mbox]
@="mboxfile"

[HKEY_CLASSES_ROOT\mboxfile]

[HKEY_CLASSES_ROOT\mboxfile\shell]

[HKEY_CLASSES_ROOT\mboxfile\shell\open]

[HKEY_CLASSES_ROOT\mboxfile\shell\open\command]
@="c:\\cygwin\\bin\\run.exe bash --login -c \"rxvt -e mutt -f \\\"`cygpath -u 
'%1'`\\\"\""
-cut here

Mind the wordwrap, and save the file with DOS line-endings.

> I'm raising the issue on this list because I'm thinking there must be
> people out there who also really want to run mutt from within
> Firefox...

You'd probably be wrong. If you don't regularly keep a terminal window
open or are otherwise typing averse, I'd suggest a Windows desktop
shortcut configured with 'c:\cygwin\bin\rxvt.exe -e

Re: keyboard paste address in compose, To: line

2009-09-03 Thread Derek Martin
On Thu, Sep 03, 2009 at 01:42:32PM -0700, Gary Johnson wrote:
> Man page:
> 
> http://linux.die.net/man/1/xclip

That's neat, but I don't really see how it's going to help here,
given that the OP wants to paste an address.  He'd have to have a way
to output exactly the address he wants to stdout for xclip to be able
to get it in the clipboard, as far as I can see.  I'm sure that's
possible, but it's likely to be substantially less convenient than
selecting and pasting it with the mouse (or just typing it in).

I interpreted the OP's message to mean approximately that he wants to
be able to select arbitrary text that's already in his terminal
window, and then paste it, all without using the mouse.  This doesn't
seem to provide any way to do that.

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgp2xDtsLUHJ8.pgp
Description: PGP signature


Re: Mail index page lines in X window (was Re:

2009-09-03 Thread George Davidovich
On Thu, Sep 03, 2009 at 03:52:38PM -0400, Thomas Baker wrote:
> On Sun, Aug 30, 2009 at 04:22:03PM -0400, Thomas Baker wrote:
> > So that when I clicked on a link such as:
> > 
> > 
> > Foobar
> > 
> > 
> > in Firefox, it would run mutt, opening the mailbox bar.mbox.  It
> > was fantastic!
> 
> It may interest readers of this list to know that I was able to solve
> this problem by downloading and installing rxvt, then modifying mbox.bat
> to execute:
> 
> 
> C:\Cygwin\bin\rxvt.exe -fn courier -fg Black -bg Wheat -sr -e E:\mbox.sh 
> "%1"
> 

See my previous reply.

Ugh, again.  Configure ~/.Xdefaults with the following and you can skip
the overlong command line:

  Rxvt*scrollBar: false
  Rxvt*font: Courier
  Rxvt*foreground: #00
  Rxvt*background: #d8d8bf
  Rxvt*geometry: 86x34+27+58

Lots of other options available, none of which needs to be repeated
unecessarily in batch files or scripts.

> This works great - I can open mbox files with mutt by clicking
> on them in Firefox.
> 
> However, now I have a different (though minor) problem, which
> may in fact be more closely related to mutt than my original
> question:
> 
> When I call up mutt, the first mail line covers the help line, like
> this:
> 
> q:Q1   T 2009-05-27 John Johnston10K  RE: Metadaten
>2 r T 2009-05-27 John Johnston10K  |=>
>3 r C 2009-05-29 Barbara Jones13K  `->  
> 
> Only when I read a message and return to the index do the index lines
> return to their proper position, showing the help line:
> 
> q:Quit  d:Del  u:Undel  s:Save  m:Mail  r:Reply  g:Group  ?:Help
>1   T 2009-05-27 John Johnston10K  RE: Metadaten
>2 r T 2009-05-27 John Johnston10K  |=>
>3 r C 2009-05-29 Barbara Jones13K  `->  
> 
> A minor annoyance, but is this perhaps a known problem, particularly
> with X windows?

Sorry, no idea what your lastest problem is, but I'll point out again
that Cygwin's rxvt doesn't require X to be running.  If you are running
X, then ask your questions on the Cygwin X list. 

-- 
George


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Gary Johnson
On 2009-09-03, Derek Martin  wrote:
> On Thu, Sep 03, 2009 at 01:42:32PM -0700, Gary Johnson wrote:
> > Man page:
> > 
> > http://linux.die.net/man/1/xclip
> 
> That's neat, but I don't really see how it's going to help here,
> given that the OP wants to paste an address.  He'd have to have a way
> to output exactly the address he wants to stdout for xclip to be able
> to get it in the clipboard, as far as I can see.  I'm sure that's
> possible, but it's likely to be substantially less convenient than
> selecting and pasting it with the mouse (or just typing it in).
> 
> I interpreted the OP's message to mean approximately that he wants to
> be able to select arbitrary text that's already in his terminal
> window, and then paste it, all without using the mouse.  This doesn't
> seem to provide any way to do that.

I just re-read the original message.  I had read "paste" and "C-v"
and seen that there was no "copy" but missed the "C-y" part and
assumed that the address was in the clipboard.  I now think you're
right:  xclip doesn't really solve his problem.  Thanks.

Regards,
Gary




Re: keyboard paste address in compose, To: line

2009-09-03 Thread Patrick Gen-Paul

Gary Johnson wrote:

[..]


That's true, and I use it frequently, but it will only copy and
paste among windows running in that terminal.  You can't, for
example, use it to copy from Firefox and paste into mutt.


But in this instance, you still have to use the mouse to select what you 
paste to the X clipboard?


Which is the part that I really find inconvenient.

Once you've managed to select what you really wanted, copying it to a 
terminal is only a middle-click away.


Since I use ELinks for 99% of my browsing, this is rarely an issue for 
me but I'll keep your tip in mind.


Is their anyway I could copy something mutt+vim to the clipboard and 
retrieve it in Seamonkey via a Ctrl-V for instance?


Thanks,

Gen-Paul.


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Thomas Baker
On Thu, Sep 03, 2009 at 03:10:17PM -0500, Derek Martin wrote:
> Note in particular that ctrl-x/c/v are primarily Windows keyboard
> shortcuts, which a handful of platform-independent GUI programs have
> copied.  You should generally not expect they will work in a Unix
> environment, though they sometimes do (e.g. Firefox, etc.).  In
> terminal-oriented programs like Mutt, ctrl-c normally will cause the
> foreground process (the currently running program) to terminate.
> 
> As for pasting, if you are using xterm, or some other xterm-like
> program, you can generally paste something which is already in your
> clipboard by pressing shift-insert.

I run mutt on Cygwin in a Windows console window and can paste between
console windows as follows:

[Mark with mouse] -> Alt-Shift -> [E]dit -> Mar[K]
change windows
Alt-Shift -> [E]dit -> [P]aste

Tom

-- 
Tom Baker 


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Derek Martin
On Thu, Sep 03, 2009 at 06:26:50PM -0400, Thomas Baker wrote:
> I run mutt on Cygwin in a Windows console window 

Yuck.  Why? :)  FWIW, you can run startx (in cygwin) and use a proper
xterm, and save a lot of hastle.  The windows console is next to
useless to me, and I find the fonts are horrible at the sizes I'd
prefer to have them.  Anything comfortable to read is too large.

> and can paste between console windows as follows:
> 
> [Mark with mouse] -> Alt-Shift -> [E]dit -> Mar[K]
> change windows
> Alt-Shift -> [E]dit -> [P]aste

Yeah, highlight + middle click is so much easier, and works between
xterm and windows even.  You just have to remember to hit ctrl-c to
copy when you're copying from windows (or select it from the menu),
and ctrl-v when you're pasting into windows (or menu).

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpODa6QcdN0W.pgp
Description: PGP signature


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Gary Johnson
On 2009-09-03, Patrick Gen-Paul  wrote:
> Gary Johnson wrote:
> 
> [..]
> 
> >That's true, and I use it frequently, but it will only copy and
> >paste among windows running in that terminal.  You can't, for
> >example, use it to copy from Firefox and paste into mutt.
> 
> But in this instance, you still have to use the mouse to select what you 
> paste to the X clipboard?
> 
> Which is the part that I really find inconvenient.
> 
> Once you've managed to select what you really wanted, copying it to a 
> terminal is only a middle-click away.
> 
> Since I use ELinks for 99% of my browsing, this is rarely an issue for 
> me but I'll keep your tip in mind.

After Derek's comment I re-read your post and see now that I
misunderstood your situation.  You're right:  once you've got your
hand on the mouse, you might as well use it for both copying and
pasting.

> Is their anyway I could copy something mutt+vim to the clipboard and 
> retrieve it in Seamonkey via a Ctrl-V for instance?

For vim, it depends on your terminal and on the way vim was built
and configured, but you can usually access the clipboard from vim
via the + and/or * registers.  For example,

"+yiw

will yank the word under the cursor to the clipboard.  See

:help x11-selection

for more on this.

There is no way that I know of to do this from mutt.  However, there
is a command-line interface to screen, so you might be able to
transfer the contents of screen's copy buffer to the X clipboard
(actually the selection or cut buffer) by using a mutt macro calling
screen and xclip.  I've never looked into doing that, though.

Regards,
Gary




Re: keyboard paste address in compose, To: line

2009-09-03 Thread Patrick Gen-Paul

Gary Johnson wrote:

On 2009-09-03, Patrick Gen-Paul  wrote:

Gary Johnson wrote:

[..]


Is their anyway I could copy something mutt+vim to the clipboard and 
retrieve it in Seamonkey via a Ctrl-V for instance?


Ahem.. "there"..? maybe - I'll have to remember proofreading one's mail 
is not an option.



For vim, it depends on your terminal and on the way vim was built
and configured, but you can usually access the clipboard from vim
via the + and/or * registers.  For example,

"+yiw

will yank the word under the cursor to the clipboard.  See

:help x11-selection

for more on this.

There is no way that I know of to do this from mutt.  However, there
is a command-line interface to screen, so you might be able to
transfer the contents of screen's copy buffer to the X clipboard
(actually the selection or cut buffer) by using a mutt macro calling
screen and xclip.  I've never looked into doing that, though.


Seems that doing it in screen rather than vim would be the better choice 
since it would work with every application that I use on a daily basis.


I could even use it in ELinks when I'm faced with one of those annoying 
messages that tell me that I need to install a better browser because 
mine does not support JS and then have to go through the motions of 
starting Seamonkey, copy/paste the URL.. etc.


Does not happen very often, but a nuisance when it does.

I'm pretty sure that a bit like mutt, gnu/screen supports piping its 
commands to an external application, but I'm don't see at a glance how 
this could be implemented.


I'll play with it a bit and ask the screen-users list if I'm stuck.

Thanks much for your comments..!

Gen-Paul.


Re: keyboard paste address in compose, To: line

2009-09-03 Thread bill lam
On Thu, 03 Sep 2009, Patrick Gen-Paul wrote:
> I'm pretty sure that a bit like mutt, gnu/screen supports piping its
> commands to an external application, but I'm don't see at a glance
> how this could be implemented.

You can use screen bindkey.  Adding the following into ~/.screenrc,
the xsel serves the same purpose as the xclip and you may also change
the option to use clipboard instead of x selection.

-- 8< --

# set the second mark, write to the screen-exchange
# file, and use xsel to synchronize the paste buffer
# with the X selection.
bindkey -m > eval "stuff ' '" writebuf "exec sh -c 'xsel < 
/tmp/screen-exchange'"
bindkey < eval "stuff ' '" "exec sh -c 'xsel -o > /tmp/screen-exchange'" readbuf

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Thomas Baker
On Thu, Sep 03, 2009 at 05:47:45PM -0500, Derek Martin wrote:
> > I run mutt on Cygwin in a Windows console window 
> 
> Yuck.  Why? :)  

Well I'm glad you asked that question... :-)

> FWIW, you can run startx (in cygwin) and use a proper
> xterm, and save a lot of hastle.  The windows console is next to
> useless to me, and I find the fonts are horrible at the sizes I'd
> prefer to have them.  Anything comfortable to read is too large.

I'm probably older than most people on this list, and I was
never able to reproduce the nice, large, readable interface of a
Windows console window with 10x18 Raster fonts in a 120x45
window, black letters on grey, in any xterm window, though I'm
sure it could be done if I had fiddled long enough with the
settings.

> > and can paste between console windows as follows:
> > 
> > [Mark with mouse] -> Alt-Shift -> [E]dit -> Mar[K]
> > change windows
> > Alt-Shift -> [E]dit -> [P]aste
> 
> Yeah, highlight + middle click is so much easier, and works between
> xterm and windows even.  You just have to remember to hit ctrl-c to
> copy when you're copying from windows (or select it from the menu),
> and ctrl-v when you're pasting into windows (or menu).

I can't deny it - it's the price I pay to get the look I want.
Even worse, my netbook has the German version of Windows XP, so
I have to remember to type Alt-Shift,B,K instead of
Alt-Shift,E,P...  :-(

Tom

-- 
Tom Baker 


Re: Associating mutt/cygwin with MIME Type "mbox" in Firefox

2009-09-03 Thread Thomas Baker
On Thu, Sep 03, 2009 at 03:02:47PM -0700, George Davidovich wrote:
> > I use mutt with Cygwin and Windows XP.
> 
> Your problems are unrelated to mutt and would be more appropriate on the
> Cygwin mailing list and/or Firefox forums.  

That did occur to me.

> But out of sympathy and
> because the underlying *nix/Windows questions tend not to fall into any
> single category, I'll try to answer the questions you've already asked and
> beg everyone's indulgence, or at least hope no one notices or complains.
> ;-)

Deeply appreciated :-)

> > Until Firefox release 2.0.0.12, I very happily used the plug-in MIME
> > Edit [1] to associate the extension ".mbox" with a batch file,
> > mbox.bat:
> 
> I'd recommend you start first with investigating one of the
> network.protocol-handler settings made available in about:config.
>  
> > 
> > @echo off
> > c:\cygwin\bin\bash.exe -i e:\u\config\mbox.sh "%1"
> > 
> 
> Ugh.  And if the value passed to mbox.sh is 
> 
>   C:\Documents and Settings\Thomas Baker\Mail\some.mbox
> 
> you expect mutt to do what? 

I'm an old-timer and have banned spaces from any filenames in my
data drive.

> Aside from being ugly and unmanageable. there's generally no reason to
> write DOS batch files or use per-application wrapper scripts as Cygwin
> provides you with more sane alternatives, none of which are plagued by
> the file association nonsense and the lack of a meaningful path that
> Windows traditionally suffers from.  

This is indeed good news.

>  Assuming you had the foresight when
> installing Cygwin to add the Windows equivalent of /c/Cygwin/bin and
> ~/bin to your path (Start -> Run -> sysdm.cpl -> Advanced / Environment
> Variables), and you have ~/.Xdefaults configured (irrespective of
> whether you're running X), the following would be preferrable
> 
> rxvt -e mutt -f /path/to/mbox
> rxvt -e bash
> bash -c /path/to/script
> perl ...
> python ...
> 
> Each of the above could be used most anywhere a regular Windows command
> or program is used (the 'Start -> Run' dialog, for example), and if the
> full Windows-style path to the first program called is provided,
> everywhere else (shortcuts, configurable menu or toolbar items,
> registry, etc.).
> 
> As a side note, on Windows, installed programs (third-party utilities,
> GUI programs, etc.) are rarely in your path, so be sure to symlink any
> or all of them into some place like ~/bin, giving them meaningful names
> (preferrably lowercase and without .EXE extensions) in the process.
> 
> The ugly exception to all this harmony occurs when you're mixing Cygwin
> and Windows programs and need to reference a path other than the current
> working directory.  Cygwin programs require Unix paths, and Windows
> programs require Windows paths.  In the registry, DOS files, etc., any
> %1 %2 ... arguments that end up being passed to a Cygwin program must be
> converted to a Unix-style path *before* the program receives it (modulo
> cd tricks); the inverse is also true.  See below for my solution.

Finally, the explanation I have long craved!  Thank you!!  I'm going to
have to digest this in bits.

> > which ran mbox.sh - essentially:
> > 
> > 
> > #!/bin/bash
> > mutt -F /home/tbaker/u/config/muttrc/muttrc -f "$1"
> > 
> >
> > So that when I clicked on a link such as:
> > 
> > 
> > Foobar
> > 
> > 
> > in Firefox, it would run mutt, opening the mailbox bar.mbox.  It
> > was fantastic!
> 
> If you say so.  ;-)

I will start a separate thread on this, in case others are
interested...

> > With Firefox 3, I can use a "patched" version of [1] (see [2])
> > to associate the extension ".mbox" with mbox.bat, as before --
> > only this time it does not work.  When I click on a link, nothing
> > happens.
> > 
> > This is perhaps ultimately a Firefox issue, having to do perhaps
> > with the way arguments are passed.  
> 
> What I would do is configure mime edit or Firefox to use the "default
> associations".  To create those default associations so that you can
> click away on URLs that reference mbox files (i.e., have an '.mbox'
> extension) or whatever it is you're trying to do, you can use the
> following working but minimal regfile:
> 
> -cut here
> Windows Registry Editor Version 5.00
> 
> ; Associate .mbox extension with rxvt -e mutt (without batch files
> ; or wrappers), using run(1) to deal with cmd.exe window issues.
> 
> [HKEY_CLASSES_ROOT\.mbox]
> @="mboxfile"
> 
> [HKEY_CLASSES_ROOT\mboxfile]
> 
> [HKEY_CLASSES_ROOT\mboxfile\shell]

The MBOX file paradigm

2009-09-03 Thread Thomas Baker
On Thu, Sep 03, 2009 at 03:02:47PM -0700, George Davidovich wrote:
> > So that when I clicked on a link such as:
> > 
> > 
> > Foobar
> > 
> > 
> > in Firefox, it would run mutt, opening the mailbox bar.mbox.  It
> > was fantastic!
> 
> If you say so.  ;-)

Computer-wise, I grew up reading mail with

/usr/ucb/mail -f mbox

where "mbox" was a file in the "mbox" format.

I have never really recovered from my indignation at seeing
email clients (as far as I can tell, _all_ email clients after
elm except for mutt and pine) move away from using the mbox
format natively, then hide the email -- now in a proprietary
format!  -- deep in an application directory!  on C: drive!  at
a location with spaces in the pathname!

I do most of my work in CLI (command-line interface) because I
find it more efficient and straightforward than GUI.

If I am reading an important thread in mutt and need to put that
thread into my to-do list, I save it as a file, e.g.:

2009-09-03.mutt-rxvt-configuration.mbox

I run a shell script to add a reference to that file to the
to-do list in my browser, e.g. the clickable:



I can move email files around just like any another
data .doc or .xls files, and I can archive the email for a
project together with all the other data files.

I may be missing something, but I don't see any advantages to the 
dominant paradigm of email applications with special data formats in
exotic locations.

This being a mutt list, I may be preaching to the converted, but
out of all the articles and documents I have read about mutt, I
do not recall ever seeing an emphasis on mutt's obvious and
crucial advantage for opening and manipulating email files
directly, maybe even from the command line.

Tom

-- 
Tom Baker