[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
'buffer-substring' returns rubbish
From: |
PILCH Hartmut |
Subject: |
'buffer-substring' returns rubbish |
Date: |
Wed, 17 Jan 2001 14:47:21 +0100 (CET) |
This bug report will be sent to the Free Software Foundation,
not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
In GNU Emacs 20.6.1 (i386-suse-linux, X toolkit)
of Sam M=e4r 25 2000 on Kneser
configured using `configure --with-gcc --with-pop --with-system-malloc
--prefix=/usr --exec-prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --sharedstatedir=/var/state --libexecdir=/usr/lib
--with-x --with-x-toolkit=lucid --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib i386-suse-linux'
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
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)
This was returned by evalling the line
WeOfferRewardsForKnowledge (buffer-substring (line-beginning-position)
(line-end-position))
(without leading blank), but it can be obtained almost anywhere. I have not
found out anything about the conditions that cause this. I have been running
w3, but the buffer on which I evalled the above expression was not a WWW
buffer. Evalling buffer-string on the buffer also returns a record expression
instead of a string, and again this record expression contains trailing
references to w3 pages.
#("This buffer is for notes you don't want to save, and for Lisp evaluation.
If you want to create a file, visit that file with C-x C-f,
then enter the text in that file's own buffer.
WeOfferRewardsForKnowledge (buffer-substring (line-beginning-position)
(line-end-position))
(buffer-string)" 0 182 nil 182 183 (front-sticky (face html-stack start-open
end-open duplicable) 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") (marginhei!
ght . "0") (marginwidth . "0")) (html) (*document)) start-open nil end-open
nil duplicable t) 183 209 (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") (mar!
ginheight . "0") (marginwidth . "0")) (html) (*document)) start-open n
il end-open nil front-sticky t rear-nonsticky nil duplicable t) 209 210 nil 210
276 nil 276 290 nil 290 291 nil)
Btw, w3 is very helpful for daily work, as are Mule-UCS and some other
tools that may be suspected of containing dirty code. I would like to
be able to compile GNU Emacs 21 with UCS support and with XIM
(East-Asian input) support, especially non-overwriting mode input
support. UCS support is an absolute conditio sine qua non for my work
and I'd rather stay with version 20 if Mule-UCS does not work with
version 21. Mule UCS does a great job and is very stable, even more
so than W3. Equipping Emacs with internal Unicode capabilities does
not seem urgent from a practical point of view, given how well Mule
and Mule-UCS work.
Recent input:
C-d C-d C-d C-d C-d C-d C-d C-d C-d C-d C-d C-d C-d
C-d C-d C-d C-d C-d C-d C-d C-d C-d C-d C-d C-d C-d
C-d C-d C-d C-d C-d C-d C-d C-d C-d escape C-f C-d
C-d C-c m C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b
C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-f C-c
m escape C-f C-c m escape x g u backspace backspace
b u g tab C-a C-k e m a c s - b u tab C-a C-k r e p
o r tab return
Recent messages:
243
92
Mark set
Quit
Mark set
Quit
this-line-str
Mark set [3 times]
Loading emacsbug...
Loading emacsbug...done
- 'buffer-substring' returns rubbish,
PILCH Hartmut <=