[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: buffer-substring vs. buffer-substring-no-properties
From: |
Kevin Layer |
Subject: |
Re: buffer-substring vs. buffer-substring-no-properties |
Date: |
14 Nov 2001 21:22:36 -0800 |
User-agent: |
Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 |
"Eli Zaretskii" <eliz@is.elta.co.il> writes:
> > From: Kevin Layer <layer@--you-know-what-to-remove--.franz.com>
> > Newsgroups: gnu.emacs.bug
> > Date: 14 Nov 2001 08:34:01 -0800
> >
> > (format "%s" ...) in emacs 20.7 removes font info. In 21.1 it does
> > not. This, not buffer-substring, is hosing me.
> >
> > Given that I have lots and lots of calls to buffer-substring that I
> > don't want to change to buffer-substring-no-properties, how do I
> > defontify a string?
>
> It's in NEWS: either use `copy-sequence' or `set-text-properties'.
Even though this is documented as an incompatible change, I don't
think it was a good decision. The way I see format used seems more
geared toward making human readable output, and printing the
representation of a string with properties doesn't seem the right
thing. I have a solution, so I'm just going on record to voice my
opinion.
Also, note I couldn't get copy-sequence to remove properties. It
always preserves them for me:
x
#("(defun fo" 0 1 (fontified t) 1 6 (face font-lock-keyword-face fontified t) 6
7 (fontified t) 7 9 (face font-lock-function-name-face fontified t))
(copy-sequence x)
#("(defun fo" 0 1 (fontified t) 1 6 (fontified t face font-lock-keyword-face) 6
7 (fontified t) 7 9 (fontified t face font-lock-function-name-face))
I don't see any argument that will do it either:
copy-sequence is a built-in function.
(copy-sequence ARG)
Return a copy of a list, vector or string.
The elements of a list or vector are not copied; they are shared
with the original.
- Re: buffer-substring vs. buffer-substring-no-properties, (continued)
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Per Abrahamsen, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Peter S Galbraith, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Per Abrahamsen, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Eli Zaretskii, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kim F. Storm, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties,
Kevin Layer <=
- Re: buffer-substring vs. buffer-substring-no-properties, Eli Zaretskii, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Juanma Barranquero, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Stefan Monnier, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/14
Re: buffer-substring vs. buffer-substring-no-properties, Ehud Karni, 2001/11/14
Re: buffer-substring vs. buffer-substring-no-properties, David Kastrup, 2001/11/14