all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Emanuel Berg <moasenwood@zoho.eu>,
	help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Embedded list selection with ido-completing-read.
Date: Sun, 24 Oct 2021 08:28:30 +0800	[thread overview]
Message-ID: <CAGP6POLYpyT4nzOuarMAfFHLdsnL=31SAhG87EQQSsXv5GeZsA@mail.gmail.com> (raw)
In-Reply-To: <87r1cbwnda.fsf@zoho.eu>

On Sun, Oct 24, 2021 at 3:30 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> See if you can use `cl-case' (or `pcase') instead of `cond'.
>
> In the `interactive' form, only assign values to the formal
> parameters (see my previous post).
>
> You can evaluate these to try:
>
> (interactive "ssay hi: ")
>
> (interactive (list (read-string "say hi: ")))
>
> When done test the function both from Lisp and
> interactively.

I still can't figure out how to use your suggestions above to further
simplify my implementation below:

(defun my-pw-ATOMIC_POSITIONS2 ()
  (interactive
   (list
    (insert "ATOMIC_POSITIONS "
            (completing-read
             "flag: "
             '(("alat")
               ("bohr")
               ("angstrom")
               ("crystal")
               ("crystal_sg")
               )
             )))))

HZ



  reply	other threads:[~2021-10-24  0:28 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23  7:33 Embedded list selection with ido-completing-read Hongyi Zhao
2021-10-23  8:43 ` Hongyi Zhao
2021-10-23 19:29   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24  0:28     ` Hongyi Zhao [this message]
2021-10-24  1:16       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24  2:28         ` Hongyi Zhao
2021-10-24  3:11           ` Hongyi Zhao
2021-10-24  3:21             ` Hongyi Zhao
2021-10-24  5:37           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24  5:36         ` Hongyi Zhao
2021-10-24  5:43           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24  6:57             ` Hongyi Zhao
2021-10-24  7:00               ` Hongyi Zhao
2021-10-24  9:42               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 15:05                 ` Hongyi Zhao
2021-10-24 15:12                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 15:18                     ` Hongyi Zhao
2021-10-24 15:25                       ` Hongyi Zhao
2021-10-24 17:53                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 17:51                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-24 15:21         ` Hongyi Zhao
2021-10-24 16:23           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26  2:52             ` Hongyi Zhao
2021-10-26  5:19               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26  8:44                 ` Hongyi Zhao
2021-10-26 11:23                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 12:31                     ` Hongyi Zhao
2021-10-26 12:40                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 12:55                         ` Hongyi Zhao
2021-10-26 13:04                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 14:04                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 15:07                     ` Hongyi Zhao
2021-10-26 22:14                       ` Emanuel Berg via Users list for the GNU Emacs text editor

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='CAGP6POLYpyT4nzOuarMAfFHLdsnL=31SAhG87EQQSsXv5GeZsA@mail.gmail.com' \
    --to=hongyi.zhao@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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.