Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors while opening neomuttrc, and trying to compose an email from neomutt inside neovim's terminal #9

Open
poetaman opened this issue Feb 18, 2021 · 6 comments

Comments

@poetaman
Copy link

poetaman commented Feb 18, 2021

Hi, I get following error while trying to open file ~/.config/neomutt/neomuttrc

Error detected while processing /Users/reportaman/.vim/plugged/neomutt.vim/syntax/neomuttrc.vim:
line  467:
E696: Missing comma in List: 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime', 'crypt_confirmhook', 'crypt_replyencrypt', 'crypt_replysign',  'crypt_replysignencrypted', 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote', 'header_cache_compress', 'ignore_linear_white_space', 'imap_servernoise', 'include_onlyfirst', 'pgp_autoencrypt', 'pgp_autoinline', 'pgp_autosign', 'pgp_auto_traditional', 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replyinline',  'pgp_replysign', 'pgp_replysignencrypted', 'ssl_usesystemcerts',  'use_8bitmime', 'virtual_spoolfile', 'xterm_set_titles' ], 1)
E116: Invalid arguments for function <SNR>95_boolQuadGen

System information:

                    'c.          reportaman@mac-mini.lan
                 ,xNMM.          ----------------------------
               .OMMMMo           OS: macOS 11.2 20D64 arm64
               OMMM0,            Host: Macmini9,1
     .;loddo:' loolloddol;.      Kernel: 20.3.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 49 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 1 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 2880x1620
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: WezTerm
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   CPU: Apple M1
    kMMMMMMMMMMMMMMMMMMMMMMd     GPU: Apple M1
     ;KMMMMMMMWXXWMMMMMMMk.      Memory: 1891MiB / 16384MiB
       .cooc,.    .,coo:.

Also I do not get any syntax coloring while opening files with name <filename>.neomuttrc, though file .neomuttrc (without prefix <filename>) is colored. What extensions does this color theme apply to?

Also while trying to compose email from an instance neomutt running inside terminal inside neovim, I get the following error:

Error detected while processing /opt/homebrew/Cellar/neovim/HEAD-ad98b84/share/nvim/runtime/plugin/rplugin.vim[65]..function <SNR>75_LoadRemotePlugins[1]..<SNR>75_GetManifest[1].
.<SNR>75_GetManifestPath:
line    7:
E117: Unknown function: stdpath
Press ENTER or type command to continue

@flatcap
Copy link
Member

flatcap commented Feb 18, 2021

Error detected while processing /Users/reportaman/.vim/plugged/neomutt.vim/syntax/neomuttrc.vim:
line 467:

Argh! Sorry about that.
Fixed.
Thanks

@poetaman poetaman changed the title Error while opening neomuttrc Errors while opening neomuttrc, and trying to compose an email from neomutt inside neovim's terminal Feb 18, 2021
@poetaman
Copy link
Author

@flatcap Wow, that's fast! :) Btw, I have updated the bug with another problem, don't know if its related... Will test in some time.

@flatcap
Copy link
Member

flatcap commented Feb 18, 2021

Also I do not get any syntax coloring while opening files with name <filename>.neomuttrc

The syntax is enabled by a condition in ftdetect/neomuttrc.vim.
It lists some file names that are likely to be neomutt config:

au BufNewFile,BufRead [Nn]eomuttrc,.neomuttrc,.neomutt/*muttrc,.config/neomutt/*muttrc setfiletype neomuttrc

You can always force the issue by adding a vim 'modeline' to the beginning or end of your config file:

# vim: syn=neomuttrc

@flatcap
Copy link
Member

flatcap commented Feb 18, 2021

Wow, that's fast!

Luck. You just caught me before bed :-)

Error detected while processing /opt/homebrew/Cellar/neovim/HEAD-ad98b84/share/nvim/runtime/plugin/rplugin.vim[65]..function 75_LoadRemotePlugins[1]..75_GetManifest[1].
.75_GetManifestPath:
line 7:
E117: Unknown function: stdpath

Hmm... I don't understand this one -- I don't think it's NeoMutt-related.
I see the same file, rplugin.vim, in my NeoVim install and it contains a stdpath call.
According to :help stdpath it's a built-in function.

@poetaman
Copy link
Author

poetaman commented Feb 18, 2021

@flatcap Thanks a lot! Now I see some lines with white on red background, which I guess is for errors?

Screen Shot 2021-02-17 at 8 49 48 PM

Similarly:
Screen Shot 2021-02-17 at 9 00 10 PM

for line:

set index_format="     %zs %zc %zt | %-28.28L  %?X?& ? %.46s %?M10?(%1M)&? %> %{!%a %d %h %H:%M}      "

Also, I figured out the reason why I got: E117: Unknown function: stdpath. That's because my default editor is vim. And given I had neomutt instance running inside neovim, it tried to open vim inside neovim. I always get that error when I try to open a vim instance inside neovim. So I changed my .vimrc to make sure that I open neomutt with editor nvim inside nvim, and I no longer get that problem.

@flatcap
Copy link
Member

flatcap commented Feb 18, 2021

The first block seem to be a limitation of our syntax highlighting (it's fiendishly complicated :-)
Quoting the pattern works around that:

color index color142 color234 "~N"

Changing the format of the conditionals, to use the format %<VAR?TRUE&FALSE> works:

set index_format="     %zs %zc %zt | %-28.28L  %<X?& > %.46s %<M10?(%1M)&> %> %{!%a %d %h %H:%M}      "

More details about that here: https://neomutt.org/feature/nested-if
(but it's a hard read)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants