* [Bug] in newcomment.el
@ 2013-06-18 17:08 Thorsten Jolitz
2013-06-18 17:13 ` Drew Adams
2013-06-18 17:31 ` Andreas Röhler
0 siblings, 2 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2013-06-18 17:08 UTC (permalink / raw)
To: help-gnu-emacs
Hi List,
newcomment.el uses (line 477)
,------------------------------------
| (if (looking-at comment-start-skip)
`------------------------------------
in function
,--------------------------------------------------------
| (defun comment-search-forward (limit &optional noerror)
`--------------------------------------------------------
what gives an error if `comment-start-skip' is nil, as in sql-mode.
E.g. this small file (sql-test.sql) in a buffer in sql-mode
,----------------------
| -- * data load
| -- ** data for table1
| drop table1;
`----------------------
with point at (point-min), causes an error when this command is applied:
,----------------------------------
| M-: (comment-search-forward 15 t)
`----------------------------------
,----------------------------------------------------------------
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
| looking-at(nil)
| comment-search-forward(15 t)
| eval((comment-search-forward 15 t) nil)
| eval-expression((comment-search-forward 15 t) nil)
| call-interactively(eval-expression nil nil)
`----------------------------------------------------------------
because 'C-h v comment-start-skip' gives
,-------------------------------------------------------------
| comment-start-skip is a variable defined in `newcomment.el'.
| Its value is nil
`-------------------------------------------------------------
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [Bug] in newcomment.el
2013-06-18 17:08 [Bug] in newcomment.el Thorsten Jolitz
@ 2013-06-18 17:13 ` Drew Adams
2013-06-18 17:30 ` Thorsten Jolitz
2013-06-18 17:31 ` Andreas Röhler
1 sibling, 1 reply; 7+ messages in thread
From: Drew Adams @ 2013-06-18 17:13 UTC (permalink / raw)
To: Thorsten Jolitz, help-gnu-emacs
If you think you have found a bug, use `M-x report-emacs-bug RET'.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug] in newcomment.el
2013-06-18 17:13 ` Drew Adams
@ 2013-06-18 17:30 ` Thorsten Jolitz
2013-06-18 17:46 ` Glenn Morris
0 siblings, 1 reply; 7+ messages in thread
From: Thorsten Jolitz @ 2013-06-18 17:30 UTC (permalink / raw)
To: help-gnu-emacs
Drew Adams <drew.adams@oracle.com> writes:
> If you think you have found a bug, use `M-x report-emacs-bug RET'.
ok, done.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug] in newcomment.el
2013-06-18 17:30 ` Thorsten Jolitz
@ 2013-06-18 17:46 ` Glenn Morris
2013-06-18 18:23 ` Thorsten Jolitz
2013-06-18 18:44 ` Drew Adams
0 siblings, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2013-06-18 17:46 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: help-gnu-emacs
Thorsten Jolitz wrote:
> ok, done.
A shame neither of the people prompting you to report bugs suggested
searching for existing reports first.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14376
With some familiar commenters.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug] in newcomment.el
2013-06-18 17:46 ` Glenn Morris
@ 2013-06-18 18:23 ` Thorsten Jolitz
2013-06-18 18:44 ` Drew Adams
1 sibling, 0 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2013-06-18 18:23 UTC (permalink / raw)
To: help-gnu-emacs
Glenn Morris <rgm@gnu.org> writes:
> Thorsten Jolitz wrote:
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14376
indeed, there it is ...
One question:
,---------------------------------------------------------
| You failed to call comment-normalize-vars before calling
| comment-search-forward.
`---------------------------------------------------------
do I have to call `comment-normalize-vars' each time I call a
(comment-...) function, or is
,-----------------------------------------------------
| (add-hook 'my-library-hook 'comment-normalize-vars')
`-----------------------------------------------------
enough?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [Bug] in newcomment.el
2013-06-18 17:46 ` Glenn Morris
2013-06-18 18:23 ` Thorsten Jolitz
@ 2013-06-18 18:44 ` Drew Adams
1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2013-06-18 18:44 UTC (permalink / raw)
To: Glenn Morris, Thorsten Jolitz; +Cc: help-gnu-emacs
> A shame neither of the people prompting you to report bugs suggested
> searching for existing reports first.
A minor bother, perhaps, but no shame.
The important thing is to get the (doc) bug fixed. If it takes another
bug report (and apparently it did in this case), so be it. But yes,
sure, if there already is a report (or two), then presumably no additional
reporting is needed. ;-)
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14376
>
> With some familiar commenters.
Including this clairvoyant comment from me ;-):
>> FWIW, a comment in the source code is hardly documentation for the
>> functions concerned. Doc strings...
>>
>> See also bug #12583... This will probably keep coming up
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> until there is some mention of it in the actual doc.
Thanks for documenting this now.
This thread has additional information/guidance about this issue:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12583
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug] in newcomment.el
2013-06-18 17:08 [Bug] in newcomment.el Thorsten Jolitz
2013-06-18 17:13 ` Drew Adams
@ 2013-06-18 17:31 ` Andreas Röhler
1 sibling, 0 replies; 7+ messages in thread
From: Andreas Röhler @ 2013-06-18 17:31 UTC (permalink / raw)
To: help-gnu-emacs
Am 18.06.2013 19:08, schrieb Thorsten Jolitz:
>
> Hi List,
>
> newcomment.el uses (line 477)
>
> ,------------------------------------
> | (if (looking-at comment-start-skip)
> `------------------------------------
>
> in function
>
> ,--------------------------------------------------------
> | (defun comment-search-forward (limit &optional noerror)
> `--------------------------------------------------------
>
> what gives an error if `comment-start-skip' is nil, as in sql-mode.
>
> E.g. this small file (sql-test.sql) in a buffer in sql-mode
>
> ,----------------------
> | -- * data load
> | -- ** data for table1
> | drop table1;
> `----------------------
>
> with point at (point-min), causes an error when this command is applied:
>
> ,----------------------------------
> | M-: (comment-search-forward 15 t)
> `----------------------------------
>
> ,----------------------------------------------------------------
> | Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> | looking-at(nil)
> | comment-search-forward(15 t)
> | eval((comment-search-forward 15 t) nil)
> | eval-expression((comment-search-forward 15 t) nil)
> | call-interactively(eval-expression nil nil)
> `----------------------------------------------------------------
>
> because 'C-h v comment-start-skip' gives
>
> ,-------------------------------------------------------------
> | comment-start-skip is a variable defined in `newcomment.el'.
> | Its value is nil
> `-------------------------------------------------------------
>
Looking forward for a bug-report too. `comment-start' should do a better job at this place.
Andreas
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-06-18 18:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 17:08 [Bug] in newcomment.el Thorsten Jolitz
2013-06-18 17:13 ` Drew Adams
2013-06-18 17:30 ` Thorsten Jolitz
2013-06-18 17:46 ` Glenn Morris
2013-06-18 18:23 ` Thorsten Jolitz
2013-06-18 18:44 ` Drew Adams
2013-06-18 17:31 ` Andreas Röhler
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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.