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:21:05 +0200
User-agent: mu4e 1.1.0; emacs 27.0.50

On 2018-07-23, at 04:39, Eric Abrahamsen <eric@ericabrahamsen.net> 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?
>
> You could try using `tabulated-list-mode', display your list of strings.
> Then you could write a short command to remove a string from the list
> and redisplay, and bind that in the local keymap. It's tiny bit
> overkill, but would make it possible to do a bunch of other stuff with
> the strings.

I would derive from special-mode.  You get read-only, scrolling and
a few other things for free, and you only have to (re)implement C-k to
delete lines (and creating the buffer/deriving the list from it again,
of course).  And much simpler than tabulated-list-mode.

OTOH, TLM is not /that/ complicated, as I wrote here:
http://mbork.pl/2015-07-18_TLM_vs_EWOC%2C_or_there_and_back_again
a few years ago.

Out of curiosity: what is the use-case?

Hth,

--
Marcin Borkowski
http://mbork.pl



reply via email to

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