pager: avoid line breaks in URLs

2008-11-15 Thread martin f krafft
Hi,

I know of smart_wrap, but it doesn't work for text (e.g. URLs) which
is longer than the width of each line ($wrap). On such encounter,
mutt still breaks the line (and uses $markers), which prevents the
terminal emulator from making the full URL clickable. Is there a way
to prevent the wrapping for long lines without any space (which
$smart_wrap suggests) and let the terminal emulator flow the rest of
the line into the next screen line?

Thanks,

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"we americans, we're a simple people...
 but piss us off, and we'll bomb your cities."
 -- robin williams, good morning vietnam
 
spamtraps: [EMAIL PROTECTED]


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Re: Rolling in sidebar, other mutt-ng type bits?

2008-11-15 Thread tchomby
Now here's a weird thing. I'm using mutt 1.5.18 right now (on ubuntu 8.10) to 
read my gmail account over imap, I don't have the sidebar patch installed, and 
I'm finding that if I press 'y' I get taken to a list of all my imap folders 
(these have not been listed by me in the muttrc, mutt is finding them itself on 
the imap server) and beside each folder it's telling me how many unread mails 
are in the folder. What the? Since when was mutt able to do this?

Here's a screenshot:

http://img66.imageshack.us/img66/2584/muttrk6.png

(Take a look at that mail volume by the way, and you'll see why some of the 
earlier suggestions such as pressing '.' or 'c' then return would not work for 
me).

I've attached my muttrc file, not sure which part of it (if any) is enabling 
this feature, but there you go. It does exactly what I was looking for when I 
was trying to use the sidebar patch and asking what other people do, I just 
didn't know mutt could do this.

Regarding the biff programs that someone mentioned ... I went looking for linux 
mail notification programs. There are many out there, most of which look 
rubbish, there's a few funny ones too, such as opening a cd tray when new mail 
arrives, or flashing keyboard LEDs when new mail arrives.

In short, I settled on gnubiff for my non-gmail accounts that do not have lots 
of folders, I didn't find any that could handle my gmail account, with the 
large number of folders. To be useful it would have to at least present me a 
list of all the folders and how many unread mails in each, without me having to 
tell it about every folder one by one, and nothing can do that. But mutt is now 
doing that for me so it doesn't matter. There are a large number of 
gmail-specific mail notifiers out there for linux that I did not look at though 
(I was looking for imap ones).

For my non-gmail accounts which do not have a large number of different folders 
or a high-volume of email, I found that gnubiff works best, it does the job 
nicely, although it's not perfect. It's nice to have a program that runs in the 
background and just tells me if I have mail, so I don't have to keep opening my 
mail client to check.

Gnubiff and mail-notification seem to be the two main choices. Here's a 
comparison in case anyone's interested:

Both of these programs use what seems a bizarrely huge amount of memory for 
what they do -- almost 10mb, when they're just sitting there waiting to check 
email.

gnubiff http://gnubiff.sourceforge.net/

- Works as a gnome panel applet, in a system tray (gnome or compatible) or as a 
 
  GTK standalone window.
- Keeps its configuration in a single ~/.gnubiffrc file.
- Has a cute icon and new-mail sound.
- The configuration dialog does not feel very nice, it's one of those gnome/gtk 
  apps that doesn't quite feel like a gnome app. But worse, it doesn't work. 
  Not exactly reassuring. On my first several tries it just kept ignoring me 
  when I added my imap account. Eventually I did get it to work, by a 
  combination of manually editing the config file and using the GUI.
- Once configured it does actually work, for both my home and mail accounts, 
  including autodetecting and using ssl. So it does the jon just fine.  
- It can tell you how many unread mails are in each configured account, and 
  show you the subject line, from header, etc. for each mail.

Mail Notification http://www.nongnu.org/mailnotify/

- It works as a system tray icon only, so should work outside of gnome as long 
  as you have a gnome-compatible system tray.
- The configuration dialog is a lot nicer than gnubiff, feels right and 
  actually works.  
- The popup messages it shows when new mails arrive are much nicer than 
  gnubiffs (it's using the newer gnome notifications system).
- Unfortunately mail-notification itself does not work for either of my 
  imap accounts, it worked for the first test only, after that it never shows 
  me any notification of new mails, and for my work account that requires ssl 
  it simply says it cannot login.
- In gnubiff if you want to force it to check for new mail right now you 
  just click on the gnubiff icon. Since mail-notification shows no icon when 
  there's no new mail you can't do this, so if you want to force it to check for
  mail, you have to run mail-notification -u in a terminal (which doesn't 
  work, in line with mail-checking in general not working).

There's a long list of more linux mail-notification programs here, but nothing 
that looks more promising than the above two:

http://www.linuxlinks.com/Software/Internet/Mail/Notification/index.shtml

This Python script for checking email through the system monitor tool conky 
looks promising:

http://ubuntuforums.org/showthread.php?t=869771

For now I think I'm content with gnubiff and its cutesiness.


Re: Rolling in sidebar, other mutt-ng type bits?

2008-11-15 Thread tchomby
Ofcourse, I forgot to attach that muttrc file.

On Sat, Nov 15, 2008 at 04:03:44PM +, tchomby wrote:
> Now here's a weird thing. I'm using mutt 1.5.18 right now (on ubuntu 8.10) to 
> read my gmail account over imap, I don't have the sidebar patch installed, 
> and 
> I'm finding that if I press 'y' I get taken to a list of all my imap folders 
> (these have not been listed by me in the muttrc, mutt is finding them itself 
> on 
> the imap server) and beside each folder it's telling me how many unread mails 
> are in the folder. What the? Since when was mutt able to do this?
> 
> Here's a screenshot:
> 
> http://img66.imageshack.us/img66/2584/muttrk6.png
> 
> (Take a look at that mail volume by the way, and you'll see why some of the 
> earlier suggestions such as pressing '.' or 'c' then return would not work 
> for 
> me).
> 
> I've attached my muttrc file, not sure which part of it (if any) is enabling 
> this feature, but there you go. It does exactly what I was looking for when I 
> was trying to use the sidebar patch and asking what other people do, I just 
> didn't know mutt could do this.
> 
> Regarding the biff programs that someone mentioned ... I went looking for 
> linux 
> mail notification programs. There are many out there, most of which look 
> rubbish, there's a few funny ones too, such as opening a cd tray when new 
> mail 
> arrives, or flashing keyboard LEDs when new mail arrives.
> 
> In short, I settled on gnubiff for my non-gmail accounts that do not have 
> lots 
> of folders, I didn't find any that could handle my gmail account, with the 
> large number of folders. To be useful it would have to at least present me a 
> list of all the folders and how many unread mails in each, without me having 
> to 
> tell it about every folder one by one, and nothing can do that. But mutt is 
> now 
> doing that for me so it doesn't matter. There are a large number of 
> gmail-specific mail notifiers out there for linux that I did not look at 
> though 
> (I was looking for imap ones).
> 
> For my non-gmail accounts which do not have a large number of different 
> folders 
> or a high-volume of email, I found that gnubiff works best, it does the job 
> nicely, although it's not perfect. It's nice to have a program that runs in 
> the 
> background and just tells me if I have mail, so I don't have to keep opening 
> my 
> mail client to check.
> 
> Gnubiff and mail-notification seem to be the two main choices. Here's a 
> comparison in case anyone's interested:
> 
> Both of these programs use what seems a bizarrely huge amount of memory for 
> what they do -- almost 10mb, when they're just sitting there waiting to check 
> email.
> 
> gnubiff http://gnubiff.sourceforge.net/
> 
> - Works as a gnome panel applet, in a system tray (gnome or compatible) or as 
> a  
>   GTK standalone window.
> - Keeps its configuration in a single ~/.gnubiffrc file.
> - Has a cute icon and new-mail sound.
> - The configuration dialog does not feel very nice, it's one of those 
> gnome/gtk 
>   apps that doesn't quite feel like a gnome app. But worse, it doesn't work. 
>   Not exactly reassuring. On my first several tries it just kept ignoring me 
>   when I added my imap account. Eventually I did get it to work, by a 
>   combination of manually editing the config file and using the GUI.
> - Once configured it does actually work, for both my home and mail accounts, 
>   including autodetecting and using ssl. So it does the jon just fine.  
> - It can tell you how many unread mails are in each configured account, and 
>   show you the subject line, from header, etc. for each mail.
> 
> Mail Notification http://www.nongnu.org/mailnotify/
> 
> - It works as a system tray icon only, so should work outside of gnome as 
> long 
>   as you have a gnome-compatible system tray.
> - The configuration dialog is a lot nicer than gnubiff, feels right and 
>   actually works.  
> - The popup messages it shows when new mails arrive are much nicer than 
>   gnubiffs (it's using the newer gnome notifications system).
> - Unfortunately mail-notification itself does not work for either of my 
>   imap accounts, it worked for the first test only, after that it never shows 
>   me any notification of new mails, and for my work account that requires ssl 
>   it simply says it cannot login.
> - In gnubiff if you want to force it to check for new mail right now you 
>   just click on the gnubiff icon. Since mail-notification shows no icon when 
>   there's no new mail you can't do this, so if you want to force it to check 
> for
>   mail, you have to run mail-notification -u in a terminal (which doesn't 
>   work, in line with mail-checking in general not working).
> 
> There's a long list of more linux mail-notification programs here, but 
> nothing 
> that looks more promising than the above two:
> 
> http://www.linuxlinks.com/Software/Internet/Mail/Notification/index.shtml
> 
> This Python script for 

Re: pager: avoid line breaks in URLs

2008-11-15 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Saturday, November 15 at 11:27 AM, quoth martin f krafft:
> I know of smart_wrap, but it doesn't work for text (e.g. URLs) which 
> is longer than the width of each line ($wrap). On such encounter, 
> mutt still breaks the line (and uses $markers), which prevents the 
> terminal emulator from making the full URL clickable.

That's why I created extract_url.pl 
(http://www.memoryhole.net/~kyle/extract_url/). Many times, long URLs 
aren't even unbroken in the original email! Personally, though, I 
prefer to be able to load up a URL without needing to use the mouse. 
:)

> Is there a way to prevent the wrapping for long lines without any 
> space (which $smart_wrap suggests) and let the terminal emulator 
> flow the rest of the line into the next screen line?

Well... you could use an external pager; that might do it. Otherwise, 
no, there's no built-in way of telling mutt not to wrap things for the 
terminal.

~Kyle
- -- 
I hope our wisdom will grow with our power, and teach us, that the 
less we use our power the greater it will be.
-- Thomas Jefferson
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iEYEARECAAYFAkkfF9UACgkQBkIOoMqOI16oLwCgqDuShR6FOGi9XVLys4hYtJsw
2EMAoJv7b/CAPf/xLYnLRtkJI7y45ZQg
=zidA
-END PGP SIGNATURE-


Re: pager: avoid line breaks in URLs

2008-11-15 Thread martin f krafft
also sprach Kyle Wheeler <[EMAIL PROTECTED]> [2008.11.15.1941 +0100]:
> That's why I created extract_url.pl 
> (http://www.memoryhole.net/~kyle/extract_url/). Many times, long URLs 
> aren't even unbroken in the original email! Personally, though, I 
> prefer to be able to load up a URL without needing to use the mouse. 
> :)

I've sent an update to http://bugs.debian.org/127090.

> Well... you could use an external pager; that might do it. Otherwise, 
> no, there's no built-in way of telling mutt not to wrap things for the 
> terminal.

I don't want an external pager. And as long as urlview cannot deal
with X (I read mail on my mailserver, which has no X, and want to
open URLs locally), it's of little use...

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
i'd rather be riding a high speed tractor
with a beer on my lap,
and a six pack of girls next to me.
 
spamtraps: [EMAIL PROTECTED]


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Re: pager: avoid line breaks in URLs

2008-11-15 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Saturday, November 15 at 08:13 PM, quoth martin f krafft:
> I don't want an external pager.

I don't blame you...

> And as long as urlview cannot deal with X (I read mail on my 
> mailserver, which has no X, and want to open URLs locally), it's of 
> little use...

Eh? What's X got to do with it? urlview just runs whatever program you 
want. It can run firefox if you want it to, and if your DISPLAY 
setting is correct, firefox will display on your local system (even 
though it's running on the remote system). That's not the issue, the 
issue is sending the url from the remote system to firefox running on 
your local system, and that's got *nothing* to do with X or with 
urlview.

Of course, that doesn't really *help* you much, just gives you a 
better idea of where the problem is. What you really want is a little 
program that would work with, say, an ssh tunnel to pass information 
from your server back to a url launcher on the local side.

Personally, that's why I use mutt locally, reading email via IMAP. But 
it shouldn't be too hard to set up a simple little URL launcher that 
you could tunnel over ssh. The local side would be something really 
simple, like this:

#!/bin/bash
while read url ; do
firefox -a firefox -remote "openurl($url)"
done

The real trick to it would be setting up ssh to do the tunnel, 
launching the local script, and ensuring that the remote side sends 
the URL to the right place.

~Kyle
- -- 
No man goes so high as he who knows not where he is going.
   -- Cromwell
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFJH5kzBkIOoMqOI14RAoG0AJsHqlADULnXD5E0RwAJYP2lYMPYcACgqKPj
jf/vRiOfIRXkKtffQTU01Eo=
=AmdI
-END PGP SIGNATURE-


Re: pager: avoid line breaks in URLs

2008-11-15 Thread Chris Jones
On Sat, Nov 15, 2008 at 10:53:23PM EST, Kyle Wheeler wrote:

[..]

> No man goes so high as he who knows not where he is going.
>-- Cromwell

And the harder they fall.
 -- Me