* Reset C-, only for the org-mode case
@ 2021-05-01 20:20 michael-franzese
2021-05-02 6:35 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: michael-franzese @ 2021-05-01 20:20 UTC (permalink / raw)
To: Help Gnu Emacs
Have been using the following keybindings to change the text height.
(global-set-key (kbd "C-,") 'text-scale-decrease)
(global-set-key (kbd "C-.") 'text-scale-increase)
But in org-mode C-, is already being used for org-cycle-agenda-files
C-'
C-, (org-cycle-agenda-files)
It was suggested to me that I can reset C-, and then apply my new keybinding
to execute "text-scale-decrease".
I would like to reset C-, only for the org-mode case. What can be done?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-01 20:20 Reset C-, only for the org-mode case michael-franzese
@ 2021-05-02 6:35 ` Eli Zaretskii
2021-05-03 23:50 ` michael-franzese
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2021-05-02 6:35 UTC (permalink / raw)
To: help-gnu-emacs
> From: michael-franzese@gmx.com
> Date: Sat, 1 May 2021 22:20:08 +0200
> Sensitivity: Normal
>
> Have been using the following keybindings to change the text height.
>
> (global-set-key (kbd "C-,") 'text-scale-decrease)
> (global-set-key (kbd "C-.") 'text-scale-increase)
>
> But in org-mode C-, is already being used for org-cycle-agenda-files
>
> C-'
> C-, (org-cycle-agenda-files)
>
> It was suggested to me that I can reset C-, and then apply my new keybinding
> to execute "text-scale-decrease".
>
> I would like to reset C-, only for the org-mode case. What can be done?
global-set-key changes the global binding, not the binding local to
Org mode. I suggest to read the node "Rebinding" of the Emacs manual,
including "Init Rebinding" to which it cross-references, to understand
the difference between these two, and also learn how to solve your
particular problem.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-02 6:35 ` Eli Zaretskii
@ 2021-05-03 23:50 ` michael-franzese
2021-05-03 23:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 11+ messages in thread
From: michael-franzese @ 2021-05-03 23:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
I have applied the following and gets things to work as I liked.
Is it good enough?
(define-key org-mode-map (kbd "C-,") 'undefined)
(define-key org-mode-map (kbd "C-,") 'text-scale-decrease)
> Sent: Sunday, May 02, 2021 at 6:35 PM
> From: "Eli Zaretskii" <eliz@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Reset C-, only for the org-mode case
>
> > From: michael-franzese@gmx.com
> > Date: Sat, 1 May 2021 22:20:08 +0200
> > Sensitivity: Normal
> >
> > Have been using the following keybindings to change the text height.
> >
> > (global-set-key (kbd "C-,") 'text-scale-decrease)
> > (global-set-key (kbd "C-.") 'text-scale-increase)
> >
> > But in org-mode C-, is already being used for org-cycle-agenda-files
> >
> > C-'
> > C-, (org-cycle-agenda-files)
> >
> > It was suggested to me that I can reset C-, and then apply my new keybinding
> > to execute "text-scale-decrease".
> >
> > I would like to reset C-, only for the org-mode case. What can be done?
>
> global-set-key changes the global binding, not the binding local to
> Org mode. I suggest to read the node "Rebinding" of the Emacs manual,
> including "Init Rebinding" to which it cross-references, to understand
> the difference between these two, and also learn how to solve your
> particular problem.
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-03 23:50 ` michael-franzese
@ 2021-05-03 23:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 6:30 ` Christopher Dimech
0 siblings, 1 reply; 11+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-03 23:56 UTC (permalink / raw)
To: help-gnu-emacs
michael-franzese wrote:
> Is it good enough?
>
> (define-key org-mode-map (kbd "C-,") 'undefined)
> (define-key org-mode-map (kbd "C-,") 'text-scale-decrease)
The first line doesn't do anything as you bind the same key to
something else the second line.
You can add a hash before function names, like this:
#'text-scale-decrease
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-03 23:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-05-05 6:30 ` Christopher Dimech
2021-05-05 6:37 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Dimech @ 2021-05-05 6:30 UTC (permalink / raw)
To: moasenwood; +Cc: help-gnu-emacs
> Sent: Tuesday, May 04, 2021 at 11:56 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: Reset C-, only for the org-mode case
>
> michael-franzese wrote:
>
> > Is it good enough?
> >
> > (define-key org-mode-map (kbd "C-,") 'undefined)
> > (define-key org-mode-map (kbd "C-,") 'text-scale-decrease)
"C-," in already bound in org-mode
> The first line doesn't do anything as you bind the same key to
> something else the second line.
>
> You can add a hash before function names, like this:
> #'text-scale-decrease
Was not aware one can use #' with emacs code, but only with user defined code.
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-05 6:30 ` Christopher Dimech
@ 2021-05-05 6:37 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 8:31 ` Christopher Dimech
0 siblings, 1 reply; 11+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-05 6:37 UTC (permalink / raw)
To: help-gnu-emacs
Christopher Dimech wrote:
>>> Is it good enough?
>>>
>>> (define-key org-mode-map (kbd "C-,") 'undefined)
>>> (define-key org-mode-map (kbd "C-,") 'text-scale-decrease)
>
> "C-," in already bound in org-mode
Doesn't matter, you don't have to bind it to `undefined'
first :)
> Was not aware one can use #' with emacs code, but only with
> user defined code.
Oh no, it is the same code, the part of Emacs that is Lisp,
that's the same Lisp.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-05 6:37 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-05-05 8:31 ` Christopher Dimech
2021-05-05 9:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Dimech @ 2021-05-05 8:31 UTC (permalink / raw)
To: moasenwood; +Cc: help-gnu-emacs
---------------------
Christopher Dimech
General Administrator - Naiad Informatics - GNU Project (Geocomputation)
- Geophysical Simulation
- Geological Subsurface Mapping
- Disaster Preparedness and Mitigation
- Natural Resource Exploration and Production
- Free Software Advocacy
> Sent: Wednesday, May 05, 2021 at 6:37 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: Reset C-, only for the org-mode case
>
> Christopher Dimech wrote:
>
> >>> Is it good enough?
> >>>
> >>> (define-key org-mode-map (kbd "C-,") 'undefined)
> >>> (define-key org-mode-map (kbd "C-,") 'text-scale-decrease)
> >
> > "C-," in already bound in org-mode
>
> Doesn't matter, you don't have to bind it to `undefined'
> first :)
So it is a bit different than with the usual "unset-key"
or "set-key" to nil.
(global-set-key (kbd "C-e") nil)
(global-unset-key (kbd "C-e"))
> > Was not aware one can use #' with emacs code, but only with
> > user defined code.
>
> Oh no, it is the same code, the part of Emacs that is Lisp,
> that's the same Lisp.
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-05 8:31 ` Christopher Dimech
@ 2021-05-05 9:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 10:10 ` Christopher Dimech
0 siblings, 1 reply; 11+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-05 9:00 UTC (permalink / raw)
To: help-gnu-emacs
Christopher Dimech wrote:
>>>> Is it good enough?
>>>>
>>>> (define-key org-mode-map (kbd "C-,") 'undefined)
>>>> (define-key org-mode-map (kbd "C-,") 'text-scale-decrease)
>>>
>>> "C-," in already bound in org-mode
>>
>> Doesn't matter, you don't have to bind it to `undefined'
>> first :)
>
> So it is a bit different than with the usual "unset-key" or
> "set-key" to nil.
>
> (global-set-key (kbd "C-e") nil)
> (global-unset-key (kbd "C-e"))
? :)
What is it that you want to do? You want this?
(define-key org-mode-map (kbd "C-,") #'text-scale-decrease)
Then it is enough :)
Now it is `text-scale-decrease' and it doesn't matter what it
was before or if it was set n times to n different values...
Year zero. No tradition. No history!
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-05 9:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-05-05 10:10 ` Christopher Dimech
2021-05-05 10:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 11+ messages in thread
From: Christopher Dimech @ 2021-05-05 10:10 UTC (permalink / raw)
To: moasenwood; +Cc: help-gnu-emacs
> Sent: Wednesday, May 05, 2021 at 9:00 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: Reset C-, only for the org-mode case
>
> Christopher Dimech wrote:
>
> >>>> Is it good enough?
> >>>>
> >>>> (define-key org-mode-map (kbd "C-,") 'undefined)
> >>>> (define-key org-mode-map (kbd "C-,") 'text-scale-decrease)
> >>>
> >>> "C-," in already bound in org-mode
> >>
> >> Doesn't matter, you don't have to bind it to `undefined'
> >> first :)
> >
> > So it is a bit different than with the usual "unset-key" or
> > "set-key" to nil.
> >
> > (global-set-key (kbd "C-e") nil)
> > (global-unset-key (kbd "C-e"))
>
> ? :)
I wrote an example with global-set-key where you have to unset it first.
> What is it that you want to do? You want this?
>
> (define-key org-mode-map (kbd "C-,") #'text-scale-decrease)
>
> Then it is enough :)
This means that define-key works a bit different than global-set-key.
> Now it is `text-scale-decrease' and it doesn't matter what it
> was before or if it was set n times to n different values...
Yes, because in org-mode the C-, was already used to do some other thing.
> Year zero. No tradition. No history!
Depends which year zero you are talking about. Many things happened before the
christ story, if that happened at all!
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-05 10:10 ` Christopher Dimech
@ 2021-05-05 10:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 10:43 ` Christopher Dimech
0 siblings, 1 reply; 11+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-05 10:27 UTC (permalink / raw)
To: help-gnu-emacs
Christopher Dimech wrote:
>> Now it is `text-scale-decrease' and it doesn't matter what
>> it was before or if it was set n times to n different
>> values...
>
> Yes, because in org-mode the C-, was already used to do some
> other thing.
You set it to x and it is x. The past doesn't matter when that
happens and after there is no record.
>> Year zero. No tradition. No history!
>
> Depends which year zero you are talking about. Many things
> happened before the christ story, if that happened at all!
Year zero is now! Dammit!
... haha :) what the -
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Reset C-, only for the org-mode case
2021-05-05 10:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-05-05 10:43 ` Christopher Dimech
0 siblings, 0 replies; 11+ messages in thread
From: Christopher Dimech @ 2021-05-05 10:43 UTC (permalink / raw)
To: moasenwood; +Cc: help-gnu-emacs
> Sent: Wednesday, May 05, 2021 at 10:27 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: Reset C-, only for the org-mode case
>
> Christopher Dimech wrote:
>
> >> Now it is `text-scale-decrease' and it doesn't matter what
> >> it was before or if it was set n times to n different
> >> values...
> >
> > Yes, because in org-mode the C-, was already used to do some
> > other thing.
>
> You set it to x and it is x. The past doesn't matter when that
> happens and after there is no record.
>
> >> Year zero. No tradition. No history!
> >
> > Depends which year zero you are talking about. Many things
> > happened before the christ story, if that happened at all!
>
> Year zero is now! Dammit!
>
> ... haha :) what the -
I thought it was your birthday. :)
> --
> underground experts united
> https://dataswamp.org/~incal
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-05-05 10:43 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-01 20:20 Reset C-, only for the org-mode case michael-franzese
2021-05-02 6:35 ` Eli Zaretskii
2021-05-03 23:50 ` michael-franzese
2021-05-03 23:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 6:30 ` Christopher Dimech
2021-05-05 6:37 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 8:31 ` Christopher Dimech
2021-05-05 9:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 10:10 ` Christopher Dimech
2021-05-05 10:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 10:43 ` Christopher Dimech
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).