unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* rng-auto.el seems to be missing from nxml-mode files
@ 2008-01-10 15:59 Ismail Dönmez
  2008-01-10 17:59 ` Lennart Borgman (gmail)
  2008-01-11 13:58 ` Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Ismail Dönmez @ 2008-01-10 15:59 UTC (permalink / raw)
  To: emacs-devel

Hi all,

Now that finally emacs CVS merged nxml-mode support I went out to try it. But 
to my surprise rng-auto.el file is not included in lisp/nxml directory. This 
file is part of the original nxml distribution and needed for auto-validation 
of XML files via RELAX-NG.

Is there a reason why this file is not included? Because without that file 
most powerful feature of nxml-mode is missing.

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 15:59 rng-auto.el seems to be missing from nxml-mode files Ismail Dönmez
@ 2008-01-10 17:59 ` Lennart Borgman (gmail)
  2008-01-10 18:05   ` Ismail Dönmez
  2008-01-10 18:26   ` Jason Rumney
  2008-01-11 13:58 ` Richard Stallman
  1 sibling, 2 replies; 13+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-10 17:59 UTC (permalink / raw)
  To: Ismail Dönmez; +Cc: emacs-devel

Ismail Dönmez wrote:
> Hi all,
> 
> Now that finally emacs CVS merged nxml-mode support I went out to try it. But 
> to my surprise rng-auto.el file is not included in lisp/nxml directory. This 
> file is part of the original nxml distribution and needed for auto-validation 
> of XML files via RELAX-NG.
> 
> Is there a reason why this file is not included? Because without that file 
> most powerful feature of nxml-mode is missing.


Hi Ismail,

Ah, yes, I tested some days ago and wondered what was wrong. I do not 
know if it is good to split rng-auto.el, but here are some notes:

- The autoload has been moved somewhere else.

- Some variables are set in rgn-auto. Maybe these just can be moved to 
the defvars?

   (setq rng-preferred-prefix-alist-default ...)
   (setq rng-schema-loader-alist '(("rnc" . rng-c-load-schema)))

- There are some add-hook calls, maybe they can be moved to 
nxml-mode.el? (The first one of these starts validation.):

   (add-hook 'nxml-mode-hook 'rng-nxml-mode-init)
   (add-hook 'nxml-mode-hook 'nxml-enable-unicode-char-name-sets)

- I have no idea what to do with the auto-coding stuff. Does not that 
have to be loaded before nxml-mode is loaded since it is used when 
reading files?

   (require 'nxml-enc)
   ;; Install our own `set-auto-coding-function'.
   (nxml-start-auto-coding)

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 17:59 ` Lennart Borgman (gmail)
@ 2008-01-10 18:05   ` Ismail Dönmez
  2008-01-10 18:26   ` Jason Rumney
  1 sibling, 0 replies; 13+ messages in thread
From: Ismail Dönmez @ 2008-01-10 18:05 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel

Hi Lennart,

[...]
> - There are some add-hook calls, maybe they can be moved to
> nxml-mode.el? (The first one of these starts validation.):
>
>    (add-hook 'nxml-mode-hook 'rng-nxml-mode-init)
>    (add-hook 'nxml-mode-hook 'nxml-enable-unicode-char-name-sets)

Indeed the first hook to ~/.emacs get the auto-validation done but I think 
these should be in nxml-mode.el as you suggested to get the old behaviour 
back.

I am not familiar with the rest of the code so I'll let others to reply to 
rest of your mail.

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 17:59 ` Lennart Borgman (gmail)
  2008-01-10 18:05   ` Ismail Dönmez
@ 2008-01-10 18:26   ` Jason Rumney
  2008-01-10 18:30     ` Ismail Dönmez
                       ` (2 more replies)
  1 sibling, 3 replies; 13+ messages in thread
From: Jason Rumney @ 2008-01-10 18:26 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Ismail Dönmez, emacs-devel

Lennart Borgman (gmail) wrote:
> - The autoload has been moved somewhere else.
The autoloads should be in loaddefs.el now along with other built-in 
autoloads. You probably need to have bootstrapped (rather than just 
recompiled) since nxml was added to get loaddefs.el updated.

> - Some variables are set in rgn-auto. Maybe these just can be moved to 
> the defvars?
I did that a few weeks ago. Is there something I missed?

> - There are some add-hook calls, maybe they can be moved to 
> nxml-mode.el? (The first one of these starts validation.):
I think only these are missing now. Perhaps these should not be hooks if 
the intention is for them to always be enabled.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 18:26   ` Jason Rumney
@ 2008-01-10 18:30     ` Ismail Dönmez
  2008-01-10 18:32     ` Ismail Dönmez
  2008-01-10 18:42     ` Lennart Borgman (gmail)
  2 siblings, 0 replies; 13+ messages in thread
From: Ismail Dönmez @ 2008-01-10 18:30 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Lennart Borgman (gmail), emacs-devel

Thursday 10 January 2008 20:26:10 tarihinde şunları yazmıştınız:
> > - There are some add-hook calls, maybe they can be moved to
> > nxml-mode.el? (The first one of these starts validation.):
>
> I think only these are missing now. Perhaps these should not be hooks if
> the intention is for them to always be enabled.

nxml's most important feature is on-the-fly validation so yes I thinks those 
should be always enabled.

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 18:26   ` Jason Rumney
  2008-01-10 18:30     ` Ismail Dönmez
@ 2008-01-10 18:32     ` Ismail Dönmez
  2008-01-10 18:42     ` Lennart Borgman (gmail)
  2 siblings, 0 replies; 13+ messages in thread
From: Ismail Dönmez @ 2008-01-10 18:32 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Lennart Borgman (gmail), emacs-devel

Thursday 10 January 2008 20:26:10 tarihinde şunları yazmıştınız:
> > - There are some add-hook calls, maybe they can be moved to
> > nxml-mode.el? (The first one of these starts validation.):
>
> I think only these are missing now. Perhaps these should not be hooks if
> the intention is for them to always be enabled.

nxml's most important feature is on-the-fly validation so yes I think those 
should be always enabled.

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 18:26   ` Jason Rumney
  2008-01-10 18:30     ` Ismail Dönmez
  2008-01-10 18:32     ` Ismail Dönmez
@ 2008-01-10 18:42     ` Lennart Borgman (gmail)
  2008-01-10 21:10       ` Jason Rumney
  2 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-10 18:42 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Ismail Dönmez, emacs-devel

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>> - The autoload has been moved somewhere else.
> The autoloads should be in loaddefs.el now along with other built-in 
> autoloads. You probably need to have bootstrapped (rather than just 
> recompiled) since nxml was added to get loaddefs.el updated.

Thanks, yes, that was what I tried to say.

>> - Some variables are set in rgn-auto. Maybe these just can be moved to 
>> the defvars?
> I did that a few weeks ago. Is there something I missed?

Ah, here is where I need to checkout/bootstrap ... ;-)

Thanks.

>> - There are some add-hook calls, maybe they can be moved to 
>> nxml-mode.el? (The first one of these starts validation.):
> I think only these are missing now. Perhaps these should not be hooks if 
> the intention is for them to always be enabled.

Maybe. I think there must be some reason that JK placed this in a hook, 
but I don't know what it is.

But what about the auto-coding stuff? Did you find some solution to that 
too? Maybe that could be used by html-mode/xml-mode as well?

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 18:42     ` Lennart Borgman (gmail)
@ 2008-01-10 21:10       ` Jason Rumney
  2008-01-10 23:09         ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 13+ messages in thread
From: Jason Rumney @ 2008-01-10 21:10 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Ismail Dönmez, emacs-devel

Lennart Borgman (gmail) wrote:
> Maybe. I think there must be some reason that JK placed this in a 
> hook, but I don't know what it is.
>
> But what about the auto-coding stuff? Did you find some solution to 
> that too? Maybe that could be used by html-mode/xml-mode as well?
Maybe I'm mistaken, but I think the auto-coding stuff just duplicates 
what is already done in sgml-xml-auto-coding-function. Maybe there are 
some improvements we can make to sgml-xml-auto-coding-function based 
what nxml does though, so it is worth comparing them before discarding 
the nxml version completely.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 21:10       ` Jason Rumney
@ 2008-01-10 23:09         ` Lennart Borgman (gmail)
  2008-01-10 23:33           ` Jason Rumney
  0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-10 23:09 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Ismail Dönmez, emacs-devel

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>> Maybe. I think there must be some reason that JK placed this in a 
>> hook, but I don't know what it is.
>>
>> But what about the auto-coding stuff? Did you find some solution to 
>> that too? Maybe that could be used by html-mode/xml-mode as well?
> Maybe I'm mistaken, but I think the auto-coding stuff just duplicates 
> what is already done in sgml-xml-auto-coding-function. Maybe there are 
> some improvements we can make to sgml-xml-auto-coding-function based 
> what nxml does though, so it is worth comparing them before discarding 
> the nxml version completely.

I took a quick look. It does not seem like find-auto-coding uses 
sgml-xml-auto-coding-function. How is that then handled on file reading?

I think nxml-mode checks coding both on reading and writing.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 23:09         ` Lennart Borgman (gmail)
@ 2008-01-10 23:33           ` Jason Rumney
  2008-01-10 23:43             ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 13+ messages in thread
From: Jason Rumney @ 2008-01-10 23:33 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Ismail Dönmez, emacs-devel

Lennart Borgman (gmail) wrote:
> I took a quick look. It does not seem like find-auto-coding uses 
> sgml-xml-auto-coding-function. How is that then handled on file reading?
It is certainly used when I perform the following sequence of operations...

emacs -Q
M-x debug-on-entry sgml-xml-auto-coding-function
C-x C-f ~/.emacs

It also seems to be called after C-x C-s, so writing also seems to be 
covered.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 23:33           ` Jason Rumney
@ 2008-01-10 23:43             ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 13+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-10 23:43 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Ismail Dönmez, emacs-devel

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>> I took a quick look. It does not seem like find-auto-coding uses 
>> sgml-xml-auto-coding-function. How is that then handled on file reading?
> It is certainly used when I perform the following sequence of operations...
> 
> emacs -Q
> M-x debug-on-entry sgml-xml-auto-coding-function
> C-x C-f ~/.emacs
> 
> It also seems to be called after C-x C-s, so writing also seems to be 
> covered.

Ok, fine. I did not look hard enough. Thanks for the little lesson above.

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-10 15:59 rng-auto.el seems to be missing from nxml-mode files Ismail Dönmez
  2008-01-10 17:59 ` Lennart Borgman (gmail)
@ 2008-01-11 13:58 ` Richard Stallman
  2008-01-11 14:13   ` Ismail Dönmez
  1 sibling, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2008-01-11 13:58 UTC (permalink / raw)
  To: Ismail Dönmez; +Cc: emacs-devel

What is the rng-auto.el file?  Could you show it to us?

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

* Re: rng-auto.el seems to be missing from nxml-mode files
  2008-01-11 13:58 ` Richard Stallman
@ 2008-01-11 14:13   ` Ismail Dönmez
  0 siblings, 0 replies; 13+ messages in thread
From: Ismail Dönmez @ 2008-01-11 14:13 UTC (permalink / raw)
  To: emacs-devel, rms

Hi,
Friday 11 January 2008 15:58:13 tarihinde Richard Stallman şunları yazmıştı:
> What is the rng-auto.el file?  Could you show it to us?

thanks to Lennart and Jason's explanations this file is no longer needed, just 
Jason should move some hooks to nxml-mode.el so that on the fly validation 
works as expected.

Thanks and Regards,
ismail


-- 
Never learn by your mistakes, if you do you may never dare to try again.

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

end of thread, other threads:[~2008-01-11 14:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-10 15:59 rng-auto.el seems to be missing from nxml-mode files Ismail Dönmez
2008-01-10 17:59 ` Lennart Borgman (gmail)
2008-01-10 18:05   ` Ismail Dönmez
2008-01-10 18:26   ` Jason Rumney
2008-01-10 18:30     ` Ismail Dönmez
2008-01-10 18:32     ` Ismail Dönmez
2008-01-10 18:42     ` Lennart Borgman (gmail)
2008-01-10 21:10       ` Jason Rumney
2008-01-10 23:09         ` Lennart Borgman (gmail)
2008-01-10 23:33           ` Jason Rumney
2008-01-10 23:43             ` Lennart Borgman (gmail)
2008-01-11 13:58 ` Richard Stallman
2008-01-11 14:13   ` Ismail Dönmez

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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