From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: Re: emacs doc changes Date: Wed, 19 Apr 2006 21:34:41 +0300 Message-ID: <20060419183441.GA3137@gothmog.pc> References: <4nodz4ywgg.fsf@asimov.bwh.harvard.edu> <4nejzv9b98.fsf@asimov.bwh.harvard.edu> <4n7j5l5xt6.fsf_-_@asimov.bwh.harvard.edu> <85fyk9fnxv.fsf@lola.goethe.zz> <4nacah4f88.fsf@asimov.bwh.harvard.edu> <85bquxfn3j.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145471733 31103 80.91.229.2 (19 Apr 2006 18:35:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2006 18:35:33 +0000 (UTC) Cc: Ted Zlatanov , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 19 20:35:29 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FWHWM-0006Gv-7m for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2006 20:35:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWHWL-0002aa-Ms for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2006 14:35:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FWHWA-0002aU-8D for emacs-devel@gnu.org; Wed, 19 Apr 2006 14:35:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FWHW8-0002aI-9f for emacs-devel@gnu.org; Wed, 19 Apr 2006 14:35:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWHW8-0002aF-5h for emacs-devel@gnu.org; Wed, 19 Apr 2006 14:35:08 -0400 Original-Received: from [62.1.205.36] (helo=igloo.linux.gr) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FWHXG-0003XW-6b; Wed, 19 Apr 2006 14:36:18 -0400 Original-Received: from gothmog.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.6/8.13.6/Debian-1) with ESMTP id k3JIYkCA030955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 19 Apr 2006 21:34:48 +0300 Original-Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.6/8.13.6) with ESMTP id k3JIYgAs009325; Wed, 19 Apr 2006 21:34:42 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Original-Received: (from giorgos@localhost) by gothmog.pc (8.13.6/8.13.6/Submit) id k3JIYf8p009321; Wed, 19 Apr 2006 21:34:41 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Original-To: David Kastrup Content-Disposition: inline In-Reply-To: <85bquxfn3j.fsf@lola.goethe.zz> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.386, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.81, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53097 Archived-At: On 2006-04-19 20:15, David Kastrup wrote: >Ted Zlatanov writes: >> On 19 Apr 2006, dak@gnu.org wrote: >>> Is there a reason not to use unified diffs ("diff -u") when >>> available? Of course, not all diff programs can provide them, but >>> GNU diff does, and patch understands them just as well, and I find >>> it quite more human-readable (if I consider myself representative >>> for a human, that is). >> >> RMS has asked me for context diffs before, so I'm guessing unified >> patches are less useful to Emacs maintainers... > > I am not sure about that: maybe it is just because not all diff > programs can deliver unified. That's why I was asking Eli. > >> I can provide -u as well, since I would just do "cvs diff -u" >> instead of "cvs diff -c". > > Well, context diffs certainly are fine enough for use with "patch", so > there is little reason to post another batch because of that. I was > more asking about a general policy. > > I have actually customized `diff-switches' to "-u" myself, and it > would be interesting to hear whether that could cause trouble in any > way when cooperating with other people. I think that `context diffs' (poorly named, since -u diffs have context too, if you ask me), are preferable in some situations. Mostly when whole blocks of text change in ways that also include re-indenting and/or re-formatting of the text. In the FreeBSD source tree, we prefer seeing unified diffs, but we also encourage people not to re-wrap or otherwise re-indent code unless strictly necessary. This can be harder to read when Elisp source code changes are part of the diff though, i.e. | (when (memq t (mapcar (lambda (buffer) | (with-current-buffer buffer | show-paren-mode)) | (buffer-list))) | (setq show-paren-idle-timer (run-with-idle-timer |- show-paren-delay t |- 'old-show-paren-function))) |+ show-paren-delay nil |+ 'show-paren-function))) I can easily think of unified diffs getting *very* ugly with lots of changes around a loop with several nesting levels. A "diff -c" patch tends to group blocks of code in separate areas, marked with '!', so this would be: | (when (memq t (mapcar (lambda (buffer) | (with-current-buffer buffer | show-paren-mode)) | (buffer-list))) | (setq show-paren-idle-timer (run-with-idle-timer |! show-paren-delay t |! 'old-show-paren-function))) |----------- | (when (memq t (mapcar (lambda (buffer) | (with-current-buffer buffer | show-paren-mode)) | (buffer-list))) | (setq show-paren-idle-timer (run-with-idle-timer |+ show-paren-delay nil |+ 'show-paren-function))) Being slightly more verbose, this patch lets one quickly look at the entire "new loop" without having to mentally "context switch" between reading only the '-' lines or only the '+' lines. But I'm just guessing here at why Emacs people prefer "diff -c" patches. - Giorgos