GNU bug report logs - #14402
f90-mode broken in multiple ways by trunk r112519

Previous Next

Package: emacs;

Reported by: Angelo Graziosi <angelo.graziosi <at> alice.it>

Date: Tue, 14 May 2013 17:38:01 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14402 in the body.
You can then email your comments to 14402 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14402; Package emacs. (Tue, 14 May 2013 17:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Angelo Graziosi <angelo.graziosi <at> alice.it>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 14 May 2013 17:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Angelo Graziosi <angelo.graziosi <at> alice.it>
To: bug-emacs <bug-gnu-emacs <at> gnu.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Imenu does not work any more on trunk
Date: Tue, 14 May 2013 19:36:37 +0200
The trunk revision #112579 shows an issue *very* similar to that 
described in bug #9199 [*]: same way to reproduce it, same result.

In my ~/.emacs.d/init.el I have something like this:

;; c-mode
(add-hook 'c-mode-hook
	  '(lambda()
	     ;; No indent for open bracket
	     (c-set-offset 'substatement-open 0)

	     ;; Add index of func. to menu bar
	     (imenu-add-to-menubar "Functions")
	     )
	  )

[...]

;; f90-mode
(add-hook 'f90-mode-hook
	  '(lambda()
	     ;; Add index of func. to menu bar
	     (imenu-add-to-menubar "Program-Units")
	     )
	  )

[...]

(setq imenu-auto-rescan t)
(setq imenu-auto-rescan-maxout 500000)

[...]

This time the issue shows up also in other programming modes. The Emacs 
buffer displays this error message:

Error in menu-bar-update-hook (imenu-update-menubar): 
(wrong-type-argument stringp ("Types" f90-imenu-type-matcher 1))

This issue is not shown by rev. 112494 I have build on May 07, 2013.


Ciao,
  Angelo.


---
[*] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9199




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14402; Package emacs. (Tue, 14 May 2013 19:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 14402 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Angelo Graziosi <angelo.graziosi <at> alice.it>
Cc: 14402 <at> debbugs.gnu.org
Subject: Re: bug#14402: Imenu does not work any more on trunk
Date: Tue, 14 May 2013 15:30:05 -0400
Angelo Graziosi wrote:

> ;; f90-mode
> (add-hook 'f90-mode-hook
> 	  '(lambda()
> 	     ;; Add index of func. to menu bar
> 	     (imenu-add-to-menubar "Program-Units")
> 	     )
> 	  )
[...]
> Error in menu-bar-update-hook (imenu-update-menubar):
> (wrong-type-argument stringp ("Types" f90-imenu-type-matcher 1))

Fixed.
Any other modes, you will have to report the details.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14402; Package emacs. (Tue, 14 May 2013 20:22:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Angelo Graziosi <angelo.graziosi <at> alice.it>
To: Glenn Morris <rgm <at> gnu.org>
Cc: bug-emacs <bug-gnu-emacs <at> gnu.org>
Subject: Re: bug#14402: Imenu does not work any more on trunk
Date: Tue, 14 May 2013 22:21:32 +0200
Ciao Glenn,

Il 14/05/2013 21.30, Glenn Morris ha scritto:
> Angelo Graziosi wrote:
>
>> ;; f90-mode
>> (add-hook 'f90-mode-hook
>> 	  '(lambda()
>> 	     ;; Add index of func. to menu bar
>> 	     (imenu-add-to-menubar "Program-Units")
>> 	     )
>> 	  )
> [...]
>> Error in menu-bar-update-hook (imenu-update-menubar):
>> (wrong-type-argument stringp ("Types" f90-imenu-type-matcher 1))
>
> Fixed.

Many thanks for the quick fix... :-)

> Any other modes, you will have to report the details.
>

I can't reproduce the issue any more. I have tested with .f90, .f, 
Makefile, .tex, .sh, C/C++. :)


Ciao,
 Angelo.





bug closed, send any further explanations to 14402 <at> debbugs.gnu.org and Angelo Graziosi <angelo.graziosi <at> alice.it> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 May 2013 20:35:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14402; Package emacs. (Tue, 14 May 2013 21:54:01 GMT) Full text and rfc822 format available.

Message #16 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Angelo Graziosi <angelo.graziosi <at> alice.it>
To: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#14402: Imenu does not work any more on trunk
Date: Tue, 14 May 2013 23:49:33 +0200
Package: emacs

Glenn,

now I am seeing another issue and don't know if related to this fix.

In short, F90 mode seems to have lost the completion linked to "end".

More precisely,

$ emacs -Q &

C-x C-f foo.f90 RET

program foo
end<TAB>


it should complete in "end program foo" instead it stays to "end". "end" 
is only indented,

program foo
  end

I need to type "end program<TAB>", to have the right behavior...


The same occurs with other statements, if-then, do..


 Ciao,
  Angelo.


Il 14/05/2013 22.21, Angelo Graziosi ha scritto:
> Ciao Glenn,
>
> Il 14/05/2013 21.30, Glenn Morris ha scritto:
>> Angelo Graziosi wrote:
>>
>>> ;; f90-mode
>>> (add-hook 'f90-mode-hook
>>>       '(lambda()
>>>          ;; Add index of func. to menu bar
>>>          (imenu-add-to-menubar "Program-Units")
>>>          )
>>>       )
>> [...]
>>> Error in menu-bar-update-hook (imenu-update-menubar):
>>> (wrong-type-argument stringp ("Types" f90-imenu-type-matcher 1))
>>
>> Fixed.
>
> Many thanks for the quick fix... :-)
>
>> Any other modes, you will have to report the details.
>>
>
> I can't reproduce the issue any more. I have tested with .f90, .f,
> Makefile, .tex, .sh, C/C++. :)
>
>
> Ciao,
>   Angelo.
>





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14402; Package emacs. (Tue, 14 May 2013 22:07:02 GMT) Full text and rfc822 format available.

Message #19 received at 14402 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Angelo Graziosi <angelo.graziosi <at> alice.it>
Cc: 14402 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#14402: Imenu does not work any more on trunk
Date: Tue, 14 May 2013 18:06:50 -0400
(Please keep the debbugs address cc'd.)

Angelo Graziosi wrote:

> now I am seeing another issue and don't know if related to this fix.
>
> In short, F90 mode seems to have lost the completion linked to "end".
>
> More precisely,
>
> $ emacs -Q &
>
> C-x C-f foo.f90 RET
>
> program foo
> end<TAB>
>
>
> it should complete in "end program foo" instead it stays to "end".
> "end" is only indented,

This is all breakage from r112519.
Specifically, f90-looking-at-program-block-end is broken (and who knows
what else).
I don't feel like sorting through all this to figure it out.




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 14 May 2013 22:10:01 GMT) Full text and rfc822 format available.

Changed bug title to 'f90-mode broken in multiple ways by trunk r112519' from 'Imenu does not work any more on trunk' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 May 2013 22:10:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14402; Package emacs. (Tue, 14 May 2013 22:37:01 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Angelo Graziosi <angelo.graziosi <at> alice.it>
To: Glenn Morris <rgm <at> gnu.org>
Cc: bug-emacs <bug-gnu-emacs <at> gnu.org>,
	Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#14402: Imenu does not work any more on trunk
Date: Wed, 15 May 2013 00:35:42 +0200
Il 15/05/2013 0.06, Glenn Morris ha scritto:
>
> (Please keep the debbugs address cc'd.)
>
> Angelo Graziosi wrote:
>
>> now I am seeing another issue and don't know if related to this fix.
>>
>> In short, F90 mode seems to have lost the completion linked to "end".
>>
>> More precisely,
>>
>> $ emacs -Q &
>>
>> C-x C-f foo.f90 RET
>>
>> program foo
>> end<TAB>
>>
>>
>> it should complete in "end program foo" instead it stays to "end".
>> "end" is only indented,
>
> This is all breakage from r112519.
> Specifically, f90-looking-at-program-block-end is broken (and who knows
> what else).
> I don't feel like sorting through all this to figure it out.
>

Just a curiosity... :) who did this?

f90-mode is practically unusable from point of view of completion...


In any case, thank for your time.

Ciao,
 Angelo.

Oops... should we open a bug report?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14402; Package emacs. (Tue, 14 May 2013 22:40:03 GMT) Full text and rfc822 format available.

Message #29 received at 14402 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 14402 <at> debbugs.gnu.org, Angelo Graziosi <angelo.graziosi <at> alice.it>
Subject: Re: bug#14402: Imenu does not work any more on trunk
Date: Tue, 14 May 2013 18:39:28 -0400
>> $ emacs -Q &
>> 
>> C-x C-f foo.f90 RET
>> 
>> program foo
>> end<TAB>
>> 
>> it should complete in "end program foo" instead it stays to "end".
>> "end" is only indented,

> This is all breakage from r112519.
> Specifically, f90-looking-at-program-block-end is broken (and who knows
> what else).
> I don't feel like sorting through all this to figure it out.

Thanks, I'll take a look,


        Stefan




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Wed, 15 May 2013 00:54:02 GMT) Full text and rfc822 format available.

Notification sent to Angelo Graziosi <angelo.graziosi <at> alice.it>:
bug acknowledged by developer. (Wed, 15 May 2013 00:54:02 GMT) Full text and rfc822 format available.

Message #34 received at 14402-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 14402-done <at> debbugs.gnu.org, Angelo Graziosi <angelo.graziosi <at> alice.it>
Subject: Re: bug#14402: Imenu does not work any more on trunk
Date: Tue, 14 May 2013 20:53:20 -0400
>> C-x C-f foo.f90 RET
>> program foo
>> end<TAB>
>> it should complete in "end program foo" instead it stays to "end".
>> "end" is only indented,

I just installed the patch below which seems to fix this.

> This is all breakage from r112519.
> Specifically, f90-looking-at-program-block-end is broken (and who knows
> what else).

Interestingly, the bug was caused by the fact that the old code relied
on a bug in the handling of the \> regexp: more specifically \> treated
(string-match "ab\\>?" foo) as (string-match "a\\(?:b\\>\\)?" foo)
instead of the expected (string-match "ab\\(?:\\>\\)?" foo).


        Stefan


=== modified file 'lisp/progmodes/f90.el'
--- lisp/progmodes/f90.el	2013-05-14 19:29:35 +0000
+++ lisp/progmodes/f90.el	2013-05-15 00:40:06 +0000
@@ -842,14 +842,14 @@
 
 ;; Regexps for finding program structures.
 (defconst f90-blocks-re
-  (concat "\\(block[ \t]*data\\|"
+  (concat "\\(\\(?:block[ \t]*data\\|"
           (regexp-opt '("do" "if" "interface" "function" "module" "program"
                         "select" "subroutine" "type" "where" "forall"
                         ;; F2003.
                         "enum" "associate"
                         ;; F2008.
                         "submodule" "block" "critical"))
-          "\\)\\_>")
+          "\\)\\_>\\)")
   "Regexp potentially indicating a \"block\" of F90 code.")
 
 (defconst f90-program-block-re




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Jun 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.