all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Cc: emacs-devel@gnu.org, Philip Kaludercic <philipk@posteo.net>
Subject: Re: Proposal to add Popper to ELPA
Date: Tue, 5 Sep 2023 18:05:36 -0300	[thread overview]
Message-ID: <cc4ef124-74af-9201-3e71-9bf920f1b405@gmail.com> (raw)
In-Reply-To: <87wmx4cply.fsf@gmail.com>

On 5/9/23 17:49, Karthik Chikmagalur wrote:
 >>  > -  :type '(restricted-sexp :match-alternatives (stringp symbolp
 >> functionp consp))
 >>  > -  :group 'popper)
 >>  > +  :type '(repeat (string :tag "Regular Expression")
 >>  > +         (symbol :tag "Major Mode")
 >>  > +         (function :tag "Predicate Function")
 >>  > +         ;; What is the consp in (restricted-sexp 
:match-alternatives
 >> (stringp symbolp functionp consp))?
 >>  > +         ))
 >>
 >> The different alternatives should be inside a choice:
 >> :type '(repeat (choice (string :tag "Regular Expression")
 >>                         (symbol :tag "Major Mode")
 >>                         (function :tag "Predicate Function"))
 >
 > In addition, cons cells of the form '(string-or-symbol . hide) are
 > allowed.  I'm not sure how to represent this in the customization types
 > list.  I'm okay with omitting this from the customize interface, since
 > it's a niche option that few users will need.

I didn't notice the strings were really regular expressions, so I
adapted the type to use regexp.

The cons widget, as below, does the job but it looks UGLY.  I'm in a
hurry now, so I can't take a look at how to make it prettier.

:type '(repeat (choice regexp
                        (symbol :tag "Major Mode")
                        (function :tag "Predicate Function")
                        (cons (choice regexp
                                      (symbol :tag "Major Mode"))
                              (const :tag "Hide" hide))))




  reply	other threads:[~2023-09-05 21:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 16:55 Proposal to add Popper to ELPA Karthik Chikmagalur
2023-09-05 17:38 ` Philip Kaludercic
2023-09-05 20:12   ` Karthik Chikmagalur
2023-09-05 20:37     ` Mauro Aranda
2023-09-06 17:36     ` Philip Kaludercic
2023-09-06 23:09       ` Karthik Chikmagalur
2023-09-05 20:27   ` Mauro Aranda
2023-09-05 20:49     ` Karthik Chikmagalur
2023-09-05 21:05       ` Mauro Aranda [this message]
2023-09-06 17:13         ` Karthik Chikmagalur
2023-09-08 17:25           ` Philip Kaludercic
2023-09-08 21:52             ` Karthik Chikmagalur
2023-09-09  0:33               ` Mauro Aranda
2023-09-09  0:57                 ` Karthik Chikmagalur
2023-09-09  8:10               ` Philip Kaludercic

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=cc4ef124-74af-9201-3e71-9bf920f1b405@gmail.com \
    --to=maurooaranda@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=karthikchikmagalur@gmail.com \
    --cc=philipk@posteo.net \
    /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.