All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] CODING_STYLE: explicitly call out label indentation
Date: Tue, 27 Nov 2018 16:22:20 +0000	[thread overview]
Message-ID: <23549.28476.853916.355490@mariner.uk.xensource.com> (raw)
In-Reply-To: <5BFD656A02000078002006EA@prv1-mh.provo.novell.com>

Since there was some confusion about what we are talking about, see
below.  Obviously the diff output in my `1' test cases is
prefereable.   Note that `git diff' does the same thing as diff -p
(and it doesn't even need a -p option to do it).

I also observe that by default, emacs wants to indent the label by 1
character - even though usually it likes to align labels to the LHS of
the enclosing block.  Presumably for this reason.

Ian.

$ cat t.c
function(){
    code;
out:
    context1;
    context2;
    context3;
    context4;
    will be edited;
    context5;
    context6;
    context7;
}
$ perl -pe 's/will be/was/' <t.c >u.c
$ perl -pe 's/out:/ $&/' <t.c >t1.c
$ perl -pe 's/will be/was/' <t1.c >u1.c
$ diff -up t.c u.c
--- t.c 2018-11-27 16:14:33.614941668 +0000
+++ u.c 2018-11-27 16:15:39.020244882 +0000
@@ -5,7 +5,7 @@ out:
     context2;
     context3;
     context4;
-    will be edited;
+    was edited;
     context5;
     context6;
     context7;
$ diff -up t1.c u1.c
--- t1.c        2018-11-27 16:15:52.424512251 +0000
+++ u1.c        2018-11-27 16:15:57.064604805 +0000
@@ -5,7 +5,7 @@ function(){
     context2;
     context3;
     context4;
-    will be edited;
+    was edited;
     context5;
     context6;
     context7;
$ 

diff --git a/t.c b/t.c
index e0a0315..d09f948 100644
--- a/t.c
+++ b/t.c
@@ -5,7 +5,7 @@ out:
     context2;
     context3;
     context4;
-    will be edited;
+    was edited;
     context5;
     context6;
     context7;
diff --git a/t1.c b/t1.c
index d7ef2c4..bc8bba1 100644
--- a/t1.c
+++ b/t1.c
@@ -5,7 +5,7 @@ function(){
     context2;
     context3;
     context4;
-    will be edited;
+    was edited;
     context5;
     context6;
     context7;

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-11-27 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26  9:04 [PATCH] CODING_STYLE: explicitly call out label indentation Jan Beulich
2018-11-27 15:23 ` Wei Liu
2018-11-27 15:40   ` Jan Beulich
2018-11-27 16:22     ` Ian Jackson [this message]
2018-11-27 16:48       ` Andrew Cooper
2018-11-27 17:09         ` George Dunlap
2018-11-27 17:17           ` Jan Beulich

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=23549.28476.853916.355490@mariner.uk.xensource.com \
    --to=ian.jackson@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.
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.