unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3921: 23.1.50; checkdoc allow uncapitalized info node links
@ 2009-07-24 23:00 ` Kevin Ryde
  2009-10-23 17:35   ` bug#3921: marked as done (23.1.50; checkdoc allow uncapitalized info node links) Emacs bug Tracking System
  2009-10-27 23:10   ` Emacs bug Tracking System
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Ryde @ 2009-07-24 23:00 UTC (permalink / raw)
  To: emacs-pretest-bug

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

M-x checkdoc on the file foo.el below complains

    Name emacs should appear capitalized as Emacs (C-h,f,e,n,p,q)

at the `(emacs)' info link.  I hoped it would recognise that has to be
left as-is, since it must follow the target document's name and nodes.

Perhaps the following, dragging in help-mode.el for a definitive regexp,
and using thingatpt.el just because it's a convenient way to match
surrounding point.

2009-07-25  Kevin Ryde  <user42@zip.com.au>

	* emacs-lisp/checkdoc.el (checkdoc-proper-noun-region-engine): Allow
	uncapitalized in info node hyperlinks.


[-- Attachment #2: foo.el --]
[-- Type: application/emacs-lisp, Size: 187 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: checkdoc.el.info-link.diff --]
[-- Type: text/x-diff, Size: 1232 bytes --]

*** checkdoc.el	23 Jul 2009 07:41:51 +1000	1.72
--- checkdoc.el	25 Jul 2009 08:53:18 +1000	
***************
*** 173,178 ****
--- 173,181 ----
  (defvar checkdoc-version "0.6.1"
    "Release version of checkdoc you are currently running.")
  
+ (require 'help-mode) ;; for help-xref-info-regexp
+ (require 'thingatpt) ;; for handy thing-at-point-looking-at
+ 
  (defvar compilation-error-regexp-alist)
  (defvar compilation-mode-font-lock-keywords)
  
***************
*** 2003,2009 ****
  			 ;; surrounded by /, as in a URL or filename: /emacs/
  			 (not (and (= ?/ (char-after e))
  				   (= ?/ (char-before b))))
! 			 (not (checkdoc-in-example-string-p begin end)))
  		    (if (checkdoc-autofix-ask-replace
  			 b e (format "Text %s should be capitalized.  Fix? "
  				     text)
--- 2006,2015 ----
  			 ;; surrounded by /, as in a URL or filename: /emacs/
  			 (not (and (= ?/ (char-after e))
  				   (= ?/ (char-before b))))
! 			 (not (checkdoc-in-example-string-p begin end))
! 			 ;; "Info node `(emacs)Commands'" etc is ok
! 			 (not (thing-at-point-looking-at
! 			       help-xref-info-regexp)))
  		    (if (checkdoc-autofix-ask-replace
  			 b e (format "Text %s should be capitalized.  Fix? "
  				     text)

[-- Attachment #4: Type: text/plain, Size: 535 bytes --]


In GNU Emacs 23.1.50.4 (i586-pc-linux-gnu, GTK+ Version 2.16.4)
 of 2009-07-24 on blah.blah
configured using `configure  'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default-enable-multibyte-characters: t

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3921: marked as done (23.1.50; checkdoc allow uncapitalized info node links)
  2009-07-24 23:00 ` bug#3921: 23.1.50; checkdoc allow uncapitalized info node links Kevin Ryde
@ 2009-10-23 17:35   ` Emacs bug Tracking System
  2009-10-27 23:10   ` Emacs bug Tracking System
  1 sibling, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2009-10-23 17:35 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 896 bytes --]

Your message dated Fri, 23 Oct 2009 13:27:58 -0400
with message-id <87hbtq81gh.fsf@stupidchicken.com>
and subject line Re: 23.1.50; checkdoc allow uncapitalized info node links
has caused the Emacs bug report #3921,
regarding 23.1.50; checkdoc allow uncapitalized info node links
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3921: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3921
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 5413 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 575 bytes --]

M-x checkdoc on the file foo.el below complains

    Name emacs should appear capitalized as Emacs (C-h,f,e,n,p,q)

at the `(emacs)' info link.  I hoped it would recognise that has to be
left as-is, since it must follow the target document's name and nodes.

Perhaps the following, dragging in help-mode.el for a definitive regexp,
and using thingatpt.el just because it's a convenient way to match
surrounding point.

2009-07-25  Kevin Ryde  <user42@zip.com.au>

	* emacs-lisp/checkdoc.el (checkdoc-proper-noun-region-engine): Allow
	uncapitalized in info node hyperlinks.


[-- Attachment #2.1.2: foo.el --]
[-- Type: application/emacs-lisp, Size: 187 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.3: checkdoc.el.info-link.diff --]
[-- Type: text/x-diff, Size: 1232 bytes --]

*** checkdoc.el	23 Jul 2009 07:41:51 +1000	1.72
--- checkdoc.el	25 Jul 2009 08:53:18 +1000	
***************
*** 173,178 ****
--- 173,181 ----
  (defvar checkdoc-version "0.6.1"
    "Release version of checkdoc you are currently running.")
  
+ (require 'help-mode) ;; for help-xref-info-regexp
+ (require 'thingatpt) ;; for handy thing-at-point-looking-at
+ 
  (defvar compilation-error-regexp-alist)
  (defvar compilation-mode-font-lock-keywords)
  
***************
*** 2003,2009 ****
  			 ;; surrounded by /, as in a URL or filename: /emacs/
  			 (not (and (= ?/ (char-after e))
  				   (= ?/ (char-before b))))
! 			 (not (checkdoc-in-example-string-p begin end)))
  		    (if (checkdoc-autofix-ask-replace
  			 b e (format "Text %s should be capitalized.  Fix? "
  				     text)
--- 2006,2015 ----
  			 ;; surrounded by /, as in a URL or filename: /emacs/
  			 (not (and (= ?/ (char-after e))
  				   (= ?/ (char-before b))))
! 			 (not (checkdoc-in-example-string-p begin end))
! 			 ;; "Info node `(emacs)Commands'" etc is ok
! 			 (not (thing-at-point-looking-at
! 			       help-xref-info-regexp)))
  		    (if (checkdoc-autofix-ask-replace
  			 b e (format "Text %s should be capitalized.  Fix? "
  				     text)

[-- Attachment #2.1.4: Type: text/plain, Size: 535 bytes --]


In GNU Emacs 23.1.50.4 (i586-pc-linux-gnu, GTK+ Version 2.16.4)
 of 2009-07-24 on blah.blah
configured using `configure  'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default-enable-multibyte-characters: t

[-- Attachment #3: Type: message/rfc822, Size: 1939 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: Kevin Ryde <user42@zip.com.au>
Cc: 3921-done@emacsbugs.donarmstrong.com
Subject: Re: 23.1.50; checkdoc allow uncapitalized info node links
Date: Fri, 23 Oct 2009 13:27:58 -0400
Message-ID: <87hbtq81gh.fsf@stupidchicken.com>

> M-x checkdoc on the file foo.el below complains
>
>     Name emacs should appear capitalized as Emacs (C-h,f,e,n,p,q)
>
> at the `(emacs)' info link.  I hoped it would recognise that has to be
> left as-is, since it must follow the target document's name and nodes.
>
> Perhaps the following, dragging in help-mode.el for a definitive regexp,
> and using thingatpt.el just because it's a convenient way to match
> surrounding point.

I checked in a slightly different fix.  Thanks for the bug report.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3921: 23.1.50; checkdoc allow uncapitalized info node links
       [not found] <87hbtq81gh.fsf@stupidchicken.com>
  2009-07-24 23:00 ` bug#3921: 23.1.50; checkdoc allow uncapitalized info node links Kevin Ryde
@ 2009-10-24 23:38 ` Kevin Ryde
  2009-10-24 23:45   ` Processed: " Emacs bug Tracking System
  2009-10-25  1:02   ` bug#3921: " Stefan Monnier
  1 sibling, 2 replies; 6+ messages in thread
From: Kevin Ryde @ 2009-10-24 23:38 UTC (permalink / raw)
  To: 3921, control; +Cc: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

reopen 3921
thanks

Chong Yidong <cyd@stupidchicken.com> writes:
>
> I checked in a slightly different fix.

Reopening as I believe the looking-back limit prevents line-wrapped
links working, like the foo.el below.

But why not help-xref-info-regexp?  Less code, no duplication of
patterns.  For a lisp tool there's no need to hold back on what
libraries are loaded -- in fact letting someone else do the work is a
very good thing! :-)

(The worst duplication I struck lately was a while ago in info.el when
digging around some node names.  I recall unlovely duplication of
patterns, making life hard if looking to tighten or loosen.)


I thought of the URL links only afterwards, and didn't do anything about
it.  help-xref-url-regexp would again seem good as an authoritative
pattern.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: checkdoc.el.info-link-2.diff --]
[-- Type: text/x-diff, Size: 1050 bytes --]

--- checkdoc.el.~1.78.~	2009-10-25 08:57:10.000000000 +1100
+++ checkdoc.el	2009-10-25 10:05:53.000000000 +1100
@@ -173,6 +173,9 @@
 (defvar checkdoc-version "0.6.1"
   "Release version of checkdoc you are currently running.")
 
+(require 'help-mode) ;; for help-xref-info-regexp
+(require 'thingatpt) ;; for handy thing-at-point-looking-at
+
 (defvar compilation-error-regexp-alist)
 (defvar compilation-mode-font-lock-keywords)
 
@@ -2017,11 +2020,11 @@
 			 (not (and (= ?/ (char-after e))
 				   (= ?/ (char-before b))))
 			 (not (checkdoc-in-example-string-p begin end))
-			 ;; info node
-			 (not (save-excursion
-				(goto-char b)
-				(looking-back "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+`("
-					      (line-beginning-position)))))
+			 ;; info or url links left alone
+ 			 (not (thing-at-point-looking-at
+ 			       help-xref-info-regexp))
+			 (not (thing-at-point-looking-at
+ 			       help-xref-url-regexp)))
 		    (if (checkdoc-autofix-ask-replace
 			 b e (format "Text %s should be capitalized.  Fix? "
 				     text)

[-- Attachment #3: foo.el --]
[-- Type: application/emacs-lisp, Size: 245 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Processed: Re: 23.1.50; checkdoc allow uncapitalized info node links
  2009-10-24 23:38 ` bug#3921: 23.1.50; checkdoc allow uncapitalized info node links Kevin Ryde
@ 2009-10-24 23:45   ` Emacs bug Tracking System
  2009-10-25  1:02   ` bug#3921: " Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2009-10-24 23:45 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: Emacs Bugs

Processing commands for control@emacsbugs.donarmstrong.com:

> reopen 3921
Bug #3921 {Done: Chong Yidong <cyd@stupidchicken.com>} [emacs] 23.1.50; checkdoc allow uncapitalized info node links
> thanks
Stopping processing here.

Please contact me if you need assistance.

Don Armstrong
(administrator, Emacs bugs database)




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3921: 23.1.50; checkdoc allow uncapitalized info node links
  2009-10-24 23:38 ` bug#3921: 23.1.50; checkdoc allow uncapitalized info node links Kevin Ryde
  2009-10-24 23:45   ` Processed: " Emacs bug Tracking System
@ 2009-10-25  1:02   ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2009-10-25  1:02 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: Chong Yidong, 3921, control

> @@ -2017,11 +2020,11 @@
>  			 (not (and (= ?/ (char-after e))
>  				   (= ?/ (char-before b))))
>  			 (not (checkdoc-in-example-string-p begin end))
> -			 ;; info node
> -			 (not (save-excursion
> -				(goto-char b)
> -				(looking-back "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+`("
> -					      (line-beginning-position)))))
> +			 ;; info or url links left alone
> + 			 (not (thing-at-point-looking-at
> + 			       help-xref-info-regexp))
> +			 (not (thing-at-point-looking-at
> + 			       help-xref-url-regexp)))
>  		    (if (checkdoc-autofix-ask-replace
>  			 b e (format "Text %s should be capitalized.  Fix? "
>  				     text)

Looks good,


        Stefan





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3921: marked as done (23.1.50; checkdoc allow uncapitalized info node links)
  2009-07-24 23:00 ` bug#3921: 23.1.50; checkdoc allow uncapitalized info node links Kevin Ryde
  2009-10-23 17:35   ` bug#3921: marked as done (23.1.50; checkdoc allow uncapitalized info node links) Emacs bug Tracking System
@ 2009-10-27 23:10   ` Emacs bug Tracking System
  1 sibling, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2009-10-27 23:10 UTC (permalink / raw)
  To: Kevin Ryde

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

Your message dated Wed, 28 Oct 2009 10:01:48 +1100
with message-id <87skd4qw4j.fsf@blah.blah>
and subject line Re: bug#3921: 23.1.50; checkdoc allow uncapitalized info node links
has caused the Emacs bug report #3921,
regarding 23.1.50; checkdoc allow uncapitalized info node links
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3921: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3921
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 5413 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 575 bytes --]

M-x checkdoc on the file foo.el below complains

    Name emacs should appear capitalized as Emacs (C-h,f,e,n,p,q)

at the `(emacs)' info link.  I hoped it would recognise that has to be
left as-is, since it must follow the target document's name and nodes.

Perhaps the following, dragging in help-mode.el for a definitive regexp,
and using thingatpt.el just because it's a convenient way to match
surrounding point.

2009-07-25  Kevin Ryde  <user42@zip.com.au>

	* emacs-lisp/checkdoc.el (checkdoc-proper-noun-region-engine): Allow
	uncapitalized in info node hyperlinks.


[-- Attachment #2.1.2: foo.el --]
[-- Type: application/emacs-lisp, Size: 187 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.3: checkdoc.el.info-link.diff --]
[-- Type: text/x-diff, Size: 1232 bytes --]

*** checkdoc.el	23 Jul 2009 07:41:51 +1000	1.72
--- checkdoc.el	25 Jul 2009 08:53:18 +1000	
***************
*** 173,178 ****
--- 173,181 ----
  (defvar checkdoc-version "0.6.1"
    "Release version of checkdoc you are currently running.")
  
+ (require 'help-mode) ;; for help-xref-info-regexp
+ (require 'thingatpt) ;; for handy thing-at-point-looking-at
+ 
  (defvar compilation-error-regexp-alist)
  (defvar compilation-mode-font-lock-keywords)
  
***************
*** 2003,2009 ****
  			 ;; surrounded by /, as in a URL or filename: /emacs/
  			 (not (and (= ?/ (char-after e))
  				   (= ?/ (char-before b))))
! 			 (not (checkdoc-in-example-string-p begin end)))
  		    (if (checkdoc-autofix-ask-replace
  			 b e (format "Text %s should be capitalized.  Fix? "
  				     text)
--- 2006,2015 ----
  			 ;; surrounded by /, as in a URL or filename: /emacs/
  			 (not (and (= ?/ (char-after e))
  				   (= ?/ (char-before b))))
! 			 (not (checkdoc-in-example-string-p begin end))
! 			 ;; "Info node `(emacs)Commands'" etc is ok
! 			 (not (thing-at-point-looking-at
! 			       help-xref-info-regexp)))
  		    (if (checkdoc-autofix-ask-replace
  			 b e (format "Text %s should be capitalized.  Fix? "
  				     text)

[-- Attachment #2.1.4: Type: text/plain, Size: 535 bytes --]


In GNU Emacs 23.1.50.4 (i586-pc-linux-gnu, GTK+ Version 2.16.4)
 of 2009-07-24 on blah.blah
configured using `configure  'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default-enable-multibyte-characters: t

[-- Attachment #3: Type: message/rfc822, Size: 2035 bytes --]

From: Kevin Ryde <user42@zip.com.au>
To: 3921-done@emacsbugs.donarmstrong.com
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: bug#3921: 23.1.50; checkdoc allow uncapitalized info node links
Date: Wed, 28 Oct 2009 10:01:48 +1100
Message-ID: <87skd4qw4j.fsf@blah.blah>

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> Looks good,

I checked it in.

(And leaving the /emacs/ bit alone, though it may be redundant with the
url-link regexp, as long as everyone uses URL `...' format.)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-10-27 23:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87hbtq81gh.fsf@stupidchicken.com>
2009-07-24 23:00 ` bug#3921: 23.1.50; checkdoc allow uncapitalized info node links Kevin Ryde
2009-10-23 17:35   ` bug#3921: marked as done (23.1.50; checkdoc allow uncapitalized info node links) Emacs bug Tracking System
2009-10-27 23:10   ` Emacs bug Tracking System
2009-10-24 23:38 ` bug#3921: 23.1.50; checkdoc allow uncapitalized info node links Kevin Ryde
2009-10-24 23:45   ` Processed: " Emacs bug Tracking System
2009-10-25  1:02   ` bug#3921: " Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).