From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#23254: 25.0.90; substitute-command-keys does not preserve text properties Date: Thu, 14 Apr 2016 08:28:25 -0700 Organization: UCLA Computer Science Department Message-ID: <570FB719.7090706@cs.ucla.edu> References: <570950D5.70908@live.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060808050006020203050903" X-Trace: ger.gmane.org 1460647769 12895 80.91.229.3 (14 Apr 2016 15:29:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Apr 2016 15:29:29 +0000 (UTC) Cc: 23254-done@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 14 17:29:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aqjCh-0002rz-EZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Apr 2016 17:29:11 +0200 Original-Received: from localhost ([::1]:41728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjCg-0005p5-Nw for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Apr 2016 11:29:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjCc-0005mg-Bj for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2016 11:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqjCY-0002hq-4W for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2016 11:29:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjCY-0002hk-0m for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2016 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aqjCX-0005nS-Sr for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2016 11:29:01 -0400 In-Reply-To: <570950D5.70908@live.com> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Apr 2016 15:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 23254 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 23254@debbugs.gnu.org, eggert@cs.ucla.edu, clement.pitclaudel@live.com Original-Received: via spool by 23254-done@debbugs.gnu.org id=D23254.146064771922246 (code D ref 23254); Thu, 14 Apr 2016 15:29:01 +0000 Original-Received: (at 23254-done) by debbugs.gnu.org; 14 Apr 2016 15:28:39 +0000 Original-Received: from localhost ([127.0.0.1]:35482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqjCB-0005mk-G3 for submit@debbugs.gnu.org; Thu, 14 Apr 2016 11:28:39 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqjC8-0005mW-WB for 23254-done@debbugs.gnu.org; Thu, 14 Apr 2016 11:28:37 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 17509160E69; Thu, 14 Apr 2016 08:28:31 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id cAKB-ENMNeNG; Thu, 14 Apr 2016 08:28:25 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B5D4716120B; Thu, 14 Apr 2016 08:28:25 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4O4flGs0kqeB; Thu, 14 Apr 2016 08:28:25 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8C57F160E69; Thu, 14 Apr 2016 08:28:25 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 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: 208.118.235.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:116460 Archived-At: This is a multi-part message in MIME format. --------------060808050006020203050903 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Although substitute-command-keys has never kept text properties when it makes a change, it is annoying that merely substituting quotes strips the properties, so I installed the attached patch into emacs-25 to fix this particular problem. Thanks for reporting it. --------------060808050006020203050903 Content-Type: application/x-patch; name="0001-substitute-command-keys-keeps-quotes-text-props.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-substitute-command-keys-keeps-quotes-text-props.patch" RnJvbSA5MzBhNzNiMjYyMWEwM2JiNjNhZTUxOTk3NWIwNGJkZDhkOWFhMWM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