From: Patrick Mahan <plmahan@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Specifying a file in auto-mode-alist
Date: Fri, 23 Apr 2021 13:25:30 -0700 [thread overview]
Message-ID: <CAFDHx1L+qTf_LsG9G26AoAg2HK=CtFm4D-hk19++ns3_MFt9_w@mail.gmail.com> (raw)
All,
I have build scripts that capture a build (makefile output) into files
called build*.log or Build*.log. These files may occur at various points in
the directory tree.
However if I use the following:
(add-to-list 'auto-mode-alist (quote("build*\\.log'" . compilation-mode)))
When I edit a file say 'build.log' it does not enable compilation mode.
I tried -
(add-to-list 'auto-mode-alist (quote("build*\\'" . compilation-mode)))
But that clashes with other files like a0build.h.
I've read the wiki page on auto-mode-alist, but none of the examples are
about how to use filename that starts with 'xyz*.log'.
Thanks,
Patrick
next reply other threads:[~2021-04-23 20:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 20:25 Patrick Mahan [this message]
2021-04-23 20:42 ` Specifying a file in auto-mode-alist Ó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
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='CAFDHx1L+qTf_LsG9G26AoAg2HK=CtFm4D-hk19++ns3_MFt9_w@mail.gmail.com' \
--to=plmahan@gmail.com \
--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).