all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* next-property-change error
@ 2009-08-21 14:58 Xavier Sanchez
  2009-08-21 15:15 ` Joost Kremers
  2009-08-22 15:16 ` Drew Adams
  0 siblings, 2 replies; 3+ messages in thread
From: Xavier Sanchez @ 2009-08-21 14:58 UTC (permalink / raw)
  To: help-gnu-emacs

Hello all,

I'm writing an html to LaTeX program in elisp that includes the
following function:

(defun xhtlatex-href ()
  (re-search-forward "=[\"'\n]*" nil t)
  (let ((url (buffer-substring (point) (next-property-change
(point)))))
    (sgml-skip-tag-forward 1)
    (insert "}")
    (sgml-skip-tag-backward 1)
    (sgml-delete-tag 1)
    (insert (concat "\\href{" url "}{"))))

There's another function that finds the "<a", then calls the above
function if "href" follows.
When I load the file and run the program the first time it stops at
the "<a" and gives the error:

let: Wrong type argument: integer-or-marker-p, nil

This only happens once; subsequent runs work as expected.

For what it's worth, I've found that doing a minibuffer evaluation of
(next-property-change (point)) at some point in the buffer before the
first run of the program enables execution up to that point.

I haven't made sense of this yet, can anyone else?

Thanks


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

end of thread, other threads:[~2009-08-22 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-21 14:58 next-property-change error Xavier Sanchez
2009-08-21 15:15 ` Joost Kremers
2009-08-22 15:16 ` Drew Adams

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.