GNU bug report logs - #20969
f90-indent-subprogram indents incorrectly when the buffer includes type, extend(...)

Previous Next

Package: emacs;

Reported by: Zach Jibben <threeofsix <at> gmail.com>

Date: Thu, 2 Jul 2015 22:48:02 UTC

Severity: normal

Merged with 20680

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.org>

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 20969 in the body.
You can then email your comments to 20969 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#20969; Package emacs. (Thu, 02 Jul 2015 22:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zach Jibben <threeofsix <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 02 Jul 2015 22:48:02 GMT) Full text and rfc822 format available.

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

From: Zach Jibben <threeofsix <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: f90-indent-subprogram indents incorrectly when the buffer includes
 type, extend(...)
Date: Thu, 2 Jul 2015 16:36:24 -0600
[Message part 1 (text/plain, inline)]
From: Zach Jibben <threeofsix <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; f90-indent-subprogram indents incorrectly when the buffer
includes type, extend(...)
--text follows this line--

When indenting an entire f90 buffer that contains an extended type, the
indentation comes out incorrectly. Steps to reproduce:

1. Start Emacs with `emacs -Q'
2. Enter a program. A simple example:
program example

  type :: e1
     real :: a
  end type e1

  type, extends(e1) :: e2
     real :: b
  end type e2

end program
3. Automatically indent, either with C-M-q or C-x h C-M-\. The result
is:
program example

  type :: e1
     real :: a
  end type e1

  type, extends(e1) :: e2
  real :: b
end type e2

end program

f90-indent-subprogram should not have changed anything from the input in
this case. Indenting with tabs, manually, line-by-line, works correctly.

In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12)
 of 2015-05-07 on buildvm-08.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11603000
System Description:    Fedora release 21 (Twenty One)

Configured using:
 `configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: F90

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set [2 times]
Indenting program example...
END type does not match program.
Indenting program example...done
Making completion list...

Auto-saving...
Mark set
Making completion list...

Load-path shadows:
None found.

Features:
(vc-dispatcher vc-svn f90 cus-edit cus-start cus-load wid-edit
cl-loaddefs cl-lib pp shadow sort gnus-util mail-extr emacsbug message
format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu
time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind gfilenotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 97280 16204)
 (symbols 48 19736 0)
 (miscs 40 82 439)
 (strings 32 15108 5600)
 (string-bytes 1 428069)
 (vectors 16 11237)
 (vector-slots 8 404101 10431)
 (floats 8 77 461)
 (intervals 56 696 238)
 (buffers 960 16)
 (heap 1024 37362 1031))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20969; Package emacs. (Thu, 02 Jul 2015 23:06:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Zach Jibben <threeofsix <at> gmail.com>
Cc: 20969 <at> debbugs.gnu.org
Subject: Re: bug#20969: f90-indent-subprogram indents incorrectly when the
 buffer includes type, extend(...)
Date: Thu, 02 Jul 2015 18:56:15 -0400
Zach Jibben wrote:

> f90-indent-subprogram should not have changed anything from the input in
> this case. Indenting with tabs, manually, line-by-line, works correctly.
>
> In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12)


Thanks for the report.
This was previously reported as https://debbugs.gnu.org/20680 and is
already fixed in git for the next release.




Forcibly Merged 20680 20969. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 02 Jul 2015 23:06:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20969; Package emacs. (Fri, 03 Jul 2015 22:26:02 GMT) Full text and rfc822 format available.

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

From: Angelo Graziosi <angelo.graziosi <at> alice.it>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#20969: f90-indent-subprogram indents incorrectly when the
 buffer includes type, extend(...)
Date: Sat, 04 Jul 2015 00:25:04 +0200
Glenn Morris wrote:
> already fixed in git for the next release.

On which branch? master still have the bug...

Angelo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20969; Package emacs. (Sat, 04 Jul 2015 00:14:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Angelo Graziosi <angelo.graziosi <at> alice.it>
Cc: 20969 <at> debbugs.gnu.org
Subject: Re: bug#20969: f90-indent-subprogram indents incorrectly when the
 buffer includes type, extend(...)
Date: Fri, 03 Jul 2015 20:13:38 -0400
Works for me.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20969; Package emacs. (Sat, 04 Jul 2015 08:27:02 GMT) Full text and rfc822 format available.

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

From: Angelo Graziosi <angelo.graziosi <at> alice.it>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 20969 <at> debbugs.gnu.org
Subject: Re: bug#20969: f90-indent-subprogram indents incorrectly when the
 buffer includes type, extend(...)
Date: Sat, 04 Jul 2015 10:26:37 +0200
[Message part 1 (text/plain, inline)]
Il 04/07/2015 02:13, Glenn Morris ha scritto:
>
> Works for me.
>

Hmm... indeed the Zach example works.. but try with the attached test 
case.. It comes with the right formatting.. Select, now, from 'module' 
to 'end module', then press TAB.. The formatting becomes totally broken.

Now, remove, from the original foo.f90, the text ', extends(Shape),' 
(after "type" keyword), and repeat (select from 'module' to 'end 
module', then press TAB..). The formatting is not changed! it remans 
unbroken..

So, the 'extends' keyword, in some manner, breaks the formatting.

Angelo
[foo.f90 (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20969; Package emacs. (Mon, 06 Jul 2015 02:41:04 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Angelo Graziosi <angelo.graziosi <at> alice.it>
Cc: 20969 <at> debbugs.gnu.org
Subject: Re: bug#20969: f90-indent-subprogram indents incorrectly when the
 buffer includes type, extend(...)
Date: Sun, 05 Jul 2015 22:26:53 -0400
(It would have been better to make a new report.)

That was a separate issue, also now fixed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20969; Package emacs. (Mon, 06 Jul 2015 10:08:02 GMT) Full text and rfc822 format available.

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

From: Angelo Graziosi <angelo.graziosi <at> alice.it>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 20969 <at> debbugs.gnu.org
Subject: Re: bug#20969: f90-indent-subprogram indents incorrectly when the
 buffer includes type, extend(...)
Date: Mon, 06 Jul 2015 12:06:50 +0200
Il 06/07/2015 04:26, Glenn Morris ha scritto:
>
> (It would have been better to make a new report.)
>
> That was a separate issue, also now fixed.
>

Thanks for the quick fix.

Angelo




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

This bug report was last modified 8 years and 275 days ago.

Previous Next


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