From: TheFlyingDutchman <zzbbaadd@aol.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Get char at point
Date: Sat, 17 Jul 2010 02:45:34 -0700 (PDT) [thread overview]
Message-ID: <f169874d-75d7-4209-8b29-d95094131129@l25g2000prn.googlegroups.com> (raw)
In-Reply-To: pcok4oulc7m.fsf@math.ntnu.no
On Jul 17, 1:55 am, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
> + TheFlyingDutchman <zzbba...@aol.com>:
>
> > Is there a function to get the character at point? I see get-byte,
> > which would work for an ASCII coded file, but I believe Emacs has some
> > support for multi-byte character sets.
>
> If you type C-h f char TAB, you will see a bunch of functions whose
> names begin with "char". Then you might wildly guess that the first hit,
> char-after, is what you are looking for, and if you actually select
> that, the wild guess is confirmed.
>
> --
> * Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
> - It is undesirable to believe a proposition
> when there is no ground whatsoever for supposing it is true.
> -- Bertrand Russell
Thanks! I believe I did look at the char* functions. If it had been
named char-at I would have gotten it. It should be noted that the help
for "char-after" says
--------------------------------------------------------------------------------
(char-after &optional POS)
Return character in current buffer at position POS.
POS is an integer or a marker and defaults to point.
If POS is out of range, the value is nil.
----------------------------------------------------------------------------
The dubious concept of "point" being between characters, was
unfortunately
followed in naming the function, and then luckily ignored in the help
for the function.
next prev parent reply other threads:[~2010-07-17 9:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-17 4:32 Get char at point TheFlyingDutchman
2010-07-17 8:55 ` Harald Hanche-Olsen
2010-07-17 9:37 ` AmosBurke
2010-07-17 9:45 ` TheFlyingDutchman [this message]
2010-07-17 9:57 ` Andreas Politz
2010-07-17 22:48 ` TheFlyingDutchman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f169874d-75d7-4209-8b29-d95094131129@l25g2000prn.googlegroups.com \
--to=zzbbaadd@aol.com \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.