unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8944: 23.3; Formatting of Labeled Constructs in Fortran
@ 2011-06-27 19:24 fkrogh
  2011-06-28  1:42 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: fkrogh @ 2011-06-27 19:24 UTC (permalink / raw)
  To: 8944

This is more a feature request than a bug report.
In Fortran you can have construct names on code blocks.  It would be best
if the construct names did not effect the indentation of code that
follows.

Thus

     An ordinary line indented like here.
Construct_Name: do i = 1, 10
       Next line indented as if the construct name were not there.
Another_Construct_name: do j = 1, 30
And_Yet_Another_name: do k = 1,8
           The next line starts like this
         end do Construct_Name
       end do Another_Construct_name
     end do And_Yet_Another_name

Although I've been told, it is awkward to implement, I would like to be
able to use continuation lines so that the indentation structure of the
code is more clear.  Thus the above might look like this

     An ordinary line indented like here.
Construct_Name:&
&    do i = 1, 10
       Next line indented as if the construct name were not there.
Another_Construct_name:&
&      do j = 1, 30
And_Yet_Another_name:&
&        do k = 1,8
           The next line starts like this
         end do Construct_Name
       end do Another_Construct_name
     end do And_Yet_Another_name

But the key point is that the location of the construct name should not
effect the formatting of the lines that follow.  By using really short
construct names the first form can be made to look not all that bad.


In GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.22.1)
 of 2011-03-10 on mon
Windowing system distributor `The X.Org Foundation', version 11.0.11002000
configured using `configure  '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../lib64' '--with-gameuser=games' '--without-hesiod' '--with-kerberos' '--with-kerberos5' '--with-gpm' '--with-dbus' '--with-sound' '--with-x' '--without-ns' '--without-gconf' '--without-toolkit-scroll-bars' '--without-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--without-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86
 _64-pc-linux-gnu' 'CFLAGS=-O2 -march=native -pipe -fno-strict-aliasing' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: C
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: C
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: F90

Minor modes in effect:
  recentf-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-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-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>

Recent messages:

Load-path shadows:
/usr/share/emacs/site-lisp/color-theme/color-theme hides /usr/share/emacs/site-lisp/my_old_color_theme_dir/color-theme
/usr/share/emacs/site-lisp/color-theme/themes/color-theme-library hides /usr/share/emacs/site-lisp/my_old_color_theme_dir/themes/color-theme-library
/usr/share/emacs/site-lisp/color-theme/themes/color-theme-example hides /usr/share/emacs/site-lisp/my_old_color_theme_dir/themes/color-theme-example
/usr/share/emacs/23.3/lisp/calc/calc-vec hides ~/system/emacs/calc-2.02f/calc-vec
/usr/share/emacs/23.3/lisp/calc/calc-lang hides ~/system/emacs/calc-2.02f/calc-lang
/usr/share/emacs/23.3/lisp/calc/calc-math hides ~/system/emacs/calc-2.02f/calc-math
/usr/share/emacs/23.3/lisp/calc/calc-embed hides ~/system/emacs/calc-2.02f/calc-embed
/usr/share/emacs/23.3/lisp/calc/calc-sel hides ~/system/emacs/calc-2.02f/calc-sel
/usr/share/emacs/23.3/lisp/calc/calc-yank hides ~/system/emacs/calc-2.02f/calc-yank
/usr/share/emacs/23.3/lisp/calc/calc-undo hides ~/system/emacs/calc-2.02f/calc-undo
/usr/share/emacs/23.3/lisp/calc/calc-units hides ~/system/emacs/calc-2.02f/calc-units
/usr/share/emacs/23.3/lisp/calc/calc-funcs hides ~/system/emacs/calc-2.02f/calc-funcs
/usr/share/emacs/23.3/lisp/calc/calc-stat hides ~/system/emacs/calc-2.02f/calc-stat
/usr/share/emacs/23.3/lisp/calc/calc-aent hides ~/system/emacs/calc-2.02f/calc-aent
/usr/share/emacs/23.3/lisp/calc/calc-misc hides ~/system/emacs/calc-2.02f/calc-misc
/usr/share/emacs/23.3/lisp/calc/calc-fin hides ~/system/emacs/calc-2.02f/calc-fin
/usr/share/emacs/23.3/lisp/calc/calc-forms hides ~/system/emacs/calc-2.02f/calc-forms
/usr/share/emacs/23.3/lisp/calc/calc-stuff hides ~/system/emacs/calc-2.02f/calc-stuff
/usr/share/emacs/23.3/lisp/calc/calc-poly hides ~/system/emacs/calc-2.02f/calc-poly
/usr/share/emacs/23.3/lisp/calc/calc-rewr hides ~/system/emacs/calc-2.02f/calc-rewr
/usr/share/emacs/23.3/lisp/calc/calc-keypd hides ~/system/emacs/calc-2.02f/calc-keypd
/usr/share/emacs/23.3/lisp/calc/calc-help hides ~/system/emacs/calc-2.02f/calc-help
/usr/share/emacs/23.3/lisp/calc/calc-prog hides ~/system/emacs/calc-2.02f/calc-prog
/usr/share/emacs/23.3/lisp/calc/calc-store hides ~/system/emacs/calc-2.02f/calc-store
/usr/share/emacs/23.3/lisp/calc/calc-bin hides ~/system/emacs/calc-2.02f/calc-bin
/usr/share/emacs/23.3/lisp/calc/calc-trail hides ~/system/emacs/calc-2.02f/calc-trail
/usr/share/emacs/23.3/lisp/calc/calc-mode hides ~/system/emacs/calc-2.02f/calc-mode
/usr/share/emacs/23.3/lisp/calc/calc-map hides ~/system/emacs/calc-2.02f/calc-map
/usr/share/emacs/23.3/lisp/calc/calc-cplx hides ~/system/emacs/calc-2.02f/calc-cplx
/usr/share/emacs/23.3/lisp/calc/calc-rules hides ~/system/emacs/calc-2.02f/calc-rules
/usr/share/emacs/23.3/lisp/calc/calc-graph hides ~/system/emacs/calc-2.02f/calc-graph
/usr/share/emacs/23.3/lisp/calc/calc hides ~/system/emacs/calc-2.02f/calc
/usr/share/emacs/23.3/lisp/calc/calc-alg hides ~/system/emacs/calc-2.02f/calc-alg
/usr/share/emacs/23.3/lisp/calc/calc-arith hides ~/system/emacs/calc-2.02f/calc-arith
/usr/share/emacs/23.3/lisp/calc/calc-macs hides ~/system/emacs/calc-2.02f/calc-macs
/usr/share/emacs/23.3/lisp/calc/calc-ext hides ~/system/emacs/calc-2.02f/calc-ext
/usr/share/emacs/23.3/lisp/calc/calc-comb hides ~/system/emacs/calc-2.02f/calc-comb
/usr/share/emacs/23.3/lisp/calc/calc-incom hides ~/system/emacs/calc-2.02f/calc-incom
/usr/share/emacs/23.3/lisp/calc/calc-frac hides ~/system/emacs/calc-2.02f/calc-frac

Features:
(shadow sort mail-extr message idna sendmail ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils mailheader canlock sha1
hex-util hashcash mail-utils warnings emacsbug color-theme cl cl-19
ps-bdf ps-mule ps-print ps-def lpr fortran f90 cus-edit cus-start
cus-load recentf tree-widget wid-edit cc-mode cc-fonts easymenu cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt pc-bufsw
uniquify advice help-fns advice-preload bm-ext bm scroll-in-place paren
site-gentoo preview-latex tex-site auto-loads tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
gtk x-toolkit x multi-tty emacs)





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

* bug#8944: 23.3; Formatting of Labeled Constructs in Fortran
  2011-06-27 19:24 bug#8944: 23.3; Formatting of Labeled Constructs in Fortran fkrogh
@ 2011-06-28  1:42 ` Glenn Morris
       [not found]   ` <4E095C50.9090101@mathalacarte.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2011-06-28  1:42 UTC (permalink / raw)
  To: fkrogh; +Cc: 8944

fkrogh@mathalacarte.com wrote:

> It would be best if the construct names did not effect the indentation
> of code that follows.
>
> Thus
>
>      An ordinary line indented like here.
> Construct_Name: do i = 1, 10
>        Next line indented as if the construct name were not there.
> Another_Construct_name: do j = 1, 30
> And_Yet_Another_name: do k = 1,8
>            The next line starts like this
>          end do Construct_Name
>        end do Another_Construct_name
>      end do And_Yet_Another_name

I don't understand what you are asking for, because the names
already make no difference to the indentation of subsequent lines.

Compare the result of indenting:

do i = 1, 10
foo
end do

and

very_long_label: do i = 1, 10
foo
end do

Lines 2 and 3 get the same indentation in both cases.

What you seem to be asking for is the option to indent named statements
to column 0. That's probably doable, but it won't be a high priority.

> Although I've been told, it is awkward to implement, I would like to be
> able to use continuation lines so that the indentation structure of the
> code is more clear.  Thus the above might look like this
>
>      An ordinary line indented like here.
> Construct_Name:&
> &    do i = 1, 10

I'm not going to implement this. It is too difficult to support
constructs split across lines.





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

* bug#8944: 23.3; Formatting of Labeled Constructs in Fortran
       [not found]   ` <4E095C50.9090101@mathalacarte.com>
@ 2011-06-28 21:24     ` Glenn Morris
  2016-12-07 17:54       ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2011-06-28 21:24 UTC (permalink / raw)
  To: Fred Krogh; +Cc: 8944


(Please keep the debbugs address included in replies).

Fred Krogh wrote (on Mon, 27 Jun 2011 at 21:45 -0700):

> > I don't understand what you are asking for, because the names
> > already make no difference to the indentation of subsequent lines.
[...]
> I must apologize.  I swear that this sort of thing was not working for
> me in the past.  I just tried your example and then a slightly more
> complicated example and it seems to work.

OK, good, that was easy!

> > I'm not going to implement this. It is too difficult to support
> > constructs split across lines.
> I'm sorry to belabor this.  Not knowing how this sort of think might
> actually be implemented it seems to me easy to ignore the indentation of
> a construct name.  Of course I really don't understand how this sort of
> thing gets handled and I am very grateful to have what I have.

The reason it makes life more difficult is that if everything is on
one line, you can basically just do everything with a simple regular
expression; but if things are allowed to be split over lines then
you need to do a more complicating parsing.

Anyway, I'll leave this bug report open but will mark it as "wontfix".





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

* bug#8944: 23.3; Formatting of Labeled Constructs in Fortran
  2011-06-28 21:24     ` Glenn Morris
@ 2016-12-07 17:54       ` Glenn Morris
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2016-12-07 17:54 UTC (permalink / raw)
  To: 8944-done

Glenn Morris wrote:

> Anyway, I'll leave this bug report open but will mark it as "wontfix".

I think it is now time to close this.





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

end of thread, other threads:[~2016-12-07 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-27 19:24 bug#8944: 23.3; Formatting of Labeled Constructs in Fortran fkrogh
2011-06-28  1:42 ` Glenn Morris
     [not found]   ` <4E095C50.9090101@mathalacarte.com>
2011-06-28 21:24     ` Glenn Morris
2016-12-07 17:54       ` Glenn Morris

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).