pdf attachments opened in external viewer

2023-08-14 Thread Fourhundred Thecat

Hello,

somehow, I got it working, that pdf attachments are opened in external
viewer (evince). That is very nice.

But, mutt waits for evince to close, before I can continue working in mutt.

This prevents me from opening multiple pdf attachments and leave them
open, while continue working in mutt.

I guess, I would have to add '&' somewhere, so that evince is opened in
background ?

But where?


Re: macro does not work when mailbox opened read-only

2022-08-11 Thread Fourhundred Thecat

> On 2022-08-11 02:22, Cameron Simpson wrote:

On 10Aug2022 11:10, todd zullinger  wrote:

Fourhundred Thecat wrote:

When I delete my custom macro, and revert "q" to its default action,
then I get this message when exiting from mutt (case 2):

   Purge 1 deleted message? ([yes]/no):


Aye, what todd said.

As a comparison, my own settings have these:

 set delete=yes


thank you both.
This seems to work.



Re: macro does not work when mailbox opened read-only

2022-08-10 Thread Fourhundred Thecat

On 2022-08-08 22:15, Derek Martin wrote:
On Fri, Jul 29, 2022 at 08:15:31AM +0200, Fourhundred Thecat wrote:

Hello,

I have custom macro "q" for exit:

   macro  index  q  ";"

but when I open mailbox read-only, I am not able to exit from mutt:


AFAICT this macro does nothing useful--the normal quit (normally bound
to 'q') already syncs before quitting.  But you can't sync a read-only
mailbox so just exit instead (normally bound to 'x').


I am using mutt in 2 modes:

  1) mutt -R -f folder
  2) mutt-f folder

In case 1), pressing "q" should simply exit. This is read-only mode and
there are no messages to be deleted.

In case 2), pressing "q" should exit while also automatically deleting
any messages marked for deletion.

When I delete my custom macro, and revert "q" to its default action,
then I get this message when exiting from mutt (case 2):

  Purge 1 deleted message? ([yes]/no):

When I create custom macro to sync automatically, I get the error on
read-only mutt, because it cannot be synced.

So I need "q" that works in both cases.





macro does not work when mailbox opened read-only

2022-07-29 Thread Fourhundred Thecat

Hello,

I have custom macro "q" for exit:

  macro  index  q  ";"

but when I open mailbox read-only, I am not able to exit from mutt:

  Mailbox is read-only.

the key "q' does not work.

is there any workaround to solve this?


too many useless warnings

2022-07-27 Thread Fourhundred Thecat

Hello,

when I press key that is not bound, I get following warning in the lower
left corner:

  Key is not bound.  Press '?' for help.

this is actually a helpful warning/notification that tells me what is
going on. Without it, I would be left wondering why my action is not
being executed.

However, when I press PageDown repeatedly, and land at the end of the
page, I get a warning:

  You are on the last page.

In my opinion, this is absolutely useless and superfluous warning.
Unlike the first case, this is just bombarding me with useless
information. I can see the key is working all right, I have just pressed
it one too many times.

Can these things be configured / disabled ?



Re: remove "To" from recipient field

2022-07-26 Thread Fourhundred Thecat

> On 2022-07-26 21:14, Jakub Jindra wrote:


I've did a little digging and I think it is not possible with mutt.
There's a index_format expando %Fp in neomutt [1] doing exactly what you
want, whereas it's missing in mutt [2].

On 2022-07-26 20:34, Fourhundred Thecat wrote:

Hello,

when I am in Sent folder, the recipient is displayed as "To John". Can I
get rid of the "To" ? It is not helpful, and just eats up valuable space.


would a hack be possible using index-format-hook ?


remove "To" from recipient field

2022-07-26 Thread Fourhundred Thecat

Hello,

when I am in Sent folder, the recipient is displayed as "To John". Can I
get rid of the "To" ? It is not helpful, and just eats up valuable space.



Re: index_format

2022-07-26 Thread Fourhundred Thecat

> On 2022-07-26 19:38, Dennis Preiser wrote:

On Tue, Jul 26, 2022 at 04:53:28PM +0200, Fourhundred Thecat wrote:

I have following index_format:


set size_show_mb
index-format-hook size_flags "~z -1M" " "
index-format-hook size_flags "~z >1M" "%5c"
index_format="%{%Y-%b-%d %H:%M} %?X?(%X)&  ? %-25.25F  %.96s %> %@size_flags@"


thank you, that works beautifully. But "set size_show_mb" seems to have
no effect. It still shows small size in KB.



index_format

2022-07-26 Thread Fourhundred Thecat

Hello,

I have following index_format:

 index_format="%{%Y-%b-%d %H:%M} %?X?(%X)&  ? %-25.25F  %.96s %> %5c"

I would like to make following change to the last column, where message
size is shown:

1) if message size is less than 0.1M, show empty column
2) if message size is more than 0.1M show message size, but always in
megabytes (not kilobytes)

can somebody please advise how to do this?




Re: custom macro for "q" key

2021-09-02 Thread Fourhundred Thecat

> On 2021-09-02 11:58, Bastian wrote:

Lets assume that after leaving the browser there is a quit command you
could solve it with:

   macro browser q "" "QUIT MUTT FROM BROWSER"


That works exactly as I wanted.
You are a genius.

thank you


Re: custom macro for "q" key

2021-09-01 Thread Fourhundred Thecat

> On 2021-09-02 06:54, Jon LaBadie wrote:

On Wed, Sep 01, 2021 at 08:04:29AM +0200, Fourhundred Thecat wrote:

On 2021-08-30 14:28, li...@ifohancroft.com wrote:


 macro  index,pager  c  "?"
 macro  index    q  "?"
 bind   browser  q  exit


You are defining macros in the index and pager.
Why the switch to bind instead of a macro for the browser?


when I use macro, instead of bind, then "quit" does exist.

  macro  browser  q  quit

but when I press "q" in browser, I get:

  Macro loop detected.

Here is the whole relevant block from muttrc:

bind index,pagerc   browse-mailboxes
bindindex   q   browse-mailboxes
bindpager   q   exit
macro   browser q   quit



Re: custom macro for "q" key

2021-09-01 Thread Fourhundred Thecat

> On 2021-09-02 04:47, Fourhundred Thecat wrote:

 > On 2021-09-01 20:54, li...@ifohancroft.com wrote:

And also, you suggested previously to use "exit", but this keyword does
not seem to exist in my mutt (2.0.2). When I use this binding:

   bind  browser q quit


sorry, I meant to say:

you suggested previously to use "quit", but this keyword does not seem
to exist in my mutt


Re: custom macro for "q" key

2021-09-01 Thread Fourhundred Thecat

> On 2021-09-01 20:54, li...@ifohancroft.com wrote:

I understand what "index" and "pager" is. But what is the name when I am
in the list of my folders? I think I need to bind q for exit, when I am
in the list of my folders:

  bind    q  exit

thank you,


Unless I am wrong and there is more than one list of folders, its bind
type is 'browser'.
One way to check/confirm that is by pressing '?' while there and
checking what the status line says. It should say something like:
Help for . (35%)


yes, the  is called "browser" in my case also.

But when I bind:

  bind  browser  q  exit

and use "q" in browser, it does not exit, but just cycles between
browser and the folder where I came from.

And also, you suggested previously to use "exit", but this keyword does
not seem to exist in my mutt (2.0.2). When I use this binding:

  bind  browser q quit

.mutt/muttrc, line 80: quit: no such function in map

So basically, now  I just need to find pout, how to actually exit when I
press "q" in browser.

thank you,


Re: custom macro for "q" key

2021-09-01 Thread Fourhundred Thecat

> On 2021-08-30 14:28, li...@ifohancroft.com wrote:

Hi,

You basically have to unbind q for index (perhaps also pager, depending
on what you want) and create the same macro you already have for 'c',
for 'q' as well. Then for 'browser' bind 'q' to to 'quit' again.

So basically:

bind index,pager c noop # Unbinding the key first, because the manual
says that macros shouldn't be bound to keys that are already bound
bind index,pager q noop # Same as above
macro index,pager c "?"
macro index,pager q "?"

bind browser q quit


Hi,

I have used your suggestions, with some modifications (I had to use
exit, instead of quit), but it does not behave as I expected:

  macro  index,pager  c  "?"
  macro  indexq  "?"
  bind   browser  q  exit

But it does not behave as I expected:

- When I start mutt, I land in index. When press "q", then I go to the
list of folders (good: this is what I want). But, now (I am in list of
folders), pressing "q" should exit mutt. Instead, it goes back to index.

- When I am in pager, and press "q", then I go back to the underlying
folder (good: this is what I want). When I press "q" one more time, then
I go to the list of my folders (also what I want). But then if I pres
"q" again, I go back to the folder where I cam from, instead of exiting
mutt.

I understand what "index" and "pager" is. But what is the name when I am
in the list of my folders? I think I need to bind q for exit, when I am
in the list of my folders:

  bindq  exit

thank you,



custom macro for "q" key

2021-08-30 Thread Fourhundred Thecat

Hello,

I have "q" key bound to "quit", and then I have custom macro bound to "c":

  macro   index,pager  c  "?"

When I start mutt, I automatically land in "Inbox", and "q" exits.

When I press "c" anywhere in mutt, I get list of my folders, and can go
into them. When inside any of the folder, "q" also exists mutt.

I would like to change the behavior of "q", so that pressing "q" when I
am inside any of the folders, mutt goes back to the list of folders
(same as if I had pressed "c"). And only if I am already in the list of
folders, then "q" exists mutt.

What I want is similar to "q" behavior when in inbox, and composing
message. When I cancel the compose with "q", I don't exit mutt, but
instead land in Inbox again. I would like to keep that behavior.

I guess, I will need to create custom macro for "q" ?
Can anybody suggest how to do it?

thank you,







Re: disable gpg in mutt

2021-08-29 Thread Fourhundred Thecat

> On 2021-08-29 18:27, Kevin J. McCarthy wrote:

On Sun, Aug 29, 2021 at 06:49:31AM +0200, Fourhundred Thecat wrote:

Why is mutt still trying to decrypt the message?


Please, reread my responses in this thread:

"you could try recompiling mutt using the '--disable-pgp' and
'--disable-gpgme' configure options"

Have you reconfigured with both of those options?

"Check the output of mutt -v and look for -CRYPT_BACKEND_CLASSIC_PGP and
-CRYPT_BACKEND_GPGME in the output."

Do you see *both* of those strings in the output.  Your most recent post
still showed +CRYPT_BACKEND_CLASSIC_PGP, meaning you haven't disabled
classic pgp mode (using --disable-pgp).


indeed, I did have only --disable-gpgme. Now I recompiled with both
--disable-gpgme and --disable-pgp

When I open gpg encrypted message, I see this:

[-- Attachment #1: PGP/MIME version identification --]
[-- Type: application/pgp-encrypted, Encoding: 7bit, Size: 0.1K --]

[-- application/pgp-encrypted is unsupported (use 'v' to view this part) --]

[-- Attachment #2: OpenPGP encrypted message --]
[-- Type: application/octet-stream, Encoding: 7bit, Size: 2.6K --]

[-- application/octet-stream is unsupported (use 'v' to view this part) --]


how can I show the message source?
ie the message in its encrypted form



Re: disable gpg in mutt

2021-08-28 Thread Fourhundred Thecat

> On 2021-08-29 03:13, Kevin J. McCarthy wrote:

On Sat, Aug 28, 2021 at 06:31:12AM +0200, Fourhundred Thecat wrote:


$ /usr/bin/mutt -v | grep CRYPT_BACKEND
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME
-CRYPT_BACKEND_GPGME


Note the "-" prefix in front of CRYPT_BACKEND_GPGME.  That means it's
not included.  However classic pgp and smime support are compiled in.
Those don't rely on the gpgme library.


OK, so how then can I display the encrypted message, instead of seeing:

  [-- PGP output follows (current time: 2021-08-29T06:47:20 CEST) --]
  [-- Error: could not create a PGP subprocess! --]

  [-- End of PGP output --]

  [-- Error: decryption failed --]

Why is mutt still trying to decrypt the message?

BTW, I have also removed the gpg.rc file from /etc/Muttrc.d/

thank you,


Re: disable gpg in mutt

2021-08-27 Thread Fourhundred Thecat

> On 2021-08-27 18:17, Kevin J. McCarthy wrote:

On Fri, Aug 27, 2021 at 07:33:52AM +0200, Fourhundred Thecat wrote:

On 2021-08-26 18:34, Kevin J. McCarthy wrote:


 [-- PGP output follows (current time: 2021-08-27T07:31:42 CEST) --]
 [-- Error: could not create a PGP subprocess! --]


Double check you are invoking the mutt you reconfigured and compiled.
Those messages come from a part of the code which isn't compiled when
configured with --disable-pgp.

Check the output of mutt -v and look for -CRYPT_BACKEND_CLASSIC_PGP and
-CRYPT_BACKEND_GPGME in the output.


This is strange. I have compiled mutt with "--disable-gpgme", and I can
see that it is no longer linked with the gpg library:

$ ldd /usr/bin/mutt
linux-vdso.so.1
libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
/lib64/ld-linux-x86-64.so.2

But "mutt -v" still shows the CRYPT_BACKEND variables:

$ /usr/bin/mutt -v | grep CRYPT_BACKEND
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME
-CRYPT_BACKEND_GPGME

and I am sure I am invoking the same mutt, the one that I compiled.

do you understand why?

thank you,


Re: mutt trying to use /var/tmp instead of /tmp for temporary files

2021-08-27 Thread Fourhundred Thecat

> On 2021-08-27 15:55, dva...@internode.on.net wrote:


Whoops, shoulda checked exact syntax will work.
In my .muttrc I have:

set tmpdir="~/Desktop"

so you'll need some quotes and '='.


thank you, it works



mutt trying to use /var/tmp instead of /tmp for temporary files

2021-08-27 Thread Fourhundred Thecat

Hello,

I have recompiled mutt to disable gpg integration.

Now I have noticed one seemingly unrelated change:

Suddenly, mutt wants to use /var/tmp instead of /tmp for temporary
files. I have not changed anything in the sourcecode. I have only
disabled some compilation options. Now when I open any message in mutt,
I get:

Could not create temporary file!

and strace shows me it is trying to use /var/tmp/

any idea what happened?
How can I revert this back to using /tmp ?

thanks,


Re: disable gpg in mutt

2021-08-26 Thread Fourhundred Thecat

> On 2021-08-26 18:34, Kevin J. McCarthy wrote:

On Thu, Aug 26, 2021 at 08:41:56AM -0700, Will Yardley wrote:

On Thu, Aug 26, 2021 at 03:06:18PM +0200, Fourhundred Thecat wrote:


how can I completely disable gpg integration in mutt ?




Either way, I think first try checking the "fine" manual (muttrc(5)) for
"pgp_auto_decode", and see if that helps.


If that doesn't help, you could try recompiling mutt using the
'--disable-pgp' and '--disable-gpgme' configure options.


thank you.

I have recompiled mutt with these options disabled.

Now when I open gpg encrypted message, I get this error:


  [-- PGP output follows (current time: 2021-08-27T07:31:42 CEST) --]
  [-- Error: could not create a PGP subprocess! --]

  [-- End of PGP output --]

  [-- Error: decryption failed --]


  There was an error displaying all or part of the message


instead of seeing the actual message source.




disable gpg in mutt

2021-08-26 Thread Fourhundred Thecat

Hello,

how can I completely disable gpg integration in mutt ?

If message happens to be encrypted, I would like mutt to simply show me
the source (encrypted).

I thought, I don't have gpg configured, but when I wanted to compose new
message, this happened:

  Recall postponed message? ([yes]/no):

  Enter PGP passphrase:

  Decryption failed.

I don't know how that happened. I am using gpg on the same account, but
through Thunderbird client. I have Thunderbird set up locally on my
laptop with gpg, and I am using mutt to read messages remotely on the
server. That is why I don't want to use gpg in mutt, so that I don't
have to type my password on the remote server.

anyway,

how can I use mutt unaware of gpg ?

thanks,