Re: Re: Is linewrap dead?

2022-08-30 Thread Jan Eden via Mutt-users


On 2022-08-30 14:58, Kurt Hackenberg wrote:

On Tue, Aug 30, 2022 at 09:09:34AM +0200, Jan Eden via Mutt-users wrote:


I would consider f=f an acceptable compromise, because while it looks
nicer on (some) mail clients, it breaks automatic list indentation
created in vim (fo-n). The following is displayed properly in mutt with
linebreaks, but the indentation obviously gets messed up with
text_flowed=yes [mutt] and formatoptions=ntwcql [vim].

1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
 commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus
 et magnis dis parturient montes, nascetur ridiculus mus.
2. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
 Nulla consequat massa quis enim. Donec pede justo, fringilla vel,
 aliquet nec, vulputate eget, arcu.


It would get messed up only if spaces were added at the ends of lines. 
Your sample numbered paragraphs above did not have those spaces in 
your message, and don't in this message, even though this message is 
text/plain format=flowed.  The numbered paragraphs should be displayed 
undisturbed.  (This paragraph, however, has those spaces, and should 
be filled and word-wrapped to fit the window width, by any mail reader 
that understands format=flowed.  For example, Mutt with 
reflow_text=yes and reflow_wrap=0.)


Right. I created the numbered paragraphs above without the format=flowed 
support in vim (fo=ntcql), as opposed to the following (fo=nwtcql):


1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean 
   commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus 
   et magnis dis parturient montes, nascetur ridiculus mus.
2. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. 
   Nulla consequat massa quis enim. Donec pede justo, fringilla vel, 
   aliquet nec, vulputate eget, arcu.


I don't use vim, but just tried it a little with formatoptions=aw, and 
textwidth set, so it wrapped automatically.  fo=w tells vim to 
recognize   as a soft line break, but vim didn't 
insert those spaces automatically.  Is there some other option to make 
it insert them?  Or do you have to type them by hand?


vim (9.0) does insert the spaces for me with fo=w (as illustrated in the 
second version of the numbered paragraphs).


- Jan


signature.asc
Description: PGP signature


Re: Having problems with POP3 setup

2022-08-30 Thread Kevin J. McCarthy

On Mon, Aug 29, 2022 at 03:14:21PM -0500, X Tec wrote:
Fetching email with 'G' key just ignores the "pop_last=yes" setting 
because it always downloads all email regardless of locally read or 
not, even though other clients such as Outlook or Thunderbird don't do 
this mistake. So I don't think server doesn't support the LAST 
command...


Run with debugging enabled (-d 2) and check the log file to see what the 
LAST command response is from the server.  Since the command was 
deprecated some time ago, I would venture the server is returning an 
unknown command error.


Mutt's POP3 support *is* simple, so if LAST isn't supported, the 
behavior you are seeing with  is expected.


You may be happier just directly connecting to a pops:// URL via one of 
your mailboxes instead; or with a more sophisticated tool, such as 
Getmail (which Sam mentioned).


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Is linewrap dead?

2022-08-30 Thread José María Mateos

On Tue, Aug 30, 2022 at 02:58:38PM -0400, Kurt Hackenberg wrote:
Also, does vim have some option to make whitespace at end of line 
visible, or some other way to show that text is marked as flowed? That 
would be a big help.


I have:

setl list
set listchars=trail:•

This uses a nice fat dot to signal trailing spaces.

Cheers,

--
José María (Chema) Mateos || https://rinzewind.org


Re: Is linewrap dead?

2022-08-30 Thread Kurt Hackenberg

On Tue, Aug 30, 2022 at 09:09:34AM +0200, Jan Eden via Mutt-users wrote:


I would consider f=f an acceptable compromise, because while it looks
nicer on (some) mail clients, it breaks automatic list indentation
created in vim (fo-n). The following is displayed properly in mutt with
linebreaks, but the indentation obviously gets messed up with
text_flowed=yes [mutt] and formatoptions=ntwcql [vim].

1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
  commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus
  et magnis dis parturient montes, nascetur ridiculus mus.
2. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
  Nulla consequat massa quis enim. Donec pede justo, fringilla vel,
  aliquet nec, vulputate eget, arcu.


It would get messed up only if spaces were added at the ends of lines. 
Your sample numbered paragraphs above did not have those spaces in 
your message, and don't in this message, even though this message is 
text/plain format=flowed.  The numbered paragraphs should be displayed 
undisturbed.  (This paragraph, however, has those spaces, and should 
be filled and word-wrapped to fit the window width, by any mail reader 
that understands format=flowed.  For example, Mutt with 
reflow_text=yes and reflow_wrap=0.)


I don't use vim, but just tried it a little with formatoptions=aw, and 
textwidth set, so it wrapped automatically.  fo=w tells vim to 
recognize   as a soft line break, but vim didn't 
insert those spaces automatically.  Is there some other option to make 
it insert them?  Or do you have to type them by hand?


Also, does vim have some option to make whitespace at end of line 
visible, or some other way to show that text is marked as flowed? 
That would be a big help.


Re: Having problems with POP3 setup

2022-08-30 Thread Josef 'Jeff' Sipek
On Sat, Aug 27, 2022 at 11:53:50 -0500, X Tec wrote:
...
> ---Finally, on IMAP, different email providers seem to have totally
> different ways to specify their subfolders for the variables $sent,
> $drafts...: "INBOX.sent", "[Gmail]/Sent Mail", etc. Then how am I suppose
> to find out which syntax each email service uses?

An IMAP server can "tag" the list of mailboxes it returns to the cilent with
what are called special use flags.  Then, the client can look for those
instead of trying to guess which mailbox is meant for what.  For example,
the mailbox with sent mail would be flagged as \Sent regardless of its name.
For more info, take a look at RFC 6154 [1].

Clients generally don't expose special use flags to the user.

Jeff.

[1] https://www.ietf.org/rfc/rfc6154.html


Re: Having problems with POP3 setup

2022-08-30 Thread Mark H. Wood
On Mon, Aug 29, 2022 at 03:14:21PM -0500, X Tec wrote:
> I think I kind of sorted the "not a mailbox" issues: each mailbox seems to 
> have its own defined directory tree, which will give the aforementioned error 
> if not found, or will alternatively be created but only when the mailbox is 
> really being used for the first time.
> So I had to do this: mkdir -p $HOME/mutt/mail/{inbox,sent,trash}/{cur,new,tmp}

Yes, that's the Maildir structure.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu


signature.asc
Description: PGP signature


Re: Having problems with POP3 setup

2022-08-30 Thread Sam Kuper
On Mon, Aug 29, 2022 at 03:14:21PM -0500, X Tec wrote:
> I think I kind of sorted the "not a mailbox" issues: each mailbox
> seems to have its own defined directory tree, which will give the
> aforementioned error if not found, or will alternatively be created
> but only when the mailbox is really being used for the first time.  So
> I had to do this: mkdir -p
> $HOME/mutt/mail/{inbox,sent,trash}/{cur,new,tmp}

>From memory, that seems about right.


> Now, could someone really help with the other issues, please?  Thanks
> again.
> 
> On 2022-08-27 11:53:50, X Tec wrote:
>> After exploring all possibilities I could with IMAP, I felt like it
>> was time to give POP3 a try.  So tried the following: set
>> pop_user="$user"; set pop_pass="$pass"; set
>> pop_host="pop://$user@$url" set pop_delete=no; set pop_last=yes; set
>> mbox_type=Maildir; set folder=~/mutt/mail; set spoolfile=+inbox; set
>> record=+sent; set trash=+trash; mailboxes +inbox +sent +trash; set
>> ssl_force_tls=yes
>> 
>> But it's not working:
>> 
>> ---It creates $HOME/mail/, but just "$HOME/mail/inbox is not a
>> mailbox". Ctrl+O to this mailbox gives the same, until hitting 'G'
>> key to fetch email.

Seems like you resolved this issue.


>> ---Fetching email with 'G' key just ignores the "pop_last=yes"
>> setting because it always downloads all email regardless of locally
>> read or not, even though other clients such as Outlook or Thunderbird
>> don't do this mistake. So I don't think server doesn't support the
>> LAST command...

Which version of Mutt are you using?

Hopefully someone else will help.

Alternatively, you could try Getmail by Charles Cazabon, which works
well with Mutt and provides the functionality you are seeking here.

https://pyropus.ca./software/getmail/


>> ---When trying to open the other mailboxes I just get the "not a
>> mailbox" message, either with Ctrl+O or 'G', even if I manually
>> create the corresponding directories

Seems like you resolved this issue.


>> ---A more general thing: what are Ctrl+O ("open mailbox")

In the Mutt manual, the only mention of ^O that I can find is:

 ^O  send attachment with a different name


>> and '$' actually for? [...]

`$` writes pending changes to disk.


>> ---Finally, on IMAP, different email providers seem to have totally
>> different ways to specify their subfolders for the variables $sent,
>> $drafts...: "INBOX.sent", "[Gmail]/Sent Mail", etc. Then how am I
>> suppose to find out which syntax each email service uses?

I believe there are ways to query IMAP for a list of (sub)folders.
Hopefully someone else will help with this.  


As an aside: massive corporations who rely on lock-in to retain
customers - e.g. Google (Gmail) and Microsoft (Outlook365, or Live, or
Hotmail, etc), and perhaps Yahoo - seem more likely to have non-standard
IMAP setups on their servers.

"Traditional" email providers are typically more consistent with each
other, and with IMAP standards.  Probably because under the hood they
typically run Dovecot, Cyrus, or Panda IMAP (Mark Crispin's post-UW fork
of UW IMAP).

So, to avoid dealing with non-standard IMAP setups, a reasonable
strategy is to avoid the megacorps.

Ideally, find an affordable email provider you like, and support them
by using (and ideally, paying for) their services.


Sam


Re: Re: Is linewrap dead?

2022-08-30 Thread Jan Eden via Mutt-users
On 2022-08-29 19:07, Tavis Ormandy wrote:
> On 2022-08-29, Logan Rathbone wrote:
> > On Mon, Aug 29, 2022 at 10:43:45AM EDT, Tavis Ormandy wrote:
> >> No, format=flowed sounds like the perfect solution but I've tested and
> >> as far as I can tell it's ignored by gmail on Android, for example.
> >
> > FWIW, the solution/compromise I ended up using was to compose
> > multipart/alternative mails with mutt, sending a very simple HTML mail
> > and a standard hard-wrapped text-based mail as well. So mobile
> > mailreaders can read it perfectly, and desktop users can read the
> > plaintext version correctly as well.
> >
> 
> Hmm thanks, that does work - I don't like the idea of sending html
> parts, but clearly a compromise is necessary somewhere!

I would consider f=f an acceptable compromise, because while it looks
nicer on (some) mail clients, it breaks automatic list indentation
created in vim (fo-n). The following is displayed properly in mutt with
linebreaks, but the indentation obviously gets messed up with
text_flowed=yes [mutt] and formatoptions=ntwcql [vim].

1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
   commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus
   et magnis dis parturient montes, nascetur ridiculus mus.
2. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
   Nulla consequat massa quis enim. Donec pede justo, fringilla vel,
   aliquet nec, vulputate eget, arcu.

Creating HTML mail with mutt feels more like a surrender. :)

Apart from the known drawbacks of HTML mail, the markdown2html script
has a couple of requirements to further complicate my (already overly
complex) mailstack.

- Jan


signature.asc
Description: PGP signature