From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#1948: confusion and bug in dabbrev.el Date: Mon, 29 Feb 2016 15:18:43 +1100 Message-ID: <87k2loywrg.fsf__40446.3975959972$1456719624$gmane$org@gnus.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456719624 27778 80.91.229.3 (29 Feb 2016 04:20:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 04:20:24 +0000 (UTC) Cc: 1948@debbugs.gnu.org, Peter Tury , emacs-devel@gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 29 05:20:10 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 1aaFJZ-0003x4-D3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 05:20:09 +0100 Original-Received: from localhost ([::1]:33954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaFJY-0003nj-GU for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2016 23:20:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaFJV-0003kh-GN for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 23:20:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaFJS-0006YT-Af for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 23:20:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaFJS-0006YP-7W for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 23:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aaFJS-0007QR-3P for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 23:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Feb 2016 04:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1948 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed patch Original-Received: via spool by 1948-submit@debbugs.gnu.org id=B1948.145671955328475 (code B ref 1948); Mon, 29 Feb 2016 04:20:02 +0000 Original-Received: (at 1948) by debbugs.gnu.org; 29 Feb 2016 04:19:13 +0000 Original-Received: from localhost ([127.0.0.1]:51271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaFIe-0007PD-SG for submit@debbugs.gnu.org; Sun, 28 Feb 2016 23:19:13 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:46743) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaFIc-0007P3-N1 for 1948@debbugs.gnu.org; Sun, 28 Feb 2016 23:19:11 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aaFIG-0001aD-3V; Mon, 29 Feb 2016 05:18:48 +0100 In-Reply-To: (Alan Third's message of "Sat, 30 Jan 2016 01:01:37 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aaFIG-0001aD-3V MailScanner-NULL-Check: 1457324329.07113@tgoM4buDYb8gkirqqE8VjA 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114081 Archived-At: Alan Third writes: > I think I've got a fix for this. > > The problem is that dabbrev--substitute-expansion alters EXPANSION > before using it in the substitution, but dabbrev-expand has no idea that > it's done this, so it assumes the unaltered EXPANSION is still valid and > saves it. > > The patch makes dabbrev--substitute-expansion return EXPANSION, and > dabbrev-expand saves that version instead. > > I considered making a new function to remove the whitespace and using it > in both dabbrev-expand and dabbrev--substitute-expansion, but returning > the value actually used strikes me as safer, in case anything else is > done to it. If I understand the code correctly, this looks like a good fix to me. Could you resubmit it with the test case you sent earlier as one patch? Also I see that we have a copyright disclaimer on file for your work. Is that sufficient to accept code into Emacs? (I'm asking the other Emacs hackers here...) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no