You are not logged in.

#1 2018-11-03 18:18:22

jbenge1
Member
From: Az
Registered: 2018-04-09
Posts: 151

[SOLVED]Source errors in $HOME/.muttrc

Recently whenever I try to start mutt I am prompted with this message

Error in /home/user/.muttrc, line 78: Invalid preceding regular expression
Error in /home/user/.muttrc, line 79: Invalid preceding regular expression
source: errors in /home/user/.muttrc
Press any key to continue...

Here is $HOME/.muttrc

## IMAP configuration

##Username and password
#set imap_user="user@work.com"
#set imap_pass="pass"

##The folder to use (using imap server)
#set folder=imaps://imap.gmail.com:993

##"+" so I don"t have to retype the full path
#set spoolfile=+INBOX
##Check inbox regularly
#mailboxes =+INBOX

##Store message headers to locally speed tnigs up
#set header_cache = ~/.cache/mutt

##Store messages locally to speed things up
##Comment this if you start running out of disk space
#set message_cachedir = "~/.cahce/mutt"

##Specify where to save/look for postponed messages
#set postponed = +[Gmail]/Drafts

##Allow mutt to open a new IMAP connection automatically
#unset imap_passive

##Keep imap connection alive
#set imap_keepalive = 300

## Check for new mail (in seconds)
## (look every 5 minutes now)
#set mail_check = 300

# SMTP configuration
#Where all sent emails will be saved
#set record = +Sent
#unset record

#set my_pass="pass"
#set my_user="user"

#set realname="Justin"
#set from=user@gmail.com
#set use_from = yes

#set smtp_url=smtps://$imap_user:$imap_pass@




## General Options
set header_cache = "~/.cache/mutt"
set imap_check_subscribed
set imap_keepalive = 300
set imap_passive
set mail_check = 120
set mbox_type=Maildir

## Address Alias'
#set alias_file - "~/.mutt/aliases"
#set sort_alias = alias
#set reverse_alias = yes
#source $alias_file
## Work Acount (user@work.com)
source "~/.mutt/work"
##Here I use the $folder variable that has just been set in the sourced file
##I must set it right now otherwise the 'folder' variable will change in the next sourced file
folder-hook $folder 'source ~/.mutt/work'

## Personal Account (user@gmail.com)
source "~/.mutt/personal"
folder-hook *user@gmail.com/ 'source ~/.mutt/personal'
folder-hook *user@gmail.com/Family 'set realname="Justin"'

##Shortcuts
macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.mutt/personal<enter><change-folder>!<enter>'
macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.mutt/work<enter><change-folder>!<enter>'
macro index,pager <f4> '<sync-mailbox><enter-command>source ~/.mutt/school<enter><change-folder>!<enter>'

macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'

set editor=vim
# -*-muttrc-*-

# Palette for use with the Linux console.  Black background.

color hdrdefault blue black
color quoted blue black
color signature blue black
color attachment red black
color prompt brightmagenta black
color message brightred black
color error brightred black
color indicator black red
color status brightgreen blue
color tree white black
color normal white black
color markers red black
color search white black
color tilde brightmagenta black
color index blue black ~F
color index red black "~N|~O"

# color body brightwhite black '\*+[^*]+\*+'
# color body brightwhite black '_+[^_]+_+'
#
## GPGP Settings
set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0xC9C40C31 -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0xC9C40C31 -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
#set pgp_autosign=yes
#set pgp_sign_as=
set pgp_replyencrypt=yes
set pgp_timeout=1800
set pgp_good_sign="^gpg: Good signature from"

Where the lines in quesiton (according to the error) are

folder-hook *user@gmail.com/ 'source ~/.mutt/personal'
folder-hook *user@gmail.com/Family 'set realname="Justin"'

I'm sure this is really simple little error, but my tired eyes cannot seem to find it. Any and all help is greatly appreciated

Also here is my pacman log: https://ptpb.pw/W4zl

Last edited by jbenge1 (2018-11-03 21:24:35)


"Dr. Madden, why don't the natural numbers include 0?" -me
"....... Take a philosophy course" -Dr. Madden

Offline

#2 2018-11-03 18:54:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,533
Website

Re: [SOLVED]Source errors in $HOME/.muttrc

Why do those start with an asterisk?  Should that be `folder-hook .*user@gmail.com/`?

In a regular expression, an asterisk indicates that the match should include zero or more of the preceding entity, but there is nothing before the asterisk, so that should fail.

Last edited by Trilby (2018-11-03 18:55:27)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-11-03 19:09:05

jbenge1
Member
From: Az
Registered: 2018-04-09
Posts: 151

Re: [SOLVED]Source errors in $HOME/.muttrc

That was what I initially thought when I first configured mutt using the wiki, and it is (or was) just a copy pasted version from the wiki's example. Though it's highly likely that I misunderstood it initially..

At any rate, with/without the asterisk I still get the same error....

Edit: FWIW I have been using mutt for a few months, without changing this configuration, and I haven't seen these errors until recent

Last edited by jbenge1 (2018-11-03 19:16:59)


"Dr. Madden, why don't the natural numbers include 0?" -me
"....... Take a philosophy course" -Dr. Madden

Offline

#4 2018-11-03 19:16:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,533
Website

Re: [SOLVED]Source errors in $HOME/.muttrc

The same error?  I can replicate your initial errors by adding those lines to my muttrc, but there are no errors when I either prepend a '.' before the asterices or just remove the asterices.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-11-03 19:18:31

jbenge1
Member
From: Az
Registered: 2018-04-09
Posts: 151

Re: [SOLVED]Source errors in $HOME/.muttrc

The exact same error yes...


"Dr. Madden, why don't the natural numbers include 0?" -me
"....... Take a philosophy course" -Dr. Madden

Offline

#6 2018-11-03 21:24:21

jbenge1
Member
From: Az
Registered: 2018-04-09
Posts: 151

Re: [SOLVED]Source errors in $HOME/.muttrc

@Trilby
It turns out you were right. I scrapped the old config file and rewrote a new one (without the '*') and now it is working! I apologize if I was bullheaded in any way. Thanks for the help though!! big_smile


"Dr. Madden, why don't the natural numbers include 0?" -me
"....... Take a philosophy course" -Dr. Madden

Offline

Board footer

Powered by FluxBB