all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ben Bacarisse <ben.lists@bsb.me.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: Interactively edit a list of strings
Date: Mon, 23 Jul 2018 02:05:57 +0100	[thread overview]
Message-ID: <87y3e27ocq.fsf@bsb.me.uk> (raw)
In-Reply-To: mailman.4060.1532303750.1292.help-gnu-emacs@gnu.org

Joe Riel <joer@san.rr.com> writes:

> Am looking for a good way to interactively edit a list of strings,
> that is, to allow the user to selectively delete strings from the list.
> Any suggestions on how to implement this?  
>
> My first thought is to write each string on a separate line in a
> temporary buffer, allow the user to edit that, then reassemble the
> buffer into a list, however, that isn't ideal, it allows too much
> freedom to modify the content.  I could restrict the allowable
> commands to deleting lines, but am wondering if there is a better way.

You might consider using widgets:

https://www.gnu.org/software/emacs/manual/html_mono/widget.html

You could write the strings as an "editable-list" widget without the
[INS] buttons so only a [DEL] button available.

-- 
Ben.


       reply	other threads:[~2018-07-23  1:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4060.1532303750.1292.help-gnu-emacs@gnu.org>
2018-07-23  1:05 ` Ben Bacarisse [this message]
2018-07-23  4:22   ` Interactively edit a list of strings Marcin Borkowski
2018-07-24  8:51   ` Stephen Berman
2018-07-22 23:55 Joe Riel
2018-07-23  2:39 ` Eric Abrahamsen
2018-07-23  4:21   ` Marcin Borkowski
2018-07-23  5:39     ` Joe Riel
2018-07-23 11:33       ` Yuri Khan

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=87y3e27ocq.fsf@bsb.me.uk \
    --to=ben.lists@bsb.me.uk \
    --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.
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.