From: D. Goel <deego@glue.umd.edu>
Subject: Re: ** Q: HOW TO MANIPULATE STRINGS IN A FILE WITH A LISP FUNCTION **
Date: 16 Sep 2002 09:07:46 -0400 [thread overview]
Message-ID: <87znuiulp9.fsf@computer.localdomain> (raw)
In-Reply-To: 9e8ebeb2.0209151930.79f76ae9@posting.google.com
<newsgroups restricted to g.e.help>
> My problem is very simple for an emacs guru. More than one solution is
> very welcome.
>
> I have a list of numbers in a file as follows:
>
> ABC98789
> DDE90898889
> FRE9090909
;; returns somethign like (("ABC" "DEF" "GGH") ("1123" "223" "332"))
(defun gnuist-contents (file)
""
(let (let-num let num
(letters nil)
(numbers nil))
(find-file file)
(goto-char (point-min))
(while (forward-word 1)
(setq let-num (format "%S" (sexp-at-point)))
(setq let (substring let-num 0 3))
(setq num (substring let-num 3 (length let-num)))
(push let letters)
(push num numbers))
(list (reverse letters) (reverse numbers))))
next prev parent reply other threads:[~2002-09-16 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 3:30 ** Q: HOW TO MANIPULATE STRINGS IN A FILE WITH A LISP FUNCTION ** gnuist
2002-09-16 13:07 ` D. Goel [this message]
2002-09-17 17:49 ` Barry Margolin
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=87znuiulp9.fsf@computer.localdomain \
--to=deego@glue.umd.edu \
/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.