Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting auto-mode-alist for temporary buffer / Edit with Emacs / erin

3 views
Skip to first unread message

Loris Bennett

unread,
Sep 21, 2021, 4:22:59 AM9/21/21
to
Hi,

The Firefox plugin "Edit with Emacs"[1] opens a buffer with the
following name

wiki.foo.bar.org/bin/edit/Stuff/Things?t=1632207419;nowysiwyg=1

I want to associate this kind of buffer with 'erin-mode'[2].

In my init.el I have

(add-to-list 'auto-mode-alist '("wiki\\.foo" . erin-mode)

but this does not set the mode automatically. I seem to remember this
working at some point, perhaps with an older version of Emacs than my
current 26.1.

When trying to test the regex with

(string-match "wiki\\.foo" (buffer-file-name))

it seems that buffer-file-name is nil in the temporary buffer. Could
this be the problem? Is that what auto-mode-alist relies on?

Cheers,

Loris

Footnotes:
[1] https://addons.mozilla.org/en-US/firefox/addon/edit-with-emacs1/
[2] https://www.neilvandyke.org/erin-twiki-emacs/

--
This signature is currently under construction.
0 new messages