Si quiero eliminar todo en un búfer con elisp, ¿cómo hago eso?
20
¿Lo has intentado 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.
¿Cómo encontrar tal función? M-x apropos buffer erase
erase-bufferse llame.kill-bufferes su amigo.Puedes usar algo de
setfmagia.(setf (buffer-string) "")fuente
También hay esta respuesta :
C-x h + della tecla borra el búferNota: Esto requiere
transient-mark-modeestar habilitado (que es por defecto).fuente