unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pierre Rouleau <prouleau001@gmail.com>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Re: Splitting a list with spaces and comments
Date: Wed, 16 Aug 2023 17:20:58 -0400	[thread overview]
Message-ID: <CALTqLiYSOfBFvJS2eWY-VT3giJq6TdBqTOAuM1CBZx9oV+oQBw@mail.gmail.com> (raw)
In-Reply-To: <8keWxSvGIuVfCOdxTwjgegxipTC3qNBou-tu2B5oU0kKROx8jS1_4ljfqn-SxZvcBDPC6wrjpWCYBJnzM0QwuG5DRXL1H9FX8hkvq0uCNhA=@protonmail.com>

Heime,

Why not just try what you want to learn directly inside Emacs?
You can use the Emacs Lisp REPLl (read-eval-print-loop) for that and
there's one built-in Emacs: ielm.
Type 'M-x ielm' and you will get a buffer with a Emacs Lisp interpreter
running.
Then inside that you can try to set variables with the values you want.
At the ELISP> prompt type any valid Emacs Lisp expression.  If there is an
error it will tell you.

Here's a session creating the csel and cset variables:


*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (setq csel '("Symbol" "Command"))
("Symbol" "Command")

ELISP> csel
("Symbol" "Command")

ELISP> (setq cseq '("alpha α"     "Beta B"     "beta β"


                    "Gamma Γ"     "gamma γ"


                    ;; some comments


                    "Delta Δ"     "delta δ"


                    "Epsilon E"   "epsilon ε"  "varepsilon ε"


                    "Zeta Z"      "zeta ζ"))
("alpha α" "Beta B" "beta β" "Gamma Γ" "gamma γ" "Delta Δ" "delta δ"
"Epsilon E" "epsilon ε" "varepsilon ε" "Zeta Z" "zeta ζ")

ELISP> cseq
("alpha α" "Beta B" "beta β" "Gamma Γ" "gamma γ" "Delta Δ" "delta δ"
"Epsilon E" "epsilon ε" "varepsilon ε" "Zeta Z" "zeta ζ")

ELISP>


On Wed, Aug 16, 2023 at 8:19 AM Heime <heimeborgia@protonmail.com> wrote:

>
> Can one split a list with spaces and comments, like so
>
> (let ( (csel '("Symbol" "Command"))
>        (cseq '("alpha α"     "Beta B"     "beta β"
>                "Gamma Γ"     "gamma γ"
>
>                ;; Additional Graphemes
>                "Delta Δ"     "delta δ"
>                "Epsilon E"   "epsilon ε"  "varepsilon ε"
>                "Zeta Z"      "zeta ζ")) ))
>
>

-- 
/Pierre


  parent reply	other threads:[~2023-08-16 21:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 12:17 Splitting a list with spaces and comments Heime
2023-08-16 19:07 ` Philip Kaludercic
2023-08-16 21:20 ` Pierre Rouleau [this message]
2023-08-17  0:26   ` Heime
2023-08-17  1:01     ` Pierre Rouleau

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=CALTqLiYSOfBFvJS2eWY-VT3giJq6TdBqTOAuM1CBZx9oV+oQBw@mail.gmail.com \
    --to=prouleau001@gmail.com \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@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.
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).