help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fortran Topics (outline-minor-mode, require, fixed format)


From: Christopher Dimech
Subject: Fortran Topics (outline-minor-mode, require, fixed format)
Date: Sat, 29 May 2021 23:26:06 +0200

> Sent: Sunday, May 30, 2021 at 8:48 AM
> From: "Jean Louis" <bugs@gnu.support>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Fortran Topics (outline-minor-mode, require, fixed format)
>
> * Emanuel Berg via Users list for the GNU Emacs text editor 
> <help-gnu-emacs@gnu.org> [2021-05-29 23:16]:
> > > outline-minor-mode oriented
> > >
> > > 1. How to include headings and subheadings for fortran
> > >    (fixed and free format)
> > > 2. Code structure hiding (subroutine, function)
> > > 3. Setting up new heading lists (outline-regexp,
> > >    outline-heading-alist)
> > 
> > OK, don't know/understand what 1 and 3 means, again did you
> > get it to work somewhere else?
> 
> In Fortran the comment is ! and how somebody wish to set headings is
> really personal choice.
> 
> I use just one heading in Emacs Lisp:
> 
> ;;;; ↝ MY EMACS LISP FUNCTIONS

In emacs-lisp-mode, outline-minor-mode uses ;; as level 1 heading, 
;;; as level 2 heading, ;;;; as level 3 heading etc.

For fortran-mode and f90 mode, outline-minor-mode could be set the same way.

!! Heading Level 1
!!! Subheading Level 2
!!!! SubSubHeading Level 3

Have tried doing "Hide Body" for comments starting with "!" (free format) or 
"C" (fixed form).  But does not look that "Hide Body" does anything.

Then users can change them if they want something else or additional settings.

For emacs-lisp-mode, outline-minor-mode can hide strucutres starting with "(".

For fortran, there can be hiding for lines starting with "subroutine" and 
"function"
when outline-minor-mode in enabled.

Could send a bug report for a feature request.  What do you think Jean?


> 
> And I like using Unicode that way.
> 
> ;;;; ⧭⧭⧭⧭⧭⧭⧭⧭⧭ Or maybe like this
> 
> All that can work. Is it visual enough? That is what matters.
> 
> Or how about:
> 
> ;⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞
> ;⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞                      ⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜
> ;⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞ Emacs Lisp Functions ⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜
> ;⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞                      ⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜⮜
> ;⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞⮞
> 
> I like those.
> 
> Headings and subheadings in outline mode don't exist in Fortran as a
> language.  Outline Minor Mode is universal it is up to user to decide
> what is heading and what not.
> 
> All of the above depends of settings, right?
> 
> > > Remove the need to call "(require 'f90)" and "(require
> > > 'fortran)" in conformity with other languages (e.g. as in
> > > emacs-lisp-mode, texinfo-mode)
> > 
> > Well, easy enough to do and conformity is very difficult
> > (impossible) to ever achieve anyway.
> 
> Reference here:
> https://www.emacswiki.org/emacs/FortranMode
> 
> (add-to-list 'auto-mode-alist '("\\.f\\'" . f90-mode))

They also can do that with the rest

  (add-to-list 'auto-mode-alist '("\\.f95\\'" . f90-mode))
  (add-to-list 'auto-mode-alist '("\\.f03\\'" . f90-mode))
  (add-to-list 'auto-mode-alist '("\\.f08\\'" . f90-mode))

Regards
Christopher

> 
> -- 
> Jean
> 
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
> 
> Sign an open letter in support of Richard M. Stallman
> https://stallmansupport.org/
> 
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]