unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help with contributing first change (patch for debbugs 354)
@ 2015-02-27  0:07 Jeff Clough
  2015-02-27  7:20 ` Paul Eggert
  2015-02-27  7:35 ` Eli Zaretskii
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff Clough @ 2015-02-27  0:07 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-27  7:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27  0:07 Help with contributing first change (patch for debbugs 354) Jeff Clough
2015-02-27  7:20 ` Paul Eggert
2015-02-27  7:35 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).