Re: Re: Filetype not set in vim after brew upgrade

Jan Eden via Mutt-users <[email protected]>
Newsgroups gmane.mail.mutt.user
Message-ID <[email protected]>
On 2024-09-09 00:41, Akshay Hegde via Mutt-users wrote:

> On 2024-09-09 08:42 +0200, Jan Eden via Mutt-users wrote:
> > Hi,
> > 
> > this is a little off-topic, but maybe other mutt users are affected,
> > too: Since upgrading to vim 9.1.700 this morning via homebrew, the
> > filetype is not set automatically anymore when calling vim from mutt.
> 
> I just updated to 9.1.0722 this morning on my mac but the filetype detection seems
> to be working fine for me.
> 
> Checking $VIMRUNTIME/filetype.vim [1] reveals that the filetype should get
> set when the name of the buffer matches one of the patterns specified.
> 
> For me, mutt launches vim with a file name beginning with "mutt-*" which
> matches the pattern "mutt{ng,}-*-\w\+" in [1]. So check the filename
> mutt is creating for you.

The filename created for this reply looks like this –

"/var/folders/ps/4v3k3hwj1jd9bdyq8sc4kptr0000gn/T/mutt-snafu-501-5821-14318527686633908551" 34L, 1243B  

– and it matches the pattern

" Mail (for Elm, trn, mutt, muttng, rn, slrn, neomutt)
au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail

in /opt/homebrew/Cellar/vim/9.1.0700/share/vim/vim91/filetype.vim.
Still, the filetype is not set (since this morning).

> Running the command ':verbose set filetype?' after mutt launches vim
> should give you an output similar to mine, and more specifically should
> show up as being under the $VIMRUNTIME directory unless you've
> overridden it:
> 
>   filetype=mail
>         Last set from <home>/.local/pkg/vim/9.1.0722/share/vim/vim91/filetype.vim line 1384

The command returns

filetype=

- Jan
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQQg9//YDsLBcpRDSgIg03s851X+OgUCZt6/2QAKCRAg03s851X+
OjdoAP9/uP2C2koidcPBWd+S2IO+sKB8zilaBQ8dJPqqNdjVAAD6A0dlxFnYlvt9
iGN6vv83I3WwhpbMRC+cEMd7tphzZgU=
=t55M
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.