{"thread":{"id":"14805","subject":"[PATCH] diff: chapter and part in funcname for tex","startedAt":"2008-08-02T06:35:45Z","lastAt":"2008-08-02T21:56:44Z","messageCount":4,"participants":["Giuseppe Bilotta","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"85968","messageId":"1217658945-29908-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"14805","inReplyTo":null,"subject":"[PATCH] diff: chapter and part in funcname for tex","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2008-08-02T06:35:45Z","receivedAt":"2008-08-02T06:35:45Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"This patch enhances the tex funcname by adding support for\nchapter and part sectioning commands. It also matches\nthe starred version of the sectioning commands.\n---\n\nI know that technically speaking this should have been two\nseparate patches because they are two logically separate\nchanges, but they are really rather braindead so please\naccept them as one :)\n\n diff.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex c253015..776bce1 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1380,7 +1380,7 @@ static struct builtin_funcname_pattern {\n \t\t\t\"^[ \t]*\\\\(\\\\([ \t]*\"\n \t\t\t\"[A-Za-z_][A-Za-z_0-9]*\\\\)\\\\{2,\\\\}\"\n \t\t\t\"[ \t]*([^;]*\\\\)$\" },\n-\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(sub\\\\)*section{.*\\\\)$\" },\n+\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(\\\\(sub\\\\)*section\\\\|chapter\\\\|part\\\\)\\\\*\\\\?{.*\\\\)$\" },\n \t{ \"ruby\", \"^\\\\s*\\\\(\\\\(class\\\\|module\\\\|def\\\\)\\\\s.*\\\\)$\" },\n };\n \n-- \n1.5.6.3\n"},{"id":"85977","messageId":"1217678145-2630-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"14805","inReplyTo":"1217658945-29908-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"[PATCH] diff: chapter and part in funcname for tex","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2008-08-02T11:55:45Z","receivedAt":"2008-08-02T11:55:45Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"This patch enhances the tex funcname by adding support for\nchapter and part sectioning commands. It also matches\nthe starred version of the sectioning commands.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n\n---\n\nResend, with Signed-off-by: line\n\n diff.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex c253015..776bce1 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1380,7 +1380,7 @@ static struct builtin_funcname_pattern {\n \t\t\t\"^[ \t]*\\\\(\\\\([ \t]*\"\n \t\t\t\"[A-Za-z_][A-Za-z_0-9]*\\\\)\\\\{2,\\\\}\"\n \t\t\t\"[ \t]*([^;]*\\\\)$\" },\n-\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(sub\\\\)*section{.*\\\\)$\" },\n+\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(\\\\(sub\\\\)*section\\\\|chapter\\\\|part\\\\)\\\\*\\\\?{.*\\\\)$\" },\n \t{ \"ruby\", \"^\\\\s*\\\\(\\\\(class\\\\|module\\\\|def\\\\)\\\\s.*\\\\)$\" },\n };\n \n-- \n1.5.6.3\n"},{"id":"85994","messageId":"7vprormh7a.fsf@gitster.siamese.dyndns.org","threadId":"14805","inReplyTo":"1217678145-2630-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"Re: [PATCH] diff: chapter and part in funcname for tex","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-02T17:59:05Z","receivedAt":"2008-08-02T17:59:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:\n\n> This patch enhances the tex funcname by adding support for\n> chapter and part sectioning commands. It also matches\n> the starred version of the sectioning commands.\n>\n> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n>\n> ---\n>\n> Resend, with Signed-off-by: line\n>\n>  diff.c |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/diff.c b/diff.c\n> index c253015..776bce1 100644\n> --- a/diff.c\n> +++ b/diff.c\n> @@ -1380,7 +1380,7 @@ static struct builtin_funcname_pattern {\n>  \t\t\t\"^[ \t]*\\\\(\\\\([ \t]*\"\n>  \t\t\t\"[A-Za-z_][A-Za-z_0-9]*\\\\)\\\\{2,\\\\}\"\n>  \t\t\t\"[ \t]*([^;]*\\\\)$\" },\n> -\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(sub\\\\)*section{.*\\\\)$\" },\n> +\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(\\\\(sub\\\\)*section\\\\|chapter\\\\|part\\\\)\\\\*\\\\?{.*\\\\)$\" },\n\nOk on idea, but NAK on implementation.\n\n\"A\\?\" to mean 0 or one \"A\" in BRE is GNU extention and we try to avoid it.\n\"A\\{0,1\\}\" is equivalent and we already use the bound notation in \"java\"\nsection, so perhaps this is an Ok replacement?\n\n\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(\\\\(sub\\\\)*section\\\\|chapter\\\\|part\\\\)\\\\*\\\\{0,1\\\\}{.*\\\\)$\" },\n"},{"id":"86024","messageId":"1217714204-12762-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"14805","inReplyTo":"7vprormh7a.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] diff: chapter and part in funcname for tex","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2008-08-02T21:56:44Z","receivedAt":"2008-08-02T21:56:44Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"This patch enhances the tex funcname by adding support for\nchapter and part sectioning commands. It also matches\nthe starred version of the sectioning commands.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n\nAs recommended by Junio, use \\{0,1\\} instead of \\?\n\n diff.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex c253015..776bce1 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1380,7 +1380,7 @@ static struct builtin_funcname_pattern {\n \t\t\t\"^[ \t]*\\\\(\\\\([ \t]*\"\n \t\t\t\"[A-Za-z_][A-Za-z_0-9]*\\\\)\\\\{2,\\\\}\"\n \t\t\t\"[ \t]*([^;]*\\\\)$\" },\n-\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(sub\\\\)*section{.*\\\\)$\" },\n+\t{ \"tex\", \"^\\\\(\\\\\\\\\\\\(\\\\(sub\\\\)*section\\\\|chapter\\\\|part\\\\)\\\\*\\\\{0,1\\\\}{.*\\\\)$\" },\n \t{ \"ruby\", \"^\\\\s*\\\\(\\\\(class\\\\|module\\\\|def\\\\)\\\\s.*\\\\)$\" },\n };\n \n-- \n1.5.6.3\n"}]}