From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: bug#1948: confusion and bug in dabbrev.el Date: Mon, 29 Feb 2016 15:18:43 +1100 Message-ID: <87k2loywrg.fsf@gnus.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456719568 27006 80.91.229.3 (29 Feb 2016 04:19:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 04:19:28 +0000 (UTC) Cc: 1948@debbugs.gnu.org, Peter Tury , emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 29 05:19:19 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aaFIk-0003bD-V6 for ged-emacs-devel@m.gmane.org; Mon, 29 Feb 2016 05:19:19 +0100 Original-Received: from localhost ([::1]:33944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaFIk-0003Cz-4u for ged-emacs-devel@m.gmane.org; Sun, 28 Feb 2016 23:19:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaFIh-0003Ch-ET for emacs-devel@gnu.org; Sun, 28 Feb 2016 23:19:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaFIe-0006KL-6U for emacs-devel@gnu.org; Sun, 28 Feb 2016 23:19:15 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:54990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaFId-0006KF-WA for emacs-devel@gnu.org; Sun, 28 Feb 2016 23:19:12 -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-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200803 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