From: Miles Bader <miles.bader@necel.com>
Cc: Richard Stallman <rms@gnu.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Unmentioned "stringify" aspect in docu buffer-substring-no-properties
Date: Fri, 23 Jun 2006 16:31:08 +0900 [thread overview]
Message-ID: <buod5d0wcoz.fsf@dhapc248.dev.necel.com> (raw)
In-Reply-To: <449B8C73.8060300@easy-emacs.de> (Andreas Roehler's message of "Fri, 23 Jun 2006 08:38:43 +0200")
Andreas Roehler <andreas.roehler@easy-emacs.de> writes:
> (setq baz (buffer-substring-no-properties 34 37))
>
> baz"e \""
>
> there was no prin1 between, AFAIS.
>
> The behavior of prin1 BTW was not the item.
prin1 (or some internal equivalent) is what's used to insert the result
of evaluating the form (in the *scratch* buffer or in the minibuffer
when using M-x eval-expression).
Try explicitly using prin1 yourself, e.g.:
(prin1 (buffer-substring-no-properties 34 37))
"e \"""e \""
prin1 returns its argument, which is then printed by the interaction
loop, so you get two things printed in *scratch*. Note that they are
the same, as the explicit and implicit calls to prin1 performed the same
ascii-encoding of the value.
-Miles
--
[|nurgle|] ddt- demonic? so quake will have an evil kinda setting? one that
will make every christian in the world foamm at the mouth?
[iddt] nurg, that's the goal
next prev parent reply other threads:[~2006-06-23 7:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-22 20:24 Unmentioned "stringify" aspect in docu buffer-substring-no-properties Andreas Roehler
2006-06-22 20:28 ` David Kastrup
2006-06-23 6:38 ` Andreas Roehler
2006-06-23 7:26 ` David Kastrup
2006-06-23 7:31 ` Miles Bader [this message]
2006-06-23 6:00 ` Andreas Roehler
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=buod5d0wcoz.fsf@dhapc248.dev.necel.com \
--to=miles.bader@necel.com \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=rms@gnu.org \
/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 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).