all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Jeff Clough <kb1vqh@gmail.com>
Cc: 354@debbugs.gnu.org
Subject: bug#354: "Added (how many lines, bytes?!) to file.txt"
Date: Thu, 26 Feb 2015 23:21:06 -0800	[thread overview]
Message-ID: <54F01AE2.8050406@cs.ucla.edu> (raw)
In-Reply-To: <87r6bemkjj.fsf@jidanni.org>

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.





  parent reply	other threads:[~2015-02-27  7:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-03 18:37 bug#354: "Added (how many lines, bytes?!) to file.txt" jidanni
2008-06-03 21:07 ` Stefan Monnier
2008-06-06  4:02 ` Kevin Rodgers
2008-06-06 14:56   ` Drew Adams
2015-02-27  7:21 ` Paul Eggert [this message]
2015-02-27 13:52   ` Jeff Clough
2017-03-14  0:58     ` npostavs
2017-03-14 15:55       ` Eli Zaretskii
2017-04-01  4:27         ` npostavs
2017-04-01  6:09           ` Eli Zaretskii
2017-04-02  3:55             ` npostavs
2017-04-02  6:16               ` Andreas Schwab
2017-04-02 16:10                 ` npostavs
2017-04-02 15:52               ` Eli Zaretskii
2017-04-02 18:24               ` Paul Eggert
2017-04-02 18:40                 ` npostavs
2017-04-02 18:44                   ` Paul Eggert
2017-04-02 19:09                     ` npostavs
2017-04-07  2:27                       ` npostavs
2017-04-10  2:17 ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F01AE2.8050406@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=354@debbugs.gnu.org \
    --cc=kb1vqh@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.