From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Specifying a file in auto-mode-alist
Date: Fri, 23 Apr 2021 18:23:45 -0400 [thread overview]
Message-ID: <jwvzgxo3amq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: CAFDHx1+G=Mxua4u9t1J9wAH9zkX8vcMqMNQ0pzPxCA3KASW6cg@mail.gmail.com
>> (add-to-list 'auto-mode-alist '("^[Bb]uild.*\\.log$" . compilation-mode))
[...]
> emacs ~/workspace/src/build.log
> Nope, it shows up in Fundamental mode.
BTW, this is because of the `^` in his regexp: the regexps in
`auto-mode-alist` are matched against the full (absolute) file name, so
your regexp has to match ".../build.log" rather than just "build.log".
Stefan
prev parent reply other threads:[~2021-04-23 22:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 20:25 Specifying a file in auto-mode-alist Patrick Mahan
2021-04-23 20:42 ` Óscar Fuentes
2021-04-23 21:42 ` Stefan Monnier
2021-04-23 22:14 ` Patrick Mahan
2021-04-23 22:09 ` Patrick Mahan
2021-04-23 22:23 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvzgxo3amq.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).