* Bind RET to command
@ 2008-02-21 10:21 Florian Lindner
2008-02-21 11:31 ` Tassilo Horn
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Florian Lindner @ 2008-02-21 10:21 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I want to indent the current line when changing the line with return.
The command AFAIK is reindent-then-newline-and-indent.
How can I bind this to return but only in LaTeX mode (Auctex) and
python-mode.
Thanks,
Florian
--
I'm using an evaluation license of nemo since 72 days.
You should really try it!
http://www.malcom-mac.com/nemo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bind RET to command
2008-02-21 10:21 Bind RET to command Florian Lindner
@ 2008-02-21 11:31 ` Tassilo Horn
2008-02-21 11:32 ` Michael Hoffman
[not found] ` <mailman.7735.1203593497.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 11+ messages in thread
From: Tassilo Horn @ 2008-02-21 11:31 UTC (permalink / raw)
To: help-gnu-emacs
Florian Lindner <Florian.Lindner@xgm.de> writes:
Hi Florian,
> How can I bind this to return but only in LaTeX mode (Auctex) and
> python-mode.
One way to do it is that:
(add-hook 'LaTeX-mode-hook
(lambda ()
(local-set-key (kbd "RET") 'newline-and-indent)))
(add-hook 'python-mode-hook
(lambda ()
(local-set-key (kbd "RET") 'newline-and-indent)))
(Or add the local-set-key expression to a function you already add to
those hooks.)
Bye,
Tassilo
--
People sometimes ask me if it is a sin in the Church of Emacs to use
vi. Using a free version of vi is not a sin; it is a penance. So happy
hacking. (Richard M. Stallman)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bind RET to command
2008-02-21 10:21 Bind RET to command Florian Lindner
2008-02-21 11:31 ` Tassilo Horn
@ 2008-02-21 11:32 ` Michael Hoffman
[not found] ` <mailman.7735.1203593497.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 11+ messages in thread
From: Michael Hoffman @ 2008-02-21 11:32 UTC (permalink / raw)
To: help-gnu-emacs
Florian Lindner wrote:
> Hello,
> I want to indent the current line when changing the line with return.
>
> The command AFAIK is reindent-then-newline-and-indent.
>
> How can I bind this to return but only in LaTeX mode (Auctex) and
> python-mode.
For python-mode, try:
(add-hook 'python-mode-hook
'(lambda ()
(define-key python-mode-map "\C-m"
'reindent-then-newline-and-indent)))
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bind RET to command
[not found] ` <mailman.7735.1203593497.18990.help-gnu-emacs@gnu.org>
@ 2008-02-22 17:55 ` Ralf Angeli
2008-02-22 23:54 ` use-file-dialog admin
0 siblings, 1 reply; 11+ messages in thread
From: Ralf Angeli @ 2008-02-22 17:55 UTC (permalink / raw)
To: help-gnu-emacs
* Tassilo Horn (2008-02-21) writes:
> Florian Lindner <Florian.Lindner@xgm.de> writes:
>
>> How can I bind this to return but only in LaTeX mode (Auctex) and
>> python-mode.
>
> One way to do it is that:
>
> (add-hook 'LaTeX-mode-hook
> (lambda ()
> (local-set-key (kbd "RET") 'newline-and-indent)))
There is a much easier way. Just do
M-x customize-variable <RET> TeX-newline-function <RET>
--
Ralf
^ permalink raw reply [flat|nested] 11+ messages in thread
* use-file-dialog
2008-02-22 17:55 ` Ralf Angeli
@ 2008-02-22 23:54 ` admin
2008-02-23 1:06 ` use-file-dialog Bastien
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: admin @ 2008-02-22 23:54 UTC (permalink / raw)
To: help-gnu-emacs
Where the heck can I get use-file-dialog in the settings in order to
switch OFF this annoying popup file selection window.
Cant a developer have a tickbox with the option on this popup menu to
leave us with CLI file open?
Every time I install a system I have to change this for every user and
it is always difficult to find.
Is it not possible to have the settings remain in the user's .emax
directory in order that upgrades do not reset all the previous settings?
Emacs is very configurable, but at least the user settings must be
remembered accross versions.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: use-file-dialog
2008-02-23 1:06 ` use-file-dialog Bastien
@ 2008-02-23 0:11 ` Lennart Borgman (gmail)
2008-02-23 1:44 ` use-file-dialog Bastien Guerry
0 siblings, 1 reply; 11+ messages in thread
From: Lennart Borgman (gmail) @ 2008-02-23 0:11 UTC (permalink / raw)
To: Bastien; +Cc: help-gnu-emacs
Bastien wrote:
>> Emacs is very configurable, but at least the user settings must be
>> remembered accross versions.
A very big effort is put into the development of Emacs to ensure this as
far as possible. Sometimes however conflicting interests (new users vs
old users for example) makes it impossible.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: use-file-dialog
2008-02-23 1:44 ` use-file-dialog Bastien Guerry
@ 2008-02-23 0:59 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 11+ messages in thread
From: Lennart Borgman (gmail) @ 2008-02-23 0:59 UTC (permalink / raw)
To: Bastien Guerry; +Cc: help-gnu-emacs
Bastien Guerry wrote:
> Hi Lennart,
>
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>
>> Bastien wrote:
>>>> Emacs is very configurable, but at least the user settings must be
>>>> remembered accross versions.
>> A very big effort is put into the development of Emacs to ensure this
>> as far as possible. Sometimes however conflicting interests (new users
>> vs old users for example) makes it impossible.
>
> (Please note that I'm not the author of the quote in your answer.)
Hi Bastien,
Yes, I am aware of that. Sorry if I gave an impression that you do not
know about the effort I mentioned. I am sure you do.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: use-file-dialog
2008-02-22 23:54 ` use-file-dialog admin
@ 2008-02-23 1:06 ` Bastien
2008-02-23 0:11 ` use-file-dialog Lennart Borgman (gmail)
2008-02-23 16:43 ` use-file-dialog Reiner Steib
2008-02-24 15:24 ` use-file-dialog Kevin Rodgers
2 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2008-02-23 1:06 UTC (permalink / raw)
To: admin@mmri.us; +Cc: help-gnu-emacs
"admin@mmri.us" <admin@mmri.us> writes:
> Where the heck can I get use-file-dialog in the settings in order to
> switch OFF this annoying popup file selection window.
C-h v use-file-dialog RET
Will let you customize this.
> Is it not possible to have the settings remain in the user's .emax
> directory in order that upgrades do not reset all the previous
> settings?
This is the case.
> Emacs is very configurable, but at least the user settings must be
> remembered accross versions.
Same here...
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: use-file-dialog
2008-02-23 0:11 ` use-file-dialog Lennart Borgman (gmail)
@ 2008-02-23 1:44 ` Bastien Guerry
2008-02-23 0:59 ` use-file-dialog Lennart Borgman (gmail)
0 siblings, 1 reply; 11+ messages in thread
From: Bastien Guerry @ 2008-02-23 1:44 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: help-gnu-emacs
Hi Lennart,
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> Bastien wrote:
>>> Emacs is very configurable, but at least the user settings must be
>>> remembered accross versions.
>
> A very big effort is put into the development of Emacs to ensure this
> as far as possible. Sometimes however conflicting interests (new users
> vs old users for example) makes it impossible.
(Please note that I'm not the author of the quote in your answer.)
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: use-file-dialog
2008-02-22 23:54 ` use-file-dialog admin
2008-02-23 1:06 ` use-file-dialog Bastien
@ 2008-02-23 16:43 ` Reiner Steib
2008-02-24 15:24 ` use-file-dialog Kevin Rodgers
2 siblings, 0 replies; 11+ messages in thread
From: Reiner Steib @ 2008-02-23 16:43 UTC (permalink / raw)
To: help-gnu-emacs
On Sat, Feb 23 2008, admin@mmri.us wrote:
> Where the heck can I get use-file-dialog in the settings in order to switch
> OFF this annoying popup file selection window.
> Cant a developer have a tickbox with the option on this popup menu to leave us
> with CLI file open?
The file dialog pops up only when using menus or tool bar buttons. If
you use `C-x C-f', you won't see it.
,----[ <f1> v use-file-dialog RET ]
| use-file-dialog is a variable defined in `src/fns.c'.
| Its value is t
|
| Documentation:
| *Non-nil means mouse commands use a file dialog to ask for files.
| This applies to commands from menus and tool bar buttons even when
| they are initiated from the keyboard. The value of `use-dialog-box'
| takes precedence over this variable, so a file dialog is only used if
| both `use-dialog-box' and this variable are non-nil.
|
| You can customize this variable.
`----
> Every time I install a system I have to change this for every user and it is
> always difficult to find.
> Is it not possible to have the settings remain in the user's .emax directory
> in order that upgrades do not reset all the previous settings?
> Emacs is very configurable, but at least the user settings must be remembered
> accross versions.
What's wrong with (setq use-file-dialog nil) in `~/.emacs' (or use
customize)?
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: use-file-dialog
2008-02-22 23:54 ` use-file-dialog admin
2008-02-23 1:06 ` use-file-dialog Bastien
2008-02-23 16:43 ` use-file-dialog Reiner Steib
@ 2008-02-24 15:24 ` Kevin Rodgers
2 siblings, 0 replies; 11+ messages in thread
From: Kevin Rodgers @ 2008-02-24 15:24 UTC (permalink / raw)
To: help-gnu-emacs
admin@mmri.us wrote:
> Every time I install a system I have to change this for every user and
> it is always difficult to find.
> Is it not possible to have the settings remain in the user's .emax
> directory in order that upgrades do not reset all the previous settings?
> Emacs is very configurable, but at least the user settings must be
> remembered accross versions.
You can put customizations into default.el or site-start.el, which are
shared by all users. Those files can be located in the
/usr/local/share/emacs/site-lisp directory, which is shared by all Emacs
versions.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-02-24 15:24 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 10:21 Bind RET to command Florian Lindner
2008-02-21 11:31 ` Tassilo Horn
2008-02-21 11:32 ` Michael Hoffman
[not found] ` <mailman.7735.1203593497.18990.help-gnu-emacs@gnu.org>
2008-02-22 17:55 ` Ralf Angeli
2008-02-22 23:54 ` use-file-dialog admin
2008-02-23 1:06 ` use-file-dialog Bastien
2008-02-23 0:11 ` use-file-dialog Lennart Borgman (gmail)
2008-02-23 1:44 ` use-file-dialog Bastien Guerry
2008-02-23 0:59 ` use-file-dialog Lennart Borgman (gmail)
2008-02-23 16:43 ` use-file-dialog Reiner Steib
2008-02-24 15:24 ` use-file-dialog Kevin Rodgers
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).