Dani Moncayo writes: > On Sat, Jan 18, 2025 at 7:44 PM Dani Moncayo wrote: >> >> On Sat, Jan 18, 2025 at 7:20 PM Thierry Volpiatto wrote: >> > >> > Dani Moncayo writes: >> > > >> > > I like that (register-delete) command. But I think it should error >> > > out if I specify an already empty register. >> > >> > You can't (try to) delete an empty register with the preview. >> >> (??) Maybe I'm missing something. >> >> If I execute the (delete-register) command you wrote, and then I type >> a key which doesn't currently have any register value, what I see is >> that the preview window and the prompt message disappear, as if the >> command had finished correctly. But I could have accidentally hit the >> wrong key, and thought everything went well, when it didn't. > > Oh, I think I found the misunderstanding: If I do > (customize-set-variable 'register-use-preview 'insist), then I indeed > get an error ("[not matching]") in the echo area. > > But with the default value of register-use-preview (traditional), the > (delete-register) command should error out if I try to delete an empty > register, like it does if I try to jump to an empty register. Yes the default value (traditional) doesn't handle properly such issues among other things. -- Thierry