The current emacs21 and xemacs21 switches to diff-mode when we open *.patch files. But I fell into the trap hidden in the current diff-mode behavior over one hour.
When I opened the patch file (filename: debian/patches/linux-types-and-time.patch in linux-kernel-headers package), the file was as follows:
--- include.orig/linux/time.h 2005-04-21 09:03:16.000000000 +0900
+++ include/linux/time.h 2005-05-04 15:29:52.266871616 +0900
@@ -1,6 +1,10 @@
#ifndef _LINUX_TIME_H
...
#ifdef __KERNEL__
=> @@ -177,5 +181,6 @@ struct itimerval {
#define TIMER_ABSTIME 0x01
...
#endif
--- include.orig/linux/types.h 2005-04-21 09:03:16.000000000 +0900
+++ include/linux/types.h 2005-05-04 15:30:14.515900970 +0900
@@ -1,6 +1,16 @@
#ifndef _LINUX_TYPES_H
...
=> @@ -169,4 +179,6 @@
char f_fpack[6];
};
Then, I just exchanged the order of two parts as follows:
--- include.orig/linux/types.h 2005-04-21 09:03:16.000000000 +0900
+++ include/linux/types.h 2005-05-04 15:30:14.515900970 +0900
@@ -1,6 +1,16 @@
#ifndef _LINUX_TYPES_H
...
#include
=> @@ -169,5 +179,7 @@
char f_fpack[6];
};
--- include.orig/linux/time.h 2005-04-21 09:03:16.000000000 +0900
+++ include/linux/time.h 2005-05-04 15:29:52.266871616 +0900
@@ -1,6 +1,10 @@
#ifndef _LINUX_TIME_H
...
+
#ifdef __KERNEL__
=> @@ -177,6 +181,7 @@ struct itimerval {
#define TIMER_ABSTIME 0x01
...
@@ lines are suddenly modified without any editing for patch lines.
This behavior is crazy.
I submitted the bug report to
Bug#201816
and
Bug#307617.
I think either this problem should be fixed or emacs should provide
the variable to stop @@ line modification via "setq" and so on.
I just installed blosxom for my blog.
I usually use my diary at
gotom diary, but
I heard from someone that blosxom is more suitable for planet.debian.net articles
compared with HNS.
I was requested to write this blog from my colleague, Guillaume Bisch -
I guess he'll look at my blog in April after he returns to Switzerland.
I usually wrote my diary in Japanese - but in this blog I'll write all articles in English.
Today, I worked for debian glibc 2.3.2.ds1-21 <=> 2.3.4-3 upgrade/downgrade path. It works nicely for me, but it needs more review. I shall write this interesting problem someday.
