From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Brumlow Newsgroups: gmane.emacs.bugs Subject: bug#35025: [PATCH 1/1] htmlfontify-buffer read-only text Date: Wed, 27 Mar 2019 17:22:27 -0500 Message-ID: <877eck0xgc.fsf@brumlow.io> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="8581"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 27.0.50 To: 35025@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 27 23:49:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9HM9-0001yd-Ux for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Mar 2019 23:49:14 +0100 Original-Received: from localhost ([127.0.0.1]:54875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9HM8-0004Vs-W5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Mar 2019 18:49:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9HLz-0004VX-Sm for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 18:49:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9HLz-0001Se-18 for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 18:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48343) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9HLy-0001Sa-TI for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 18:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h9HLy-00021B-R9 for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 18:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Brumlow Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Mar 2019 22:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15537269007688 (code B ref -1); Wed, 27 Mar 2019 22:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Mar 2019 22:48:20 +0000 Original-Received: from localhost ([127.0.0.1]:33653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9HLH-0001zv-TB for submit@debbugs.gnu.org; Wed, 27 Mar 2019 18:48:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9Gwb-0007l2-Ey for submit@debbugs.gnu.org; Wed, 27 Mar 2019 18:22:49 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35215) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h9GwU-0000WD-In for submit@debbugs.gnu.org; Wed, 27 Mar 2019 18:22:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9GwT-0004ho-L2 for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 18:22:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9GwS-0000V5-Aw for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 18:22:41 -0400 Original-Received: from mail.brumlow.io ([66.187.75.170]:34210) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h9GwS-0000UU-0k for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 18:22:40 -0400 Original-Received: from saturn (c-73-115-80-253.hsd1.tx.comcast.net [73.115.80.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.brumlow.io (Postfix) with ESMTPSA id 49C16140235 for ; Wed, 27 Mar 2019 17:22:38 -0500 (CDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Wed, 27 Mar 2019 18:48:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156875 Archived-At: --=-=-= Content-Type: text/plain; format=flowed When trying to htmlfontify read only text I ran into a issue when trying to copy a read only ERC buffer. It failed because the text copied had the property of being read only. I found where hfy-fontify-buffer tries to remove the text properties but fails to do so because the text is read only. By adding (inhibit-read-only t) in the let statement at the top of the function I was able to correct this issue. Patch attached. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=htmlfontify.diff Content-Description: htmlfontify read-only fix diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 9fc029ec58..131d719fad 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1652,7 +1652,8 @@ hfy-fontify-buffer SRCDIR, if set, is the directory being htmlfontified. FILE, if set, is the file name." (if srcdir (setq srcdir (directory-file-name srcdir))) - (let* ( (html-buffer (hfy-buffer)) + (let* ( (inhibit-read-only t) + (html-buffer (hfy-buffer)) (css-sheet nil) (css-map nil) (invis-ranges nil) --=-=-=--