help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interactively edit a list of strings


From: Marcin Borkowski
Subject: Re: Interactively edit a list of strings
Date: Mon, 23 Jul 2018 06:22:52 +0200
User-agent: mu4e 1.1.0; emacs 27.0.50

On 2018-07-23, at 03:05, Ben Bacarisse <ben.lists@bsb.me.uk> wrote:

> 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.

Nice idea, though a bit of work.  But widget.el is very powerful!  (I
wrote about it also in 2015:
http://mbork.pl/2015-11-21_The_Emacs_widget_library_and_automatic_modification_of_editing_fields)

Best,

--
Marcin Borkowski
http://mbork.pl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]