Error inside HTML tag of nXML mode #3

Closed
demon386 opened this Issue Aug 15, 2012 · 6 comments

Comments

Projects
None yet
2 participants

In nXML mode

it shows

autopair-insert-or-skip-quote: Wrong type argument: integer-or-marker-p, nil

Owner

joaotavora commented Aug 16, 2012

Can't reproduce. Can you provide a recipe that triggers this bug starting from something like

emacs -Q -l autopair.el -e autopair-global-mode

? It would also be good to know the exact emacs version you are using.

Sorry. I forgot to format my code and it disappeared.

In nXML mode

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang=<cursor>>

Put the cursor in the position, and type " (double quote). The bug appears.

I'm using Emacs 24.1 in Mac.

Owner

joaotavora commented Aug 16, 2012

You still didn't state if you reproduced from an "Emacs -Q" run, which I doubt, since the problem is irreproducible on such "vanilla" emacs, and you must have some customization. However after doing:

(modify-syntax-entry ?\" "\"" nxml-mode-syntax-table)

I was able to reproduce it and fix it. So try it out and report back here if it works.

Using Emacs -Q would solve the problem, but then pressing " (double quote) would only generate one, instead of a pair of it.

After a while I figured out the problem has something to do with the version of my nxml-mode. My configuration is based on Purcell and the nxml-mode version he uses is https://github.com/purcell/emacs.d/tree/master/site-lisp/nxml-mode

Still don't know how to resolve the conflict. But deleting it and use the Emacs' inherent nxml-mode would make the error disappear, at least.

Owner

joaotavora commented Aug 16, 2012

Let me clarify. I asked you to use emacs -Q to figure out if this is was problem specific to your configuration or to autopair.el, which, as all extensions, is mostly designed to work on an uncustomized Emacs. Only after trial-and-error did I find out it is is specific to your custom configuration, but I had to guess it. I mean, you could have provided the above information earlier in the process.

But again you didn't read my message :-). After analysis, I have decided that your custom configuration is reasonable enough to make autopair adapt to it, at least partially, so I did make a fix in autopair, try out the master branch or commit 9ec0ded.

Thanks.

I understood your point. The problem is on my customization since autopair works well with default Emacs.

I tried the new patch, which totally solved the problem in my customization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment