Comments (28)
Hi Matthew
could you test the beta version please
http://web-mode.org/beta/web-mode.el
from web-mode.
Yep... Still a problem...
Try looking at the above code (First block) in the mode...
from web-mode.
solved in v3
from web-mode.
This is still a problem in version 3.0. Not only does it not recognise comments, it stops every other mode from recognising comments and I have to restart Emacs!
from web-mode.
I ll look at it tonight.
Could you send me a screenshot please
from web-mode.
Could you try the beta version available on http://web-mode.org/beta/web-mode.el
from web-mode.
Seems to to work! Thank you so much for that very very quick fix.
And thinks for writing and realising such a useful mode, much appreciated!
from web-mode.
You're welcome ... do not hesitate to share it ... I need more testers
from web-mode.
The problem seems to have reoccurred and I'm not quite sure why or how. Here's a screenshot of the problem:
http://awesomescreenshot.com/0b7oxqo4e
It only happens when I have used web-mode, but it doesn't seem to happen always, or right away after use web-mode.
I'll let you know if I manage to find a repeatable way of producing it!
from web-mode.
Could you send me the code please. Moreover what language do you use ? Web-mode is designed for html embedding just little blocks of code
Le 7 déc. 2012 à 11:40, Thomas Parslow [email protected] a écrit :
The problem seems to have reoccurred and I'm not quite sure why or how. Here's a screenshot of the problem:
http://awesomescreenshot.com/0b7oxqo4e
It only happens when I have used web-mode, but it doesn't seem to happen always, or right away after use web-mode.
I'll let you know if I manage to find a repeatable way of producing it!
—
Reply to this email directly or view it on GitHub.
from web-mode.
The HTML I sent triggers it. But once it's triggered the comments show up
that way in all code files in all modes (or at least I've seen it happening
in CoffeeScript and Python) and only restarting emacs fixes it.
Thomas Parslow
Freelance Developer
Django, Python, Javascript and more!
http://almostobsolete.net
+44 (0) 7951261227
@AlmostObsolete
On 7 December 2012 10:56, fxbois [email protected] wrote:
Could you send me the code please. Moreover what language do you use ?
Web-mode is designed for html embedding just little blocks of codeFrançois-Xavier Bois
Kernix
15 rue Cels 75014 PARIS
Tel. 01 53 98 73 43Le 7 déc. 2012 à 11:40, Thomas Parslow [email protected] a écrit
:The problem seems to have reoccurred and I'm not quite sure why or how.
Here's a screenshot of the problem:http://awesomescreenshot.com/0b7oxqo4e
It only happens when I have used web-mode, but it doesn't seem to happen
always, or right away after use web-mode.I'll let you know if I manage to find a repeatable way of producing it!
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-11126077.
from web-mode.
I have a three-line test case that breaks comments in all modes when current tip of web-mode is activated.
{# Template for admin page. #}
{% extends 'pages/admin/base.html.tmpl' %}
When I open a file with those contents, any file I open after that will not highlight comments correctly. If I edit a file that was already open, comment highlighting will break on everything after the point I edited at.
I am running Aquamacs 2.4:
GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
of 2011-10-25 on braeburn.aquamacs.org - Aquamacs Distribution 2.4
and I am loading web-mode this way (comment pertaining to attempts to make web-mode work in OS X's default command-line emacs):
;; The following are workarounds since web-mode expects Emacs >= 23, and OS X's
;; built-in Emacs is v. 22. Sadly, they are still not enough to quite make it
;; work.
(unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode))
(defun my-string-match-p (regexp string &optional start)
"Same as `string-match' except this function does not change the match data."
(let ((inhibit-changing-match-data t))
(string-match regexp string start)))
(when (not (fboundp 'string-match-p))
(fset 'string-match-p (symbol-function 'my-string-match-p)))
;; Web mode.
;; For editing web templates of various stripes.
(autoload 'web-mode "web-mode" "Web template editing mode")
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode))
from web-mode.
Hi Nate,
assuredly, this bug is really annoying ...
To be sure to reproduce it, can you give me an example of a file you load after.
Moreover, could create a very strimmed down version of your .emacs file in order to be sure that there is not a conflict with an other mode.
Thank you in advance
from web-mode.
Hi Nate,
I am beginning to wonder if the bug is not related to the version of emacs.
(I have tested your file and can not reproduce the bug)
Could you try the last version available on http://emacsformacosx.com/
from web-mode.
@almost Hi, could tell me what version of emacs you used when the bug triggered ?
from web-mode.
It looks like it might be version-related - the version on the site you linked seems to work as expected.
from web-mode.
I am having the exact same problem described here with GNU Emacs 23.4.1.
I strongly suspect that it is being caused by this line:
(unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode))
since without it everything works fine in other modes (but of course I am unable to use web-mode).
from web-mode.
I'm on GNU Emacs 23.3.1.
I'll upgrade later on today if I get a moment...
from web-mode.
@johnjcamilleri That sounds very plausible. I don't have time to try this right now, but this post suggests implies that defining web-mode-prog-mode and using that in web-mode might work better.
from web-mode.
@johnjcamilleri @almost @Archenoth @NateEag I've added the defalias to web-mode.el
Could you try removing it from your .emacs and tell me if the bug occurs.
Thank you in advance
from web-mode.
Hmm I would say this seems to behave a little better, although now for some reason I don't seem to get any syntax highlighting for comments in Emacs-Lisp (.el
) files. That's the only thing out of place I can find so far. This is the file I'm testing with, can someone else try this and confirm?
;; Color theme
(require 'color-theme)
(color-theme-initialize)
So if I load Emacs and open only this file, the comments get highlighted correctly. Then if I open a .php
file (which triggers web-mode) and subsequently open my test.el
file, the comments are no longer properly highlghted in the .el
file, although they continue to work properly in the .php
file.
from web-mode.
@johnjcamilleri if possible could you try this with emacs 24 and 23
With emacs 24 I've never been able to reproduce those behaviours.
from web-mode.
@fxbois The behaviour described above is GNU Emacs 23.4.1 on Ubuntu 12.10. I currently don't have access to Emacs 24, I'm not sure how to install it without overwriting my current Emacs installation...
from web-mode.
Same issue in Emacs 23 after commenting my workaround and pulling down the newest version.
I also get the following error on loading web-mode:
File mode specification error: (invalid-function with-silent-modifications)
from web-mode.
@johnjcamilleri @NateEag a commit to take of the with-silent-modifications issue
Does it solve anything ?
from web-mode.
@Archenoth @almost @johnjcamilleri @NateEag I've installed emacs 23 and have detected that font-lock-keywords-only was the origin of the problem. Even made buffer-local, this var was spread on other buffers.
from web-mode.
Confirmed working in Emacs 23 — thank you so much @fxbois !
from web-mode.
Working in Emacs 23 for me, too - thank you!
from web-mode.
Related Issues (20)
- Need to constantly use `web-mode-dom-normalize` HOT 5
- Is there a variable to set the color of left fringe HOT 3
- Incorrect indentation in blade templates HOT 4
- use of save-mark-and-excursion requires more recent version of emacs than declared HOT 1
- After latest changes cannot apply web-mode HOT 11
- You can't use atomic group in PHP regex HOT 1
- Underlines break Ruby code indentation for parenthesis-less method calls HOT 1
- Keybinding for django template comment HOT 2
- Weird error in JSX when using a comma after a tag HOT 2
- Incorrect indentention and highlight in blade templates HOT 2
- Custom variables marked as :safe are considered unsafe when loading file local variables on startup HOT 1
- Feature support: freemarker [=expression] interpolation syntax HOT 1
- RFE: support Pandoc HTML template syntax HOT 4
- Indent offset not respected when pressing `tab` on a marked region HOT 2
- Error in JSX when using self closing div tag HOT 1
- Error in tabulation and syntax highlighting in the blade engine HOT 1
- Indentation error for JSX fragment HOT 10
- Blade: `@if` with following space: condition not highlighted HOT 1
- Add use-package documentation/example to main website/documentation HOT 1
- JSX indentation error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web-mode.