all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* string to list  or  string to array
@ 2012-10-21 10:37 Swami Tota Ram Shankar
  2012-10-21 11:16 ` Pascal J. Bourguignon
  0 siblings, 1 reply; 13+ messages in thread
From: Swami Tota Ram Shankar @ 2012-10-21 10:37 UTC (permalink / raw)
  To: help-gnu-emacs

Friends, I am trying to read text from a file opened in emacs and
recognize it as array or list so that I can do some vector additions
using mapcar.

I am mainly stuck at the stage of converting the string text to array
or list.

The method which I use to locate the text is "looking-at" function and
the regexp works.

(when (looking-at "[[0-9.+-\\ ]+]")

some code that is to play around for debugging and messaging and
checking the match
(forward-char (+ (string-width (match-string 0)) 1))
(setq V (match-string 0))
(setq V (intern (match-string 0)))


The cursor is placed on the start bracket, ie "["

and text looks like for example array of indefinite length

[17.16 -17.16 17.16 17.16 17.16 17.16 17.16 17.16]


Please suggest some different solutions that can take the string
matched, match-string for example and convert to a list or an array on
which I can do mapcars or lambdas.

Thanks
Swami


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-11-21 21:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-21 10:37 string to list or string to array Swami Tota Ram Shankar
2012-10-21 11:16 ` Pascal J. Bourguignon
2012-10-21 19:03   ` Swami Tota Ram Shankar
2012-10-21 20:22     ` Pascal J. Bourguignon
2012-10-23  1:16       ` Style Issues in Lisp and Scheme programming, setq versus let ... and onion structure with multiple cores or eyes or kernels " Swami Tota Ram Shankar
2012-10-23  2:36         ` PJ Weisberg
     [not found]         ` <mailman.11503.1350959781.855.help-gnu-emacs@gnu.org>
2012-10-23  3:02           ` Swami Tota Ram Shankar
2012-10-24 15:03             ` Stefan Monnier
2012-10-25  3:20               ` gnuist007
2012-10-25  8:25                 ` José A. Romero L.
2012-11-21 21:56                 ` Pascal J. Bourguignon
2012-10-23  8:15         ` Pascal J. Bourguignon
2012-10-24  8:05         ` Thien-Thi Nguyen

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.