From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeff Clough Newsgroups: gmane.emacs.devel Subject: Help with contributing first change (patch for debbugs 354) Date: Thu, 26 Feb 2015 19:07:27 -0500 Message-ID: <87d24w1akg.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424995685 23362 80.91.229.3 (27 Feb 2015 00:08:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Feb 2015 00:08:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 27 01:07:56 2015 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 1YR8T9-0001tL-Ji for ged-emacs-devel@m.gmane.org; Fri, 27 Feb 2015 01:07:51 +0100 Original-Received: from localhost ([::1]:33246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR8T8-0004sL-Qd for ged-emacs-devel@m.gmane.org; Thu, 26 Feb 2015 19:07:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR8St-0004rc-VB for emacs-devel@gnu.org; Thu, 26 Feb 2015 19:07:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR8So-0002LA-WF for emacs-devel@gnu.org; Thu, 26 Feb 2015 19:07:35 -0500 Original-Received: from mail-qg0-x22d.google.com ([2607:f8b0:400d:c04::22d]:60079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR8So-0002L4-R9 for emacs-devel@gnu.org; Thu, 26 Feb 2015 19:07:30 -0500 Original-Received: by mail-qg0-f45.google.com with SMTP id h3so11656663qgf.4 for ; Thu, 26 Feb 2015 16:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=KF5DzRnkXRkgz53mHRcIqKmF5yb3Alywb421AZcgMf8=; b=PAJ82qPBo5w4n0nrjqsTnLArWJWco92IAxTG8zuaF520LnQGWGB1pdRWGfLK2mlwxs 8ujeckSelZp7d3jpi/wR4582e0MDguSwD7y9ML3HJQnfPx37LxBOpvRSg5F8j7PkoDdd Fj6GObMs9Smp9VBctc8ahVyKw7lCrSlPpMPq+/Gl7Jx6BeCeVBEGexGCwjo23tP23VFd DIHS0IRgYu6dBmqzhNMmaFcQGC4IQANXs6FQ3FtIT9Z7kYO+4mcsA+7/m6L8nPtU3WDK +EYtbDyWpy5L1zT4OuRDoAeSz/ngbAgoodVUVy3tWO2RF4+Qawu/DgWRUzdc5atF3v9N GBlg== X-Received: by 10.140.93.73 with SMTP id c67mr22459821qge.53.1424995649971; Thu, 26 Feb 2015 16:07:29 -0800 (PST) Original-Received: from jeff-Inspiron-3537 (cpe-74-69-219-28.maine.res.rr.com. [74.69.219.28]) by mx.google.com with ESMTPSA id u32sm1558975qgd.46.2015.02.26.16.07.29 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 26 Feb 2015 16:07:29 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::22d 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:183523 Archived-At: Hello, TL;DR: I am attempting to contribute my first change to GNU Emacs and am looking for a little hand-holding concerning the tools to use, and someone to review my change. I find myself with a surplus of free time and would like to spend some of it contributing to GNU Emacs. As my knowledge of its guts is years out of date (and was never that good to begin with), and I have only the most *remedial* understanding of the tools involved, I decided to start with a wishlist item and found debbugs:354 (http://debbugs.gnu.org/db/35/354.html). This is a (seemingly well-received) proposal from 2008 which suggests that append-to-file should output the number of characters appended in addition to the name of the target file. So, I did the following... 1. git checkout master 2. git pull 3. git checkout -b wishlist-354 (is this overkill for a small change?) 4. Changed write-region in "fileio.c" 5. Tested my change (is building in place advised?) 6. Created "wishlist354log.txt" with my commit message 7. git commit -a -F /path/to/wishlist354log.txt 8. git format-patch -1 (is using this advised?) The last command created a file/email message which looks more or less like what's between these lines of hyphens... --------------------------- Changed write-region to show characters added in message Fixes: debbugs:354 --- src/fileio.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 43ab456..42e9ffd 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5000,12 +5000,13 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename, } if (!auto_saving && !noninteractive) - message_with_string ((NUMBERP (append) - ? "Updated %s" - : ! NILP (append) - ? "Added to %s" - : "Wrote %s"), - visit_file, 1); + 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))); return Qnil; } -- 1.9.1 --------------------------- So, what's next? Jeff