From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Loris Bennett" Newsgroups: gmane.emacs.help Subject: Re: erin-mode: problem with auto-mode-alist and saving Date: Fri, 23 Oct 2015 09:49:27 +0200 Organization: Freie Universitaet Berlin Message-ID: <87zizavxbs.fsf@hornfels.zedat.fu-berlin.de> References: <8737x3xaoo.fsf@hornfels.zedat.fu-berlin.de> <87oafrvt85.fsf@hornfels.zedat.fu-berlin.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445586643 18551 80.91.229.3 (23 Oct 2015 07:50:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Oct 2015 07:50:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 23 09:50:30 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZpX7E-0003wi-Lv for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Oct 2015 09:50:20 +0200 Original-Received: from localhost ([::1]:36816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpX7D-0000OP-Vo for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Oct 2015 03:50:19 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-X-Trace: news.uni-berlin.de X2g4jOcXj+f18JRsS3qfbgfyfcRUDewJWVMG27LhRYfkck Cancel-Lock: sha1:1svPIT0Vp9f00FZ3Q/p452lLI/Y= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:215507 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107792 Archived-At: Stefan Monnier 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.