unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Problem with simple script to clean out an ERC buffer
@ 2018-06-05 21:21 J. David Boyd
  2018-06-06  1:18 ` Jonathan Kyle Mitchell
  0 siblings, 1 reply; 28+ messages in thread
From: J. David Boyd @ 2018-06-05 21:21 UTC (permalink / raw)
  To: help-gnu-emacs



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




^ permalink raw reply	[flat|nested] 28+ messages in thread
[parent not found: <mailman.1269.1528233735.1292.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2018-06-10 18:29 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-05 21:21 Problem with simple script to clean out an ERC buffer J. David Boyd
2018-06-06  1:18 ` Jonathan Kyle Mitchell
2018-06-06 12:29   ` J. David Boyd
     [not found] <mailman.1269.1528233735.1292.help-gnu-emacs@gnu.org>
2018-06-06  8:49 ` Emanuel Berg
2018-06-06 12:17   ` J. David Boyd
2018-06-06 12:45     ` Joost Kremers
2018-06-06 20:34       ` J. David Boyd
     [not found]   ` <mailman.1324.1528287460.1292.help-gnu-emacs@gnu.org>
2018-06-06 12:30     ` Emanuel Berg
2018-06-06 20:35       ` J. David Boyd
     [not found]       ` <mailman.1362.1528317446.1292.help-gnu-emacs@gnu.org>
2018-06-07 10:05         ` Emanuel Berg
2018-06-07 14:04           ` J. David Boyd
2018-06-07 14:08             ` Van L
     [not found]             ` <mailman.1414.1528380527.1292.help-gnu-emacs@gnu.org>
2018-06-07 14:19               ` Emanuel Berg
2018-06-07 14:28                 ` Van L
     [not found]                 ` <mailman.1415.1528381721.1292.help-gnu-emacs@gnu.org>
2018-06-07 18:24                   ` Emanuel Berg
2018-06-08  5:18                 ` Bob Proulx
2018-06-08  7:13                   ` Van L
     [not found]                 ` <mailman.1460.1528435118.1292.help-gnu-emacs@gnu.org>
2018-06-08 10:11                   ` Emanuel Berg
2018-06-08 11:59                     ` Emanuel Berg
2018-06-10 18:04                       ` Bob Proulx
     [not found]                       ` <mailman.1633.1528653867.1292.help-gnu-emacs@gnu.org>
2018-06-10 18:29                         ` Emanuel Berg
2018-06-08 18:12                 ` J. David Boyd
2018-06-06 17:43     ` Emanuel Berg
2018-06-06 19:12       ` Jonathan Kyle Mitchell
2018-06-06 19:12       ` Robert Pluim
     [not found]       ` <mailman.1348.1528312355.1292.help-gnu-emacs@gnu.org>
2018-06-06 19:23         ` Emanuel Berg
2018-06-06 20:46           ` J. David Boyd
2018-06-06 20:45       ` J. David Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).