GNU bug report logs -
#14076
24.3; Comments in Fortran Source
Previous Next
Reported by: fkrogh <at> mathalacarte.com
Date: Thu, 28 Mar 2013 17:01:01 UTC
Severity: wishlist
Tags: wontfix
Found in version 24.3
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 14076 in the body.
You can then email your comments to 14076 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Thu, 28 Mar 2013 17:01:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
fkrogh <at> mathalacarte.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 28 Mar 2013 17:01:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I have options set so that comments should not be touched when
formatting a region, but they are indented to the current indentation
level. It is a bit of a pain to use a regular expression search and
replace to get them back where they belong.
In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.3)
of 2013-03-25 on mon1
Windowing system distributor `The X.Org Foundation', version 11.0.11400000
System Description: Gentoo Base System release 2.2
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'
'--disable-dependency-tracking' '--program-suffix=-emacs-24'
'--program-transform-name=s/emacs-[0-9].*/emacs-24/'
'--infodir=/usr/share/info/emacs-24'
'--enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp'
'--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64'
'--with-gameuser=games' '--without-compress-info' '--without-hesiod'
'--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus'
'--without-gnutls' '--without-xml2' '--without-selinux'
'--without-wide-int' '--with-sound' '--with-x' '--without-ns'
'--without-gconf' '--without-gsettings' '--without-toolkit-scroll-bars'
'--without-gif' '--with-jpeg' '--with-png' '--with-rsvg'
'--without-tiff' '--with-xpm' '--without-imagemagick' '--without-xft'
'--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk3'
'GENTOO_PACKAGE=app-editors/emacs-24.3'
'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu'
'CFLAGS=-O2 -march=native -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'
'CPPFLAGS=''
Important settings:
value of $LANG: en_US.utf8
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: F90
Minor modes in effect:
shell-dirtrack-mode: t
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-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
auto-fill-function: f90-do-auto-fill
transient-mark-mode: t
Recent input:
t h a l a c a r t e . c o m <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> W h e n SPC r e f o r m a
t t i n g SPC <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> f o
r m a t t i n g SPC a SPC r e g i o n SPC i n SPC F
o r t r a n SPC c o m m e n t s SPC a r e SPC i n d
e n t e d SPC t o SPC t h e SPC c u r r e n t SPC i
n d e n t a t i o n SPC l e v 3 e l <backspace> <backspace>
<backspace> e l , SPC e v e n SPC t h o u g h SPC I
SPC h a v e SPC s e t SPC t h e SPC o p t i o n s SPC
n o t SPC t o SPC c h a n g e SPC c o m m e n t s .
<return> <down-mouse-5> <mouse-5> <double-down-mouse-5>
<double-mouse-5> <down-mouse-5> <mouse-5> <down-mouse-5>
<mouse-5> <down-mouse-5> <mouse-5> <double-down-mouse-5>
<double-mouse-5> <down-mouse-5> <mouse-5> <double-down-mouse-5>
<double-mouse-5> <down-mouse-5> <mouse-5> <down-mouse-5>
<mouse-5> <double-down-mouse-5> <double-mouse-5> <triple-down-mouse-5>
<triple-mouse-5> <down-mouse-5> <mouse-5> <double-down-mouse-5>
<double-mouse-5> <triple-down-mouse-5> <triple-mouse-5>
<triple-down-mouse-5> <triple-mouse-5> <down-mouse-4>
<mouse-4> <double-down-mouse-4> <double-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <down-mouse-4>
<mouse-4> <double-down-mouse-4> <double-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4>
<down-mouse-1> <mouse-1> C-x k <return> y e s <return>
C-x k <return> <down-mouse-1> <mouse-1> C-x k <return>
C-x k <return> <down-mouse-1> <mouse-movement> <mouse-movement>
<drag-mouse-1> C-M-\ C-/ <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <menu-bar> <help-menu> <se
nd-emacs-bug-report>
Recent messages:
Load-path shadows:
/home/m/color-theme hides /usr/local/share/emacs/site-lisp/color-theme/color-theme
/home/m/color-theme-freds hides /usr/local/share/emacs/site-lisp/color-theme/color-theme-freds
/home/m/color-theme hides /usr/local/share/emacs/site-lisp/color-theme
/home/m/color-theme-freds hides /usr/local/share/emacs/site-lisp/color-theme-freds
/home/m/.emacs hides /usr/share/emacs/site-lisp/.emacs
Features:
(shadow sort gnus-util mail-extr emacsbug message idna format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader find-func pp help-mode apropos
time-stamp shell pcomplete compile comint ansi-color ring misearch
multi-isearch cc-langs preview prv-emacs warnings tex-buf reftex-dcr
reftex-auc reftex reftex-vars noutline outline font-latex byte-opt
bytecomp byte-compile cconv latex easy-mmode tex-style tex dbus xml
latexenc make-mode color-theme cl-macs gv edmacro kmacro cl sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils reporter 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-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs pc-bufsw uniquify
advice help-fns cl-lib advice-preload bm-ext bm paren site-gentoo
preview-latex tex-site auto-loads time-date tooltip 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 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 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 dynamic-setting move-toolbar gtk x-toolkit
x multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Sat, 30 Mar 2013 01:49:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 14076 <at> debbugs.gnu.org (full text, mbox):
fkrogh <at> mathalacarte.com wrote:
> I have options set so that comments should not be touched when
> formatting a region, but they are indented to the current indentation
> level.
Thanks for the report, but please give a complete example of what you
mean, starting from emacs -Q.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Sat, 30 Mar 2013 16:47:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 14076 <at> debbugs.gnu.org (full text, mbox):
On 03/29/2013 06:46 PM, Glenn Morris wrote:
> fkrogh <at> mathalacarte.com wrote:
>
>> I have options set so that comments should not be touched when
>> formatting a region, but they are indented to the current indentation
>> level.
> Thanks for the report, but please give a complete example of what you
> mean, starting from emacs -Q.
>
O.k. The program shows up with emacs -Q with this program
program tmp
integer :: i
do i = 1, 5
! Comment
print '("i=",i0)', i
end do
end program tmp
Highlight the whole program, then <cntrl><alt>\
and the ! Comment is indented, and I think this should not happen.
Thanks for looking into this.
Fred
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Wed, 03 Apr 2013 00:25:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 14076 <at> debbugs.gnu.org (full text, mbox):
Please keep the debbugs address cc'd.
[I then forgot to do so myself...]
Fred Krogh wrote:
> O.k. The program shows up with emacs -Q with this program
>
> program tmp
> integer :: i
> do i = 1, 5
> ! Comment
> print '("i=",i0)', i
> end do
> end program tmp
>
> Highlight the whole program, then <cntrl><alt>\
> and the ! Comment is indented, and I think this should not happen.
Why do you think it should not happen?
F90 mode has always behaved like this.
Earlier you said:
> I have options set so that comments should not be touched when
> formatting a region,
What options are those?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Wed, 03 Apr 2013 00:39:01 GMT)
Full text and
rfc822 format available.
Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):
On 04/02/2013 05:19 PM, Glenn Morris wrote:
> Please keep the debbugs address cc'd.
>
> Fred Krogh wrote:
>
>> O.k. The program shows up with emacs -Q with this program
>>
>> program tmp
>> integer :: i
>> do i = 1, 5
>> ! Comment
>> print '("i=",i0)', i
>> end do
>> end program tmp
>>
>> Highlight the whole program, then <cntrl><alt>\
>> and the ! Comment is indented, and I think this should not happen.
> Why do you think it should not happen?
> F90 mode has always behaved like this.
I'm hoping that just because it has "always" done this, that does not
make it correct.
>
> Earlier you said:
>
>> I have options set so that comments should not be touched when
>> formatting a region,
> What options are those?
fortran-comment-indent-style is a variable defined in `fortran.el'.
Its value is nil
Original value was fixed
This variable is safe as a file local variable if its value
satisfies the predicate which is a byte-compiled expression.
Documentation:
How to indent comments.
nil forces comment lines not to be touched;
`fixed' indents to `fortran-comment-line-extra-indent' columns beyond
`fortran-minimum-statement-indent-fixed' (if `indent-tabs-mode' nil), or
`fortran-minimum-statement-indent-tab' (if `indent-tabs-mode' non-nil);
`relative' indents to current Fortran indentation plus
`fortran-comment-line-extra-indent'.
You can customize this variable.
Specifically nil forces comment lines not to be touched. When you get
down to it, I don't care what nil does, but I certainly want some way to
say "don't change my comments". But from the above, that seems to be
what nil is supposed to do. I'd be happy if there was some choice that
did this, but here is what I see for choices
Fortran Comment Indent Style:
(*) Untouched
( ) fixed
( ) relative
State : SAVED and set.
How to indent comments. Hide
nil forces comment lines not to be touched;
`fixed' indents to `fortran-comment-line-extra-indent' columns beyond
`fortran-minimum-statement-indent-fixed' (if `indent-tabs-mode'
nil), or
`fortran-minimum-statement-indent-tab' (if `indent-tabs-mode'
non-nil);
`relative' indents to current Fortran indentation plus
`fortran-comment-line-extra-indent'.
Groups: Fortran Indent
I have fortran-comment-line-extra-indent set to 0. Perhaps there is
some combination in there that would make it do what I want, but since
it appears that nil should do the job, I've filed this report.
Many thanks for looking into this.
Fred
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Wed, 03 Apr 2013 01:05:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 14076 <at> debbugs.gnu.org (full text, mbox):
Fred Krogh wrote:
> fortran-comment-indent-style is a variable defined in `fortran.el'.
> Its value is nil
Fortran mode is not F90 mode. They don't have all the same features,
and fortran- variables have no effect on F90 mode. It's a bit
unfortunate that we ended up with "fortran" mode meaning "F77", but here
we are.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Wed, 03 Apr 2013 02:01:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 14076 <at> debbugs.gnu.org (full text, mbox):
On 04/02/2013 06:01 PM, Glenn Morris wrote:
> Fred Krogh wrote:
>
>> fortran-comment-indent-style is a variable defined in `fortran.el'.
>> Its value is nil
> Fortran mode is not F90 mode. They don't have all the same features,
> and fortran- variables have no effect on F90 mode. It's a bit
> unfortunate that we ended up with "fortran" mode meaning "F77", but here
> we are.
>
I guess now this turns into a new feature request. I'd love to have
some way to leave comments untouched (the nil in Fortran mode). Looking
in the f90 settings, I don't see any way to do this.
Thanks,
Fred
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Wed, 03 Apr 2013 19:08:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 14076 <at> debbugs.gnu.org (full text, mbox):
>> fortran-comment-indent-style is a variable defined in `fortran.el'.
>> Its value is nil
> Fortran mode is not F90 mode. They don't have all the same features,
> and fortran- variables have no effect on F90 mode. It's a bit
> unfortunate that we ended up with "fortran" mode meaning "F77", but here
> we are.
How 'bout we rename fortran.el to f77.el, change the "fortran-" prefix
to "f77-" (and add obsolete aliases where needed)?
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Thu, 04 Apr 2013 03:54:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 14076 <at> debbugs.gnu.org (full text, mbox):
Fred Krogh wrote:
> I guess now this turns into a new feature request. I'd love to have
> some way to leave comments untouched (the nil in Fortran mode).
> Looking in the f90 settings, I don't see any way to do this.
You should be able to (ab)use f90-directive-comment-re for this:
(setq f90-directive-comment-re "!")
I don't really want to add a feature for this since AFAIK other
programming modes don't have such a thing. Fortran mode is different
because comments are weird in old-school F77.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Thu, 04 Apr 2013 03:55:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 14076 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier wrote:
> How 'bout we rename fortran.el to f77.el, change the "fortran-" prefix
> to "f77-" (and add obsolete aliases where needed)?
Probably the right thing to do; but: Once I had some vague hope to make
"fortran-mode" a smart thing that chose the correct mode, f77 or f90 (or
f95 or f2000 or ...), based on the filename/contents, but it never
happened and shows no sign of doing so. Without a realistic expectation
of that second step, the first step of renaming things will just annoy
people for no reason, so I can't see much point.
Added tag(s) wontfix.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 04 Apr 2013 03:56:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Thu, 04 Apr 2013 04:31:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 14076 <at> debbugs.gnu.org (full text, mbox):
On 04/03/2013 08:50 PM, Glenn Morris wrote:
> Fred Krogh wrote:
>
>> I guess now this turns into a new feature request. I'd love to have
>> some way to leave comments untouched (the nil in Fortran mode).
>> Looking in the f90 settings, I don't see any way to do this.
> You should be able to (ab)use f90-directive-comment-re for this:
>
> (setq f90-directive-comment-re "!")
>
> I don't really want to add a feature for this since AFAIK other
> programming modes don't have such a thing. Fortran mode is different
> because comments are weird in old-school F77.
>
I don't know about the abuse, but it works, and I'm very happy to have it.
Many Thanks,
Fred
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Thu, 04 Apr 2013 12:40:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 14076 <at> debbugs.gnu.org (full text, mbox):
> I don't really want to add a feature for this since AFAIK other
> programming modes don't have such a thing. Fortran mode is different
> because comments are weird in old-school F77.
You could make f90 follows the "3 comment chars" convention, as
in Lisp.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14076
; Package
emacs
.
(Fri, 05 Apr 2013 19:23:02 GMT)
Full text and
rfc822 format available.
Message #43 received at 14076 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier wrote:
> You could make f90 follows the "3 comment chars" convention, as
> in Lisp.
!!! comments are already indented to column 0. !! comments can be
indented to code with
(setq f90-indented-comment-re "!!")
bug closed, send any further explanations to
14076 <at> debbugs.gnu.org and fkrogh <at> mathalacarte.com
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 05 Apr 2013 19:23:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 04 May 2013 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.