From: "Drew Adams" <drew.adams@oracle.com>
To: "'Xavier Sanchez'" <xjsanchez@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: next-property-change error
Date: Sat, 22 Aug 2009 08:16:21 -0700 [thread overview]
Message-ID: <4547EDD84CDF4E4986D4FD6F01A900BD@us.oracle.com> (raw)
In-Reply-To: <506bd8c5-4b23-493f-9579-243db91df5b3@l5g2000yqo.googlegroups.com>
> (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?
Probably (next-property-change (point)) is returning nil the first time through
(there is no next property change), so `buffer-substring' complains that its
second arg is nil, not an integer or a marker.
prev parent reply other threads:[~2009-08-22 15:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4547EDD84CDF4E4986D4FD6F01A900BD@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=xjsanchez@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.