unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* text underline in html template for django
@ 2007-11-17 17:49 Pavel SRB
  2007-11-18 12:05 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel SRB @ 2007-11-17 17:49 UTC (permalink / raw)
  To: help-gnu-emacs

hi all

as all of you i am very happily writting code in emacs, in all bunch of 
modes.
I just started to learn django, and i did not find solution for my 
problem anywhere.

In django we are writting html templates like this:

<html>
<head>
<title>Muzikanti z lekce 4</title>
</head>
<body>
<table>
{% for muzikant in people %}
<tr>
<td>
<b>
{{ muzikant.name }}
{% if muzikant.nemamezeru %}*{% endif %}
</b>
</td>
<td>
<i{% if muzikant.ma_duraz %} style="font-weight: bold;"{% endif %}>
{{ muzikant.genre }}
</i>
</td>
</tr>
{% endfor %}
</table>
</body>

My problem is that emacs, is underlining my code. As it is not happy 
with {}. I believe this is not matter of some mode, but some different 
settings as abbrev. Here is my dotEmacs.

(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
'(current-language-environment "czech")
'(default-input-method "czech")
'(global-font-lock-mode t nil (font-lock)))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)

(load "/home/conan/.emacs.d/nxml-mode-20041004/rng-auto.el")


(load "/usr/share/emacs21/site-lisp/xslide.el")
(load "/usr/share/emacs21/site-lisp/xslide-abbrev.el")
(load "/usr/share/emacs21/site-lisp/xslide-data.el")
(load "/usr/share/emacs21/site-lisp/xslide-font.el")
(load "/usr/share/emacs21/site-lisp/xslide-process.el")


(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt)

(global-font-lock-mode t)

(setq auto-mode-alist
(append
(list
'("\\.xml$" . nxml-mode)
'("\\.xhtml$" . nxml-mode)
'("\\.html$" . nxml-mode)
'("\\.xsd$" . nxml-mode)
'("\\.rng$" . nxml-mode)
'("\\.kml$" . nxml-mode)
)
auto-mode-alist))

;; buffer switching
(require 'tabbar)
(global-set-key [(f9)] 'tabbar-mode)
(global-set-key [(f10)] 'tabbar-local-mode)
(global-set-key [(shift left)] 'tabbar-backward)
(global-set-key [(shift right)] 'tabbar-forward)

(set-language-environment "czech")
(set-input-method "czech-qwerty")
(prefer-coding-system 'utf-8)

(add-hook 'xsl-mode-hook 'turn-on-font-lock)

(autoload 'xsl-mode "xslide" "major mode for xsl stylesheets." t)

(setq auto-mode-alist
(append
(list
'("\\.xsl" . xsl-mode)
'("\\.xslt" . xsl-mode))
auto-mode-alist))

(add-hook 'xsl-mode-hook
'(lambda () (abbrev-mode 1)))




(setq load-path `("/home/conan/.emacs.d/python-mode-1.0/" . ,load-path))
(load-library "python-mode")
(setq auto-mode-alist
(cons '("\\.py$" . python-mode) auto-mode-alist))

(defun pocesti ()
""
(interactive)
(let ((beg (point)))
(beginning-of-buffer)
(replace-regexp "Å" "ř")
(replace-regexp "ÃÂ" "č")
(replace-regexp "á" "š")
(replace-regexp "ï" "ů")
(goto-char beg)
)
)

(setq-default abbrev-mode t)
(read-abbrev-file "~/.abbrev_defs")
(setq save-abbrevs t)

(custom-set-variables
'(transient-mark-mode nil)
'(pc-select-meta-moves-sexps t)
'(show-paren-delay 0.25)
'(show-paren-mode t nil (paren))
'(pc-select-selection-keys-only t)
'(column-number-mode t)
'(pc-selection-mode nil nil (pc-select))
'(visible-bell t))
(custom-set-faces
'(show-paren-match-face ((((class color)) (:bold t)))))

(setq-default indent-tabs-mode nil)

(desktop-load-default)
(desktop-read)

(setq scroll-step 1)

; ********** Haskell mode **********
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook 'font-lock-mode)

(load "/usr/share/emacs/site-lisp/haskell-mode/haskell-site-file.el")

;;(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)


So please, what should i use to stop this?
Thank you very much for advice

Pavel SRB

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: text underline in html template for django
  2007-11-17 17:49 text underline in html template for django Pavel SRB
@ 2007-11-18 12:05 ` Lennart Borgman (gmail)
  2007-11-18 14:13   ` Pavel SRB
  0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2007-11-18 12:05 UTC (permalink / raw)
  To: Pavel SRB; +Cc: help-gnu-emacs

Pavel SRB wrote:
> hi all
> 
> as all of you i am very happily writting code in emacs, in all bunch of 
> modes.
> I just started to learn django, and i did not find solution for my 
> problem anywhere.
> 
> In django we are writting html templates like this:
> 
> <html>
> <head>
> <title>Muzikanti z lekce 4</title>
> </head>
> <body>
> <table>
> {% for muzikant in people %}
> <tr>
> <td>
> <b>
> {{ muzikant.name }}
> {% if muzikant.nemamezeru %}*{% endif %}
> </b>
> </td>
> <td>
> <i{% if muzikant.ma_duraz %} style="font-weight: bold;"{% endif %}>
> {{ muzikant.genre }}
> </i>
> </td>
> </tr>
> {% endfor %}
> </table>
> </body>
> 
> My problem is that emacs, is underlining my code. As it is not happy 
> with {}. I believe this is not matter of some mode, but some different 
> settings as abbrev. Here is my dotEmacs.

How does the underlining look? Is is red? Is it one or several 
characters in a row that are underlined?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: text underline in html template for django
  2007-11-18 12:05 ` Lennart Borgman (gmail)
@ 2007-11-18 14:13   ` Pavel SRB
  2007-11-20 17:59     ` Pavel SRB
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel SRB @ 2007-11-18 14:13 UTC (permalink / raw)
  To: help-gnu-emacs

Lennart Borgman (gmail) wrote:
> Pavel SRB wrote:
>> hi all
>>
>> as all of you i am very happily writting code in emacs, in all bunch 
>> of modes.
>> I just started to learn django, and i did not find solution for my 
>> problem anywhere.
>>
>> In django we are writting html templates like this:
>>
>> <html>
>> <head>
>> <title>Muzikanti z lekce 4</title>
>> </head>
>> <body>
>> <table>
>> {% for muzikant in people %}
>> <tr>
>> <td>
>> <b>
>> {{ muzikant.name }}
>> {% if muzikant.nemamezeru %}*{% endif %}
>> </b>
>> </td>
>> <td>
>> <i{% if muzikant.ma_duraz %} style="font-weight: bold;"{% endif %}>
>> {{ muzikant.genre }}
>> </i>
>> </td>
>> </tr>
>> {% endfor %}
>> </table>
>> </body>
>>
>> My problem is that emacs, is underlining my code. As it is not happy 
>> with {}. I believe this is not matter of some mode, but some 
>> different settings as abbrev. Here is my dotEmacs.
>
> How does the underlining look? Is is red? Is it one or several 
> characters in a row that are underlined?
>
hi

here is my screenshot: 
http://heckler-koch.cz/emacs_django_template_underline.png

You can see i have nxml-mode enable, but it does the same in text-mode 
even when abbrev-mode is disable.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: text underline in html template for django
  2007-11-18 14:13   ` Pavel SRB
@ 2007-11-20 17:59     ` Pavel SRB
  2007-11-20 18:35       ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel SRB @ 2007-11-20 17:59 UTC (permalink / raw)
  To: help-gnu-emacs

Pavel SRB wrote:
> Lennart Borgman (gmail) wrote:
>> Pavel SRB wrote:
>>> hi all
>>>
>>> as all of you i am very happily writting code in emacs, in all bunch 
>>> of modes.
>>> I just started to learn django, and i did not find solution for my 
>>> problem anywhere.
>>>
>>> In django we are writting html templates like this:
>>>
>>> <html>
>>> <head>
>>> <title>Muzikanti z lekce 4</title>
>>> </head>
>>> <body>
>>> <table>
>>> {% for muzikant in people %}
>>> <tr>
>>> <td>
>>> <b>
>>> {{ muzikant.name }}
>>> {% if muzikant.nemamezeru %}*{% endif %}
>>> </b>
>>> </td>
>>> <td>
>>> <i{% if muzikant.ma_duraz %} style="font-weight: bold;"{% endif %}>
>>> {{ muzikant.genre }}
>>> </i>
>>> </td>
>>> </tr>
>>> {% endfor %}
>>> </table>
>>> </body>
>>>
>>> My problem is that emacs, is underlining my code. As it is not happy 
>>> with {}. I believe this is not matter of some mode, but some 
>>> different settings as abbrev. Here is my dotEmacs.
>>
>> How does the underlining look? Is is red? Is it one or several 
>> characters in a row that are underlined?
>>
> hi
>
> here is my screenshot: 
> http://heckler-koch.cz/emacs_django_template_underline.png
>
> You can see i have nxml-mode enable, but it does the same in text-mode 
> even when abbrev-mode is disable.
>
>
>
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
hi, nobody got any idea? thank you very much

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: text underline in html template for django
  2007-11-20 17:59     ` Pavel SRB
@ 2007-11-20 18:35       ` Lennart Borgman (gmail)
  2007-11-20 19:41         ` Pavel SRB
  0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2007-11-20 18:35 UTC (permalink / raw)
  To: Pavel SRB; +Cc: help-gnu-emacs

Pavel SRB wrote:
> Pavel SRB wrote:
>> Lennart Borgman (gmail) wrote:
>>> Pavel SRB wrote:
>>>> hi all
>>>>
>>>> as all of you i am very happily writting code in emacs, in all bunch 
>>>> of modes.
>>>> I just started to learn django, and i did not find solution for my 
>>>> problem anywhere.
>>>>
>>>> In django we are writting html templates like this:
>>>>
>>>> <html>
>>>> <head>
>>>> <title>Muzikanti z lekce 4</title>
>>>> </head>
>>>> <body>
...
>>>>
>>>> My problem is that emacs, is underlining my code. As it is not happy 
>>>> with {}. I believe this is not matter of some mode, but some 
>>>> different settings as abbrev. Here is my dotEmacs.
>>>
>>> How does the underlining look? Is is red? Is it one or several 
>>> characters in a row that are underlined?
>>>
>> hi
>>
>> here is my screenshot: 
>> http://heckler-koch.cz/emacs_django_template_underline.png
>>
>> You can see i have nxml-mode enable, but it does the same in text-mode 
>> even when abbrev-mode is disable.
>
> hi, nobody got any idea? thank you very much


Oh, yes, no problem removing those underlines. See nXhtml:

   http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html

On that page is an explanation of how to get rid of the red underlinging 
(and why it is there). You have to change to use nxhtml-mode instead though.

I just tried to add Django to nXhtml, but found a small problem which 
makes me hesitating to release that addition right now.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: text underline in html template for django
  2007-11-20 18:35       ` Lennart Borgman (gmail)
@ 2007-11-20 19:41         ` Pavel SRB
  2007-11-23  0:34           ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel SRB @ 2007-11-20 19:41 UTC (permalink / raw)
  To: help-gnu-emacs

Lennart Borgman (gmail) wrote:
> Pavel SRB wrote:
>> Pavel SRB wrote:
>>> Lennart Borgman (gmail) wrote:
>>>> Pavel SRB wrote:
>>>>> hi all
>>>>>
>>>>> as all of you i am very happily writting code in emacs, in all 
>>>>> bunch of modes.
>>>>> I just started to learn django, and i did not find solution for my 
>>>>> problem anywhere.
>>>>>
>>>>> In django we are writting html templates like this:
>>>>>
>>>>> <html>
>>>>> <head>
>>>>> <title>Muzikanti z lekce 4</title>
>>>>> </head>
>>>>> <body>
> ...
>>>>>
>>>>> My problem is that emacs, is underlining my code. As it is not 
>>>>> happy with {}. I believe this is not matter of some mode, but some 
>>>>> different settings as abbrev. Here is my dotEmacs.
>>>>
>>>> How does the underlining look? Is is red? Is it one or several 
>>>> characters in a row that are underlined?
>>>>
>>> hi
>>>
>>> here is my screenshot: 
>>> http://heckler-koch.cz/emacs_django_template_underline.png
>>>
>>> You can see i have nxml-mode enable, but it does the same in 
>>> text-mode even when abbrev-mode is disable.
>>
>> hi, nobody got any idea? thank you very much
>
>
> Oh, yes, no problem removing those underlines. See nXhtml:
>
>   http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html
>
> On that page is an explanation of how to get rid of the red 
> underlinging (and why it is there). You have to change to use 
> nxhtml-mode instead though.
>
> I just tried to add Django to nXhtml, but found a small problem which 
> makes me hesitating to release that addition right now.
>
oooh, thank you for these informations. I just have to get emacs22 to my
debian etch. Will tell results later.

thankx again

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: text underline in html template for django
  2007-11-20 19:41         ` Pavel SRB
@ 2007-11-23  0:34           ` Lennart Borgman (gmail)
  2007-11-23  7:50             ` Pavel SRB
  0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2007-11-23  0:34 UTC (permalink / raw)
  To: Pavel SRB; +Cc: help-gnu-emacs

Pavel SRB wrote:
>> Oh, yes, no problem removing those underlines. See nXhtml:
>>
>>   http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html
>>
>> On that page is an explanation of how to get rid of the red 
>> underlinging (and why it is there). You have to change to use 
>> nxhtml-mode instead though.
>>
>> I just tried to add Django to nXhtml, but found a small problem which 
>> makes me hesitating to release that addition right now.
>>
> oooh, thank you for these informations. I just have to get emacs22 to my
> debian etch. Will tell results later.
> 
> thankx again

Pavel, I have put up a beta version of nXhtml that includes support for 
django and has the bug above fixed. I would be glad if you tested and 
gave some simple feedback.

You can find the beta here

   http://ourcomments.org/Emacs/DL/elisp/nxhtml/beta/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: text underline in html template for django
  2007-11-23  0:34           ` Lennart Borgman (gmail)
@ 2007-11-23  7:50             ` Pavel SRB
  2007-11-23  9:05               ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel SRB @ 2007-11-23  7:50 UTC (permalink / raw)
  To: help-gnu-emacs

Lennart Borgman (gmail) wrote:
> Pavel SRB wrote:
>>> Oh, yes, no problem removing those underlines. See nXhtml:
>>>
>>>   http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html
>>>
>>> On that page is an explanation of how to get rid of the red 
>>> underlinging (and why it is there). You have to change to use 
>>> nxhtml-mode instead though.
>>>
>>> I just tried to add Django to nXhtml, but found a small problem 
>>> which makes me hesitating to release that addition right now.
>>>
>> oooh, thank you for these informations. I just have to get emacs22 to my
>> debian etch. Will tell results later.
>>
>> thankx again
>
> Pavel, I have put up a beta version of nXhtml that includes support 
> for django and has the bug above fixed. I would be glad if you tested 
> and gave some simple feedback.
>
> You can find the beta here
>
>   http://ourcomments.org/Emacs/DL/elisp/nxhtml/beta/
>
dear Lennart

thank you very much for your help. Before few days i have installed 
debian-etch package emacs22 and tested your nxhtml-mode 
[nxhtml-1.03-070525.zip]. After successful start nxhtml-mode was present 
and i was able to turn off underlining by 
nXhtml->Compleition->Displ.Extr.Xhtml validator header. So perfect.

This morning i also tested your newest nxhtml-mode [ 
nxhtml-1.04-071123-02_40_20.zip ]. As before, firstly i had to switch my 
django template to xhtml-mode, to have nXhtml menu available, and be was 
to switch underlining off. Then i just switch to django-mode, and 
itworks perfectly.

So again thank you very much for your help, i will post any comments as 
i will be learning django.

Have nice weekend

Pavel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: text underline in html template for django
  2007-11-23  7:50             ` Pavel SRB
@ 2007-11-23  9:05               ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2007-11-23  9:05 UTC (permalink / raw)
  To: Pavel SRB; +Cc: help-gnu-emacs

Pavel SRB wrote:
>> Pavel, I have put up a beta version of nXhtml that includes support 
>> for django and has the bug above fixed. I would be glad if you tested 
>> and gave some simple feedback.
>>
>> You can find the beta here
>>
>>   http://ourcomments.org/Emacs/DL/elisp/nxhtml/beta/
>>
> dear Lennart
> 
> thank you very much for your help. Before few days i have installed 
> debian-etch package emacs22 and tested your nxhtml-mode 
> [nxhtml-1.03-070525.zip]. After successful start nxhtml-mode was present 
> and i was able to turn off underlining by 
> nXhtml->Compleition->Displ.Extr.Xhtml validator header. So perfect.
> 
> This morning i also tested your newest nxhtml-mode [ 
> nxhtml-1.04-071123-02_40_20.zip ]. As before, firstly i had to switch my 
> django template to xhtml-mode, to have nXhtml menu available, and be was 
> to switch underlining off. Then i just switch to django-mode, and 
> itworks perfectly.
> 
> So again thank you very much for your help, i will post any comments as 
> i will be learning django.
> 
> Have nice weekend
> 
> Pavel

The same to you. Thanks for testing.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-11-23  9:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-17 17:49 text underline in html template for django Pavel SRB
2007-11-18 12:05 ` Lennart Borgman (gmail)
2007-11-18 14:13   ` Pavel SRB
2007-11-20 17:59     ` Pavel SRB
2007-11-20 18:35       ` Lennart Borgman (gmail)
2007-11-20 19:41         ` Pavel SRB
2007-11-23  0:34           ` Lennart Borgman (gmail)
2007-11-23  7:50             ` Pavel SRB
2007-11-23  9:05               ` Lennart Borgman (gmail)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).