unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-pretest-bug@gnu.org, bug-gnu-emacs@gnu.org,
	1051@emacsbugs.donarmstrong.com, rms@gnu.org
Subject: bug#1051: 23.0.60; rmail decoding bug
Date: Wed, 01 Oct 2008 09:29:41 +0900	[thread overview]
Message-ID: <E1Kkpb3-0005oB-0p@etlken.m17n.org> (raw)
In-Reply-To: <uiqsdkfmo.fsf@gnu.org> (message from Eli Zaretskii on Tue, 30 Sep 2008 15:00:31 +0300)

In article <uiqsdkfmo.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > It may be good to provide byte-after, following-byte, and
> > preceding-byte (all signal an error if the character is not
> > an ASCII nor eight-bit character).  What do you think?

> I agree that it would be nice to have such a feature, but perhaps a
> single API

>   (get-byte POS)

> would be enough?  This could default to point if POS is nil or
> omitted, and could even read from a string if POS is a string.

Ah!  How about something like this?

(defun get-byte (pos &optional string)
  "Return a byte at position POS of the current buffer..
If POS is nil, it defaults to point.
If the second optional arg STRING is non-nil, return a byte in
STRING at index POS.
An error is signaled if the character at POS is not ASCII
nor eight-bit character."
  ...)

---
Kenichi Handa
handa@ni.aist.go.jp






      parent reply	other threads:[~2008-10-01  0:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29 17:13 bug#1051: 23.0.60; rmail decoding bug Richard M. Stallman
2008-09-29 19:03 ` Eli Zaretskii
2008-09-30  4:55   ` Richard M. Stallman
2008-09-30  7:32     ` Eli Zaretskii
2008-09-30  8:40       ` Eli Zaretskii
2008-09-30 10:59         ` Kenichi Handa
2008-09-30 12:00           ` Eli Zaretskii
2008-09-30 23:30             ` Richard M. Stallman
2008-10-01  0:29             ` Kenichi Handa [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Kkpb3-0005oB-0p@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=1051@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=rms@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 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).