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#354: "Added (how many lines, bytes?!) to file.txt" Date: Thu, 26 Feb 2015 23:21:06 -0800 Organization: UCLA Computer Science Department Message-ID: <54F01AE2.8050406@cs.ucla.edu> References: <87r6bemkjj.fsf@jidanni.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1425021743 22742 80.91.229.3 (27 Feb 2015 07:22:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Feb 2015 07:22:23 +0000 (UTC) Cc: 354@debbugs.gnu.org To: Jeff Clough Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 27 08:22:12 2015 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 1YRFFT-00077f-Mt for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Feb 2015 08:22:11 +0100 Original-Received: from localhost ([::1]:34334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRFFT-0000DJ-1h for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Feb 2015 02:22:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRFFO-00008m-Bx for bug-gnu-emacs@gnu.org; Fri, 27 Feb 2015 02:22:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRFFK-00083m-7V for bug-gnu-emacs@gnu.org; Fri, 27 Feb 2015 02:22:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRFFK-00083d-44 for bug-gnu-emacs@gnu.org; Fri, 27 Feb 2015 02:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YRFFJ-0007Z4-NW for bug-gnu-emacs@gnu.org; Fri, 27 Feb 2015 02:22:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87r6bemkjj.fsf@jidanni.org> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Feb 2015 07:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 354 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 354-submit@debbugs.gnu.org id=B354.142502167629025 (code B ref 354); Fri, 27 Feb 2015 07:22:01 +0000 Original-Received: (at 354) by debbugs.gnu.org; 27 Feb 2015 07:21:16 +0000 Original-Received: from localhost ([127.0.0.1]:59213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YRFEZ-0007Y4-Na for submit@debbugs.gnu.org; Fri, 27 Feb 2015 02:21:16 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:34086) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YRFEW-0007Xq-Ro for 354@debbugs.gnu.org; Fri, 27 Feb 2015 02:21:13 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 4C2EE39E801F; Thu, 26 Feb 2015 23:21:07 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tr7mrwd-1IeS; Thu, 26 Feb 2015 23:21:06 -0800 (PST) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 9026739E801D; Thu, 26 Feb 2015 23:21:06 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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:99859 Archived-At: Following up to: http://lists.gnu.org/archive/html/emacs-devel/2015-02/msg01364.html Jeff Clough wrote: > 1. git checkout master > 2. git pull > 3. git checkout -b wishlist-354 (is this overkill for a small change?) No, it's what I do. > 4. Changed write-region in "fileio.c" > 5. Tested my change (is building in place advised?) It's what I do. Some people prefer building in another directory. > 6. Created "wishlist354log.txt" with my commit message > 7. git commit -a -F /path/to/wishlist354log.txt For now, you need a ChangeLog entry in src/ChangeLog too; it's essentially a copy of the commit message. On my list of things to do is simplifying this. > 8. git format-patch -1 (is using this advised?) Yes, it's good. > Changed write-region to show characters added in message This should be a proper ChangeLog message, e.g., by adding a 2nd line "* fileio.c (write_region): description". > + message ((NUMBERP (append) > + ? "Updated %d characters of %s" > + : ! NILP (append) > + ? "Added %d characters to %s" > + : "Wrote %d characters to %s"), > + (int) (XINT (end) - XINT (start)), > + SDATA (ENCODE_SYSTEM (visit_file))); This won't work on platforms where EMACS_INT is wider than int. Use the pI macro instead, and don't cast to 'int'. Also, you need to change the documentation of this stuff in doc/emacs/files.texi, and add a news item in etc/NEWS. Plus, you need to change epa-file-write-region, jka-compr-write-region, etc. to be compatible. And there's probably more stuff. I suggest running this shell command: grep -nH -re 'Wrote ' $(git ls-files) and checking every matching line.