From: dboyd2@mmm.com (J. David Boyd)
To: help-gnu-emacs@gnu.org
Subject: Problem with simple script to clean out an ERC buffer
Date: Tue, 05 Jun 2018 17:21:54 -0400 [thread overview]
Message-ID: <dhwy4lihapzh.fsf@mmm.com> (raw)
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
next reply other threads:[~2018-06-05 21:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 21:21 J. David Boyd [this message]
2018-06-06 1:18 ` Problem with simple script to clean out an ERC buffer 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dhwy4lihapzh.fsf@mmm.com \
--to=dboyd2@mmm.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.