From: dkcombs@panix.com (David Combs)
Subject: Re: How to see the value of each char in a string?
Date: Fri, 29 Nov 2002 23:57:58 +0000 (UTC) [thread overview]
Message-ID: <as8uu5$erh$1@reader1.panix.com> (raw)
In-Reply-To: uisyixb0z.fsf@ID-87814.user.dfncis.de
In article <uisyixb0z.fsf@ID-87814.user.dfncis.de>,
Oliver Scholz <alkibiades@gmx.de> wrote:
>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)))))
>
Yes, thanks, does the trick.
>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 <URL: http://www.cpqd.com.br/~vinicius/emacs/ascii.el.gz>.
Now, *that* is one neat little tool!
How does one find out that such tools exist?
Thanks!
David
prev parent reply other threads:[~2002-11-29 23:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-26 6:37 How to see the value of each char in a string? David Combs
2002-11-26 17:31 ` Kai Großjohann
2002-12-04 10:14 ` David Combs
2002-12-04 17:53 ` Kai Großjohann
2002-12-05 10:42 ` Kester Clegg
2002-11-26 18:44 ` Barry Margolin
2002-11-27 7:36 ` David Combs
2002-11-27 9:04 ` Oliver Scholz
2002-11-27 18:50 ` David Combs
2002-11-27 19:22 ` Barry Margolin
2002-11-29 22:24 ` David Combs
2002-11-30 7:28 ` Barry Margolin
2002-11-30 17:22 ` Kai Großjohann
2002-12-02 10:12 ` Barry Margolin
2002-12-02 17:53 ` Kai Großjohann
2002-11-28 10:07 ` Oliver Scholz
2002-11-29 23:57 ` David Combs [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='as8uu5$erh$1@reader1.panix.com' \
--to=dkcombs@panix.com \
/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.