unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* define-key for fortran code
@ 2021-05-28 17:47 jaime-escalante
  2021-05-29  4:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 16+ messages in thread
From: jaime-escalante @ 2021-05-28 17:47 UTC (permalink / raw)
  To: Help Gnu Emacs


I wonder what I can use "define-key" for fortran code (for both f77 and f90)





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

* Re: define-key for fortran code
  2021-05-28 17:47 define-key for fortran code jaime-escalante
@ 2021-05-29  4:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-05-29 12:13   ` ludvig-faddeev
  2021-05-29 13:18   ` jaime-escalante
  0 siblings, 2 replies; 16+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-29  4:23 UTC (permalink / raw)
  To: help-gnu-emacs

jaime-escalante wrote:

> I wonder what I can use "define-key" for fortran code (for
> both f77 and f90)

(require 'f90)
(require 'fortran)

(defun define-fortran-key (key fun)
  (define-key f90-mode-map     key fun)
  (define-key fortran-mode-map key fun) )

(define-fortran-key "q" #'kill-emacs) ; e.g.

?

-- 
underground experts united
https://dataswamp.org/~incal




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

* define-key for fortran code
  2021-05-29  4:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-05-29 12:13   ` ludvig-faddeev
  2021-05-29 12:25     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-05-29 13:18   ` jaime-escalante
  1 sibling, 1 reply; 16+ messages in thread
From: ludvig-faddeev @ 2021-05-29 12:13 UTC (permalink / raw)
  To: moasenwood; +Cc: help-gnu-emacs

Talking about fortran, I wonder if the following is the way to use "with-eval-after-load"
for fortran.

(with-eval-after-load 'fortran
   (set-keybindings))

(with-eval-after-load 'f90
   (set-keybindings))




> Sent: Saturday, May 29, 2021 at 4:23 PM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: define-key for fortran code
>
> jaime-escalante wrote:
>
> > I wonder what I can use "define-key" for fortran code (for
> > both f77 and f90)
>
> (require 'f90)
> (require 'fortran)
>
> (defun define-fortran-key (key fun)
>   (define-key f90-mode-map     key fun)
>   (define-key fortran-mode-map key fun) )
>
> (define-fortran-key "q" #'kill-emacs) ; e.g.
>
> ?
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
>



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

* Re: define-key for fortran code
  2021-05-29 12:13   ` ludvig-faddeev
@ 2021-05-29 12:25     ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 16+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-29 12:25 UTC (permalink / raw)
  To: help-gnu-emacs

ludvig-faddeev wrote:

> Talking about fortran, I wonder if the following is the way
> to use "with-eval-after-load" for fortran.
>
> (with-eval-after-load 'fortran
>    (set-keybindings))
>
> (with-eval-after-load 'f90

In general, I do like this, first I set the key with the map,
if that works sometimes but not always I collect all of them
into a function and then call that function from the
modes hook.

I never used `with-eval-after-load', just seems complicated to
me but I have nothing more than that intuition to (not) back
it up...

-- 
underground experts united
https://dataswamp.org/~incal




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

* define-key for fortran code
  2021-05-29  4:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-05-29 12:13   ` ludvig-faddeev
@ 2021-05-29 13:18   ` jaime-escalante
  2021-05-29 14:24     ` Robert Thorpe
  2021-05-29 14:37     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 2 replies; 16+ messages in thread
From: jaime-escalante @ 2021-05-29 13:18 UTC (permalink / raw)
  To: moasenwood; +Cc: help-gnu-emacs

> Sent: Saturday, May 29, 2021 at 4:23 PM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: define-key for fortran code
>
> jaime-escalante wrote:
>
> > I wonder what I can use "define-key" for fortran code (for
> > both f77 and f90)
>
> (require 'f90)
> (require 'fortran)
>
> (defun define-fortran-key (key fun)
>   (define-key f90-mode-map     key fun)
>   (define-key fortran-mode-map key fun) )
>
> (define-fortran-key "q" #'kill-emacs) ; e.g.
>

I cannot follow how to use your function

(define-key f90-mode-map key fun)

I was passing the key sequence as (kbd "H-o q"), you are using "key" and just pass
"q" to it.  Could I just pass "H-o q" to it?



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

* Re: define-key for fortran code
  2021-05-29 13:18   ` jaime-escalante
@ 2021-05-29 14:24     ` Robert Thorpe
  2021-05-29 14:32       ` Emanuel Berg via Users list for the GNU Emacs text editor
                         ` (3 more replies)
  2021-05-29 14:37     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 4 replies; 16+ messages in thread
From: Robert Thorpe @ 2021-05-29 14:24 UTC (permalink / raw)
  To: jaime-escalante; +Cc: help-gnu-emacs

I'd just like to point out, that it is obvious that emails from several
different addresses are coming from the same person.

The emails from the following addresses are all asking about the same
features of Emacs in the same way....

jaime-escalante@gmx.com
ludvig-faddeev@gmx.com
michael-franzese@gmx.com
pauline-galea@gmx.com

There is no point in doing that on this list.

It would help a lot if your questions were more specific and you explain
what you are expecting to happen more clearly.

BR,
Robert Thorpe



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

* Re: define-key for fortran code
  2021-05-29 14:24     ` Robert Thorpe
@ 2021-05-29 14:32       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-05-29 16:55         ` pauline-galea
  2021-05-29 16:39       ` ludvig-faddeev
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-29 14:32 UTC (permalink / raw)
  To: help-gnu-emacs

Robert Thorpe wrote:

> I'd just like to point out, that it is obvious that emails
> from several different addresses are coming from the
> same person.
>
> The emails from the following addresses are all asking about
> the same features of Emacs in the same way....
>
> jaime-escalante@gmx.com
> ludvig-faddeev@gmx.com
> michael-franzese@gmx.com
> pauline-galea@gmx.com
>
> There is no point in doing that on this list.

Now now, a lot of people do that, just a bit, and sometimes
A LOT, more skillfully than ... whatever is the real name.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: define-key for fortran code
  2021-05-29 13:18   ` jaime-escalante
  2021-05-29 14:24     ` Robert Thorpe
@ 2021-05-29 14:37     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 16+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-29 14:37 UTC (permalink / raw)
  To: help-gnu-emacs

jaime-escalante wrote:

> I cannot follow how to use your function
>
> (define-key f90-mode-map key fun)
>
> I was passing the key sequence as (kbd "H-o q"), you are
> using "key" and just pass "q" to it. Could I just pass "H-o
> q" to it?

Why ever `define-key' would not behave like a normal defun
I don't know so why ever not?

However I'd rather pass "\H-oq" - if indeed H-o has been
defined as a prefix command. And you can find out by just
evaling the string, here "\H-oq" - for me it says

  elisp--preceding-sexp: Invalid modifier in string

so here, it hasn't.

-- 
underground experts united
https://dataswamp.org/~incal




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

* define-key for fortran code
  2021-05-29 14:24     ` Robert Thorpe
  2021-05-29 14:32       ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-05-29 16:39       ` ludvig-faddeev
  2021-05-29 20:00         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-05-29 17:20       ` ludvig-faddeev
  2021-05-29 17:44       ` Jean Louis
  3 siblings, 1 reply; 16+ messages in thread
From: ludvig-faddeev @ 2021-05-29 16:39 UTC (permalink / raw)
  To: Robert Thorpe; +Cc: help-gnu-emacs

There is not much information about how to set up fortran in emacs.  An added complication
is the various flavours of fortran (fixed format, free format, f95, f03, f08).  This is
making the fortarn language quite messed up, unlike what happened to C++ when new features
were added in. 

In this day and age of technology, pissing people off on the internet is not hard, and if
you’re really trying to get back at someone, this list is the most annoying with signs of
everyday people who just irk you by existing. 

Ludvig

> Sent: Sunday, May 30, 2021 at 2:24 AM
> From: "Robert Thorpe" <rt@robertthorpeconsulting.com>
> To: jaime-escalante@gmx.com
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: define-key for fortran code
>
> I'd just like to point out, that it is obvious that emails from several
> different addresses are coming from the same person.
> 
> The emails from the following addresses are all asking about the same
> features of Emacs in the same way....
> 
> jaime-escalante@gmx.com
> ludvig-faddeev@gmx.com
> michael-franzese@gmx.com
> pauline-galea@gmx.com
> 
> There is no point in doing that on this list.
> 
> It would help a lot if your questions were more specific and you explain
> what you are expecting to happen more clearly.
> 
> BR,
> Robert Thorpe
> 
>



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

* define-key for fortran code
  2021-05-29 14:32       ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-05-29 16:55         ` pauline-galea
  2021-05-29 20:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 16+ messages in thread
From: pauline-galea @ 2021-05-29 16:55 UTC (permalink / raw)
  To: moasenwood; +Cc: help-gnu-emacs


How did you figure out I was a dog?  I did not know that people have to interact here
skillfully.  I have a few friends working on fortran and want to held them set up
fortran mode to use outline-minor-mode.  But have never worked with fortran before.



> Sent: Sunday, May 30, 2021 at 2:32 AM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: define-key for fortran code
>
> Robert Thorpe wrote:
>
> > I'd just like to point out, that it is obvious that emails
> > from several different addresses are coming from the
> > same person.
> >
> > The emails from the following addresses are all asking about
> > the same features of Emacs in the same way....
> >
> > jaime-escalante@gmx.com
> > ludvig-faddeev@gmx.com
> > michael-franzese@gmx.com
> > pauline-galea@gmx.com
> >
> > There is no point in doing that on this list.
>
> Now now, a lot of people do that, just a bit, and sometimes
> A LOT, more skillfully than ... whatever is the real name.
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
>



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

* define-key for fortran code
  2021-05-29 14:24     ` Robert Thorpe
  2021-05-29 14:32       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-05-29 16:39       ` ludvig-faddeev
@ 2021-05-29 17:20       ` ludvig-faddeev
  2021-05-29 20:04         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-05-29 17:44       ` Jean Louis
  3 siblings, 1 reply; 16+ messages in thread
From: ludvig-faddeev @ 2021-05-29 17:20 UTC (permalink / raw)
  To: Robert Thorpe; +Cc: help-gnu-emacs, jaime-escalante

For fortran there are a number of things people want to use.

1. how to set headings using outline-minor-mode
2. how to hide and show code structures (e.g. subroutine, function)

But I am sure there would be other things to add.


> Sent: Sunday, May 30, 2021 at 2:24 AM
> From: "Robert Thorpe" <rt@robertthorpeconsulting.com>
> To: jaime-escalante@gmx.com
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: define-key for fortran code
>
> I'd just like to point out, that it is obvious that emails from several
> different addresses are coming from the same person.
>
> The emails from the following addresses are all asking about the same
> features of Emacs in the same way....
>
> jaime-escalante@gmx.com
> ludvig-faddeev@gmx.com
> michael-franzese@gmx.com
> pauline-galea@gmx.com
>
> There is no point in doing that on this list.
>
> It would help a lot if your questions were more specific and you explain
> what you are expecting to happen more clearly.
>
> BR,
> Robert Thorpe
>
>



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

* Re: define-key for fortran code
  2021-05-29 14:24     ` Robert Thorpe
                         ` (2 preceding siblings ...)
  2021-05-29 17:20       ` ludvig-faddeev
@ 2021-05-29 17:44       ` Jean Louis
  2021-05-29 20:06         ` Emanuel Berg via Users list for the GNU Emacs text editor
  3 siblings, 1 reply; 16+ messages in thread
From: Jean Louis @ 2021-05-29 17:44 UTC (permalink / raw)
  To: Robert Thorpe; +Cc: help-gnu-emacs, jaime-escalante

* Robert Thorpe <rt@robertthorpeconsulting.com> [2021-05-29 17:25]:
> I'd just like to point out, that it is obvious that emails from several
> different addresses are coming from the same person.

That does not matter. People are free to use different identities and
we better respect their privacy. There is no rule that anybody has to
be "identified", and I think it is better to use different
identities on public mailing lists.


-- 
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/



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

* Re: define-key for fortran code
  2021-05-29 16:39       ` ludvig-faddeev
@ 2021-05-29 20:00         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 16+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-29 20:00 UTC (permalink / raw)
  To: help-gnu-emacs

ludvig-faddeev wrote:

> There is not much information about how to set up fortran
> in emacs.

Well let's turn the table then, first start to use it, then
conf the details to your liking as you go along, if at
all needed.

Optimally and by intent you have the mode and that takes care
of the setting up for you.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: define-key for fortran code
  2021-05-29 16:55         ` pauline-galea
@ 2021-05-29 20:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 16+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-29 20:03 UTC (permalink / raw)
  To: help-gnu-emacs

pauline-galea wrote:

> How did you figure out I was a dog? I did not know that
> people have to interact here skillfully.

By all means, keep up the tech discussion and activity is the
only thing that I really care about.

This is my personal view tho and may not reflect the opinions
of the software producer, director, and stunt women.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: define-key for fortran code
  2021-05-29 17:20       ` ludvig-faddeev
@ 2021-05-29 20:04         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 16+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-29 20:04 UTC (permalink / raw)
  To: help-gnu-emacs

ludvig-faddeev wrote:

> For fortran there are a number of things people want to use.
>
> 1. how to set headings using outline-minor-mode
> 2. how to hide and show code structures (e.g. subroutine,
> function)

Did you get that, whatever it is, working somewhere else?
Did you try the same?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: define-key for fortran code
  2021-05-29 17:44       ` Jean Louis
@ 2021-05-29 20:06         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 16+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-29 20:06 UTC (permalink / raw)
  To: help-gnu-emacs

Jean Louis wrote:

>> I'd just like to point out, that it is obvious that emails
>> from several different addresses are coming from the
>> same person.
>
> That does not matter. People are free to use different
> identities and we better respect their privacy. There is no
> rule that anybody has to be "identified", and I think it is
> better to use different identities on public mailing lists.

Now of course Mr. Thorpe is a true gentleman in and out of the
ring and he is free to be that just the same...

-- 
underground experts united
https://dataswamp.org/~incal




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

end of thread, other threads:[~2021-05-29 20:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-28 17:47 define-key for fortran code jaime-escalante
2021-05-29  4:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 12:13   ` ludvig-faddeev
2021-05-29 12:25     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 13:18   ` jaime-escalante
2021-05-29 14:24     ` Robert Thorpe
2021-05-29 14:32       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 16:55         ` pauline-galea
2021-05-29 20:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 16:39       ` ludvig-faddeev
2021-05-29 20:00         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 17:20       ` ludvig-faddeev
2021-05-29 20:04         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 17:44       ` Jean Louis
2021-05-29 20:06         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 14:37     ` Emanuel Berg via Users list for the GNU Emacs text editor

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