Git Product home page Git Product logo

Comments (28)

fxbois avatar fxbois commented on May 22, 2024

Hi Matthew
could you test the beta version please
http://web-mode.org/beta/web-mode.el

from web-mode.

Archenoth avatar Archenoth commented on May 22, 2024

Yep... Still a problem...

Try looking at the above code (First block) in the mode...

from web-mode.

fxbois avatar fxbois commented on May 22, 2024

solved in v3

from web-mode.

almost avatar almost commented on May 22, 2024

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.

fxbois avatar fxbois commented on May 22, 2024

I ll look at it tonight.

Could you send me a screenshot please

from web-mode.

fxbois avatar fxbois commented on May 22, 2024

Could you try the beta version available on http://web-mode.org/beta/web-mode.el

from web-mode.

almost avatar almost commented on May 22, 2024

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.

fxbois avatar fxbois commented on May 22, 2024

You're welcome ... do not hesitate to share it ... I need more testers

from web-mode.

almost avatar almost commented on May 22, 2024

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.

fxbois avatar fxbois commented on May 22, 2024

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.

almost avatar almost commented on May 22, 2024

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 code

François-Xavier Bois
Kernix
15 rue Cels 75014 PARIS
Tel. 01 53 98 73 43

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.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-11126077.

from web-mode.

NateEag avatar NateEag commented on May 22, 2024

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.

fxbois avatar fxbois commented on May 22, 2024

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.

fxbois avatar fxbois commented on May 22, 2024

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.

fxbois avatar fxbois commented on May 22, 2024

@almost Hi, could tell me what version of emacs you used when the bug triggered ?

from web-mode.

NateEag avatar NateEag commented on May 22, 2024

It looks like it might be version-related - the version on the site you linked seems to work as expected.

from web-mode.

johnjcamilleri avatar johnjcamilleri commented on May 22, 2024

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.

almost avatar almost commented on May 22, 2024

I'm on GNU Emacs 23.3.1.

I'll upgrade later on today if I get a moment...

from web-mode.

NateEag avatar NateEag commented on May 22, 2024

@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.

fxbois avatar fxbois commented on May 22, 2024

@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.

johnjcamilleri avatar johnjcamilleri commented on May 22, 2024

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.

fxbois avatar fxbois commented on May 22, 2024

@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.

johnjcamilleri avatar johnjcamilleri commented on May 22, 2024

@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.

NateEag avatar NateEag commented on May 22, 2024

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.

fxbois avatar fxbois commented on May 22, 2024

@johnjcamilleri @NateEag a commit to take of the with-silent-modifications issue

Does it solve anything ?

from web-mode.

fxbois avatar fxbois commented on May 22, 2024

@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.

johnjcamilleri avatar johnjcamilleri commented on May 22, 2024

Confirmed working in Emacs 23 — thank you so much @fxbois !

from web-mode.

NateEag avatar NateEag commented on May 22, 2024

Working in Emacs 23 for me, too - thank you!

from web-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.