Jeśli chcę usunąć wszystko w buforze z elisp, jak to zrobić?
Jeśli chcę usunąć wszystko w buforze z elisp, jak to zrobić?
Odpowiedzi:
Próbowałeś erase-buffer?
erase-buffer is an interactive built-in function in `C source code'.
(erase-buffer)
Delete the entire contents of the current buffer.
Any narrowing restriction in effect (see `narrow-to-region') is removed,
so the buffer is truly empty after this.
Jak znaleźć taką funkcję? M-x apropos buffer erase
kill-bufferjest twój przyjaciel.
Możesz użyć setfmagii.
(setf (buffer-string) "")
Jest też ta odpowiedź :
C-x h + del Klawisz usuwa bufor
Uwaga: Wymaga transient-mark-modeto włączenia (domyślnie jest).
erase-bufferwywołaniu.