From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: gmane.emacs.help Subject: Re: Interactively edit a list of strings Date: Mon, 23 Jul 2018 02:05:57 +0100 Organization: A noiseless patient Spider Message-ID: <87y3e27ocq.fsf@bsb.me.uk> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532308098 9326 195.159.176.226 (23 Jul 2018 01:08:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2018 01:08:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 23 03:08:14 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fhPKf-0002MF-VI for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Jul 2018 03:08:14 +0200 Original-Received: from localhost ([::1]:59076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhPMm-00010Z-Kw for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Jul 2018 21:10:24 -0400 X-Received: by 2002:a5d:4b8e:: with SMTP id b14-v6mr884005wrt.16.1532307957795; Sun, 22 Jul 2018 18:05:57 -0700 (PDT) Original-Path: usenet.stanford.edu!o2-v6no7345418wmc.0!news-out.google.com!d15-v6ni18172wmb.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-Injection-Info: reader02.eternal-september.org; posting-host="b448eb0b50aec7d9ab3b10b5669e931d"; logging-data="15976"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186KaR/joCR0ykwYJrS5DaLf7wowbKjqEA=" Cancel-Lock: sha1:aP04f4o4D0XYoiuNwT8+CXVEdeU= sha1:H0O0+NZA8ZMrD6ax2xJbHBmjOBE= X-BSB-Auth: 1.ea48a9f4435864c2a412.20180723020557BST.87y3e27ocq.fsf@bsb.me.uk Original-Xref: usenet.stanford.edu gnu.emacs.help:223439 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117564 Archived-At: Joe Riel 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.