* GNU Emacs 21.3.50 : Problem in (point-min)
@ 2003-06-23 10:35 Dhruva Krishnamurthy
2003-06-23 16:38 ` Benjamin Riefenstahl
0 siblings, 1 reply; 6+ messages in thread
From: Dhruva Krishnamurthy @ 2003-06-23 10:35 UTC (permalink / raw
Cc: Emacs Devel
Hello,
I am finding a strange behaviour in GNU Emacs 21.3.50 CVS (W2K using
MinGW32)
When I evaluate:
(point-min), I get
1 = ?\C-a
instead of 1
Where as for (point-max), I get only the integer showing the number of
charecters in the buffer.
Am I doing something wrong?
with regards,
dhruva
--
Dhruva Krishnamurthy
Home: http://www32.brinkster.com/schemer/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNU Emacs 21.3.50 : Problem in (point-min)
2003-06-23 10:35 Dhruva Krishnamurthy
@ 2003-06-23 16:38 ` Benjamin Riefenstahl
0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Riefenstahl @ 2003-06-23 16:38 UTC (permalink / raw
Cc: Dhruva Krishnamurthy
Hi Dhruva,
"Dhruva Krishnamurthy" <seagull@fastmail.fm> writes:
> When I evaluate:
> (point-min), I get
> 1 = ?\C-a
> instead of 1
>
> Where as for (point-max), I get only the integer showing the number of
> charecters in the buffer.
In think it is just a display issue. Characters are just integers in
ELisp. So for integers below 256, C-x C-e (eval-last-sexp) shows you
the character value, in case that is what you really wanted to know.
Try C-x C-e on the expression ?a (place the cursor on the trailing
space), to see what I mean.
Hope this helps, benny
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNU Emacs 21.3.50 : Problem in (point-min)
@ 2003-06-25 20:01 Markus Rost
2003-06-26 9:25 ` Kai Großjohann
2003-06-26 13:39 ` Benjamin Riefenstahl
0 siblings, 2 replies; 6+ messages in thread
From: Markus Rost @ 2003-06-25 20:01 UTC (permalink / raw
Cc: emacs-devel
In think it is just a display issue. Characters are just integers in
ELisp. So for integers below 256, C-x C-e (eval-last-sexp) shows you
the character value, in case that is what you really wanted to know.
Try C-x C-e on the expression ?a (place the cursor on the trailing
space), to see what I mean.
It happens for me also for other numbers. I find it somewhat
irritating to see in the minibuffer once in a while various characters
from various international character sets. It doesn't hurt much, but
it doesn't look clean. Buffer position 97 has nothing to do with
character "a", so why showing "?a" in the minibuffer? Here are some
examples with the corresponding messages in the minibuffer.
(goto-char 27643)
27643 = ?悍
(goto-char 27647)
27647 = ?悄
(goto-char 27649)
27649
By the way, when saving this mail, I was offered the following coding
system, apparently because of ?悍.
Coding system for saving this buffer:
S -- shift_jis-unix (alias of japanese-shift-jis-unix)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNU Emacs 21.3.50 : Problem in (point-min)
2003-06-25 20:01 GNU Emacs 21.3.50 : Problem in (point-min) Markus Rost
@ 2003-06-26 9:25 ` Kai Großjohann
2003-06-26 14:02 ` Stephen J. Turnbull
2003-06-26 13:39 ` Benjamin Riefenstahl
1 sibling, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2003-06-26 9:25 UTC (permalink / raw
Markus Rost <rost@math.ohio-state.edu> writes:
> It happens for me also for other numbers. I find it somewhat
> irritating to see in the minibuffer once in a while various characters
> from various international character sets. It doesn't hurt much, but
> it doesn't look clean. Buffer position 97 has nothing to do with
> character "a", so why showing "?a" in the minibuffer?
When Emacs prints the number, it doesn't know where it came from. So
it just has to do what's possible.
(+ ?0 3) is probably meant to be the character ?3, so what about (+
48 3)?
Deciding when something is a character and when it isn't is
ai-complete. Emacs is well on its way (M-x doctor RET), but just not
quite there, yet.
--
~/.signature
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNU Emacs 21.3.50 : Problem in (point-min)
2003-06-25 20:01 GNU Emacs 21.3.50 : Problem in (point-min) Markus Rost
2003-06-26 9:25 ` Kai Großjohann
@ 2003-06-26 13:39 ` Benjamin Riefenstahl
1 sibling, 0 replies; 6+ messages in thread
From: Benjamin Riefenstahl @ 2003-06-26 13:39 UTC (permalink / raw
Hi Markus,
Markus Rost <rost@math.ohio-state.edu> writes:
> It happens for me also for other numbers.
Yes I see that now. I didn't investigate the issue besides just
trying a few obvious numbers. I should have tried more *characters*
instead, that's much more interesting ;-).
> Buffer position 97 has nothing to do with character "a", so why
> showing "?a" in the minibuffer?
Yes, you know that and I know that. But how is Emacs supposed to
know, when both are represented exactly the same? Emacs could just
display the number only (as it did before, I think), but than you'd
have to figure out yourself what character is represented by
e.g. 2276, in case you use a function that returns a character.
You could argue that ELisp should use different types for characters
and integers. But it doesn't, and I doubt that that is going to
change.
> By the way, when saving this mail, I was offered the following
> coding system, apparently because of ?悍.
>
> Coding system for saving this buffer:
> S -- shift_jis-unix (alias of japanese-shift-jis-unix)
Sounds like a feature to me. Otherwise you could have lost the
Japanese characters and/or I wouldn't have seen them here and I'd have
had to guess what you are seeing.
so long, benny
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNU Emacs 21.3.50 : Problem in (point-min)
2003-06-26 9:25 ` Kai Großjohann
@ 2003-06-26 14:02 ` Stephen J. Turnbull
0 siblings, 0 replies; 6+ messages in thread
From: Stephen J. Turnbull @ 2003-06-26 14:02 UTC (permalink / raw
>>>>> "Kai" == Kai Großjohann <kai.grossjohann@gmx.net> writes:
Kai> Deciding when something is a character and when it isn't is
Kai> ai-complete.
It doesn't need to be. Arguably, it shouldn't be.
--
Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-06-26 14:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-25 20:01 GNU Emacs 21.3.50 : Problem in (point-min) Markus Rost
2003-06-26 9:25 ` Kai Großjohann
2003-06-26 14:02 ` Stephen J. Turnbull
2003-06-26 13:39 ` Benjamin Riefenstahl
-- strict thread matches above, loose matches on Subject: below --
2003-06-23 10:35 Dhruva Krishnamurthy
2003-06-23 16:38 ` Benjamin Riefenstahl
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).