[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: erin-mode: problem with auto-mode-alist and saving
From: |
Loris Bennett |
Subject: |
Re: erin-mode: problem with auto-mode-alist and saving |
Date: |
Fri, 23 Oct 2015 09:49:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>> I am using Emacs 24.4.1 on Debian Jessie and the "Edit with Emacs"
>>>> plug-in 1.14 for chromium to edit a wiki. The buffer names created look
>>>> something like this:
>>>> wiki.some.org/edit/Web/SomePage
>>> auto-mode-alist is matched against the *file* name, not the *buffer* name.
>> OK, but the value of 'buffer-file-name' is nil. How then can I set-up
>> the mode I would like?
>
> Depends on the actual code used to open up this "file", i.e. it depends
> on how this "Edit with Emacs" plugin works internally.
>
Thanks for the hint.
The code is on GitHub. Here
https://github.com/stsquad/emacs_chrome/blob/master/servers/edit-server.el
it says you can do the following
(setq edit-server-url-major-mode-alist
'(("github\\.com" . markdown-mode)))
This more or less works for me. If I save the emacs buffer, the
contents are written back to the edit field in the browser, but the mode
switches back to 'text', and emacs hangs. If I then do 'C-g', the mode
goes back to my chosen one. So it's slightly broken, but functional.
Loris
--
This signature is currently under construction.