Groups | Search | Server Info | Login | Register
Groups > gnu.emacs.help > #60969
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!border-3.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Fri, 19 Apr 2024 21:57:13 +0000 |
| From | steve <sgonedes1977@gmail.com> |
| Newsgroups | gnu.emacs.help |
| Subject | Re: Help required with regexp in auto-mode-alist |
| References | <87ttt2uhl3.fsf@zedat.fu-berlin.de> |
| Date | Fri, 19 Apr 2024 17:57:12 -0400 |
| Message-ID | <87r0f19ft3.fsf@gmail.com> (permalink) |
| Organization | |
| User-Agent | Gnus/5.13 (Gnus v5.13) |
| Cancel-Lock | sha1:MPR9iwFiTDnKQigPF3eql97jSTU= |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Lines | 62 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-LVY4Yqo1c4DHLKCZKgC5AkTNA3maaE+Qd37ehj0lUozTNNcr9f8BdXLjoZ9fUrM1ldwHF8xn9urCQ4/!SPqLMlfIKDZhSoLfKsYWEv+CW421O3ypSUxvTmJ8Pyvkhw== |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| Xref | csiph.com gnu.emacs.help:60969 |
Show key headers only | View raw
"Loris Bennett" <loris.bennett@fu-berlin.de> writes:
< Hi,
< I edit pages of a wiki (FOSWiki), which, when opened in Emacs via the
< Firefox extension "Edit with Emacs", end up in buffers with names like
< the following:
>
< wiki.zedat.fu-berlin.de/bin/edit/SCS/ScsProtokoll20230816?t=1692000848;nowysiwyg=1
>
< I would like to associate these with a specific mode and therefore have
>
< (add-to-list 'auto-mode-alist '("wiki\\.zedat\\.fu-berlin\\.de/bin/edit/SCS/.*" . erin-mode))
Your regexp is probably off. auto-mode-alist is a regexp for the type of
file. that would be everything after the `.'
i just downloaded the extension and it works great. Try and run M-x
server-start first.
from my emacs file:
;; .emacs.el
;; start emacs server mode
(server-start)
;; append paths to auto-mode-alist
;; check for duplicates with rassoc
(unless (rassoc 'html-mode auto-mode-alist)
(setq auto-mode-alist
(append auto-mode-alist
'(("\\.txt\\'" . rst-mode)
("\\.html?\\'" . html-mode)
("\\.rest\\'" . rst-mode)
("\\.md\\'" . rst-mode)
("^README.*" . rst-mode)
("\\.\\(pp\\|dpr\\|dpk\\|inc\\)\\'" . pascal-mode)
("\\.fpc\\'" . makefile-gmake-mode)
("\\.cl\\'" . lisp-mode )
("\\.asd\\'" . lisp-mode)))))
;; hook function to modify html-mode
(defun si::html-mode-hook ()
"Function to run when new HTML buffer is created."
(setq sgml-basic-offset 2)
(message "Editing a HTML file: %s" (buffer-file-name (current-buffer))))
(add-hook 'html-mode-hook 'si::html-mode-hook)
< in my setup. However, the mode is not selected. What is wrong with my
< regexp?
the regexp should be looking for *.html$ that means ending with .html.
hope this helps
Back to gnu.emacs.help | Previous | Next — Previous in thread | Find similar
Help required with regexp in auto-mode-alist "Loris Bennett" <loris.bennett@fu-berlin.de> - 2023-08-14 10:57 +0200 Re: Help required with regexp in auto-mode-alist steve <sgonedes1977@gmail.com> - 2024-04-19 17:57 -0400
csiph-web