[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with simple script to clean out an ERC buffer
From: |
J. David Boyd |
Subject: |
Problem with simple script to clean out an ERC buffer |
Date: |
Tue, 05 Jun 2018 17:21:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (cygwin) |
I've put this together:
(defun clearERCbuffer()
(interactive)
(previous-line)
(end-of-line)
(set-mark(point))
(beginning-of-buffer)
(exchange-point-and-mark)
; (set-text-properties (point-min) (point-max) nil nil )
(delete-region (point-min) (point-max)))
(bind-key (kbd "H-C-c") 'clearERCbuffer)
So I go into an ERC buffer, put the cursor at the prompt, hit H-C-c, and it
always tells me that "Text is read-only"
But, if I manually execute the commands above, and press C-w when I get to the
delete-region command, it works fine.
I tried the set-text-properties to remove any read-only attributes, but that
makes no difference.
What stupidly obvious item am I overlooking?
Thanks,
Dave in Hudson, FL
- Problem with simple script to clean out an ERC buffer,
J. David Boyd <=