[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'buffer-substring' returns rubbish
From: |
Eli Zaretskii |
Subject: |
Re: 'buffer-substring' returns rubbish |
Date: |
Wed, 17 Jan 2001 17:42:26 +0200 (IST) |
On Wed, 17 Jan 2001, PILCH Hartmut wrote:
> When evalling the following sexp in a buffer
>
> (buffer-substring (line-beginning-position) (line-end-position))
>
> I usually get a string representing the current line under my cursor.
> But quite often I instead get a strange record back, like this:
>
> #("WeOfferRewardsForKnowledge (buffer-substring (line-beginning-position)
> (line-end-position))" 0 26 (face (w3-style-face-00000 w3-style-face-00000
> w3-style-face-00000 w3-style-face-00000 w3-style-face-00000
> w3-style-face-00000 w3-style-face-00010) html-stack ((p) (center) (td) (table
> (w3-table-info [16] [108] 1 1) (border . "0") (cellpadding . "1")
> (cellspacing . "1")) (table (w3-table-info [16] [108] 1 1) (border . "0")
> (cellpadding . "1") (cellspacing . "1")) (td (width . "100%") (align .
> center) (valign . "top")) (table (w3-table-info [1 15 1 67 1 1 1 35 0 0 0 0
> 1] [1 15 1 396 1 1 1 345 0 0 0 0 1] 7 13) (height . "100%") (width . "100%")
> (border . "0") (cellpadding . "0") (cellspacing . "0") (bgcolor . "white"))
> (table (w3-table-info [1 15 1 67 1 1 1 35 0 0 0 0 1] [1 15 1 396 1 1 1 345 0
> 0 0 0 1] 7 13) (height . "100%") (width . "100%") (border . "0") (cellpadding
> . "0") (cellspacing . "0") (bgcolor . "white")) (bodytext) (body (topmargin .
> "0") (leftmargin . "0") (margi!
!
> nheight . "0") (marginwidth . "0")) (html) (*document)) start-open nil
> end-open nil front-sticky t rear-nonsticky nil duplicable t) 26 27 nil 27 91
> nil)
Does it help to use buffer-substring-no-properties instead of
buffer-substring?
> I have not found out anything about the conditions that cause this.
I think this will happen for lines which have text properties associated
with them. It's a feature, actually.