From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: How to see the value of each char in a string? Date: Thu, 28 Nov 2002 11:07:40 +0100 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1038478985 31190 80.91.224.249 (28 Nov 2002 10:23:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 28 Nov 2002 10:23:05 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18HLcu-0007Tm-00 for ; Thu, 28 Nov 2002 11:10:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18HLdm-0005yG-00; Thu, 28 Nov 2002 05:11:26 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-192-226.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: dialin-145-254-192-226.arcor-ip.net (145.254.192.226) Original-X-Trace: fu-berlin.de 1038478087 25061982 145.254.192.226 (16 [87814]) X-Operating-System: GNU/Linux, built from scratch: http://www.linuxfromscratch.org/ X-Attribution: os X-Face: "HgH2sgK|bfH$;PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-msvc-nt5.1.2600) Cancel-Lock: sha1:7bIy7vVI2794ouLNdvV5kiAnYGE= Original-Xref: shelby.stanford.edu gnu.emacs.help:107564 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:4115 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4115 dkcombs@panix.com (David Combs) writes: [...] > , or, if fill-column happens to be 20: > > (146 157 157 061 > ("f" "o" "o" "2" > > 063 146 157 157) > "3" "f" "o" "o") > > Like, maybe running through the string twice, each > time saving the result, and while generating each one, > inserting three newlines every so often, [...] Well, I think it is not possible (or at least very messy) to do this using the graphical representation of lists. What you wrote above would be the list (146 157 157 061 ("f" "o" "o" "2" 063 146 157 157) "3" "f" "o" "o") I must admit that I am not entirely sure that I understand what you want, despite your eplanation of your problem with `ls'. Maybe something like this? (require 'cl) (defun dc-display-ascii (string) (interactive "sString: ") (let ((standard-output (current-buffer))) (pp (mapcar* 'cons (mapcar 'string string) (mapcar 'identity string))))) If you only want a convenient way to browse the ascii value of the chars in a string or buffer, you might want to have a look at the package ascii.el . Oliver -- 8 Frimaire an 211 de la Révolution Liberté, Egalité, Fraternité!