all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs22: set the input method to latin-1-prefix
@ 2007-10-01 13:51 Ulrich Scholz
  2007-10-01 16:08 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ulrich Scholz @ 2007-10-01 13:51 UTC (permalink / raw)
  To: help-gnu-emacs

Dear all,

C-\ sets the input method to latin-1-prefix.  Now I want the initial
input method (right after starting Emacs) to be latin-1-prefix.  Can
I
do that by customization?

[So - as I understand it - I don't want to change the setting of
default-input-method.  Rather I want it to be used right from the
start.  Am I right?]

I tried to place (toggle-input-method) in my .emacs but to no effect.

Thanks, Ulrich

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

* Re: Emacs22: set the input method to latin-1-prefix
  2007-10-01 13:51 Emacs22: set the input method to latin-1-prefix Ulrich Scholz
@ 2007-10-01 16:08 ` Eli Zaretskii
  2007-10-01 18:47 ` Reiner Steib
  2007-10-01 19:23 ` Joost Kremers
  2 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2007-10-01 16:08 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Ulrich Scholz <d5@thispla.net>
> Date: Mon, 01 Oct 2007 06:51:17 -0700
> 
> C-\ sets the input method to latin-1-prefix.  Now I want the initial
> input method (right after starting Emacs) to be latin-1-prefix.  Can
> I do that by customization?

Why bother? "C-u C-\" will prompt for an input method, and you can
then choose whichever you like.

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

* Re: Emacs22: set the input method to latin-1-prefix
  2007-10-01 13:51 Emacs22: set the input method to latin-1-prefix Ulrich Scholz
  2007-10-01 16:08 ` Eli Zaretskii
@ 2007-10-01 18:47 ` Reiner Steib
  2007-10-01 19:23 ` Joost Kremers
  2 siblings, 0 replies; 8+ messages in thread
From: Reiner Steib @ 2007-10-01 18:47 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, Oct 01 2007, Ulrich Scholz wrote:

> C-\ sets the input method to latin-1-prefix.  Now I want the initial
> input method (right after starting Emacs) to be latin-1-prefix.  Can
> I do that by customization?

(set-input-method "latin-1-prefix")?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: Emacs22: set the input method to latin-1-prefix
  2007-10-01 13:51 Emacs22: set the input method to latin-1-prefix Ulrich Scholz
  2007-10-01 16:08 ` Eli Zaretskii
  2007-10-01 18:47 ` Reiner Steib
@ 2007-10-01 19:23 ` Joost Kremers
  2007-10-02  7:37   ` Ulrich Scholz
  2 siblings, 1 reply; 8+ messages in thread
From: Joost Kremers @ 2007-10-01 19:23 UTC (permalink / raw)
  To: help-gnu-emacs

Ulrich Scholz wrote:
> C-\ sets the input method to latin-1-prefix.  Now I want the initial
> input method (right after starting Emacs) to be latin-1-prefix.  Can
> I do that by customization?

i could be wrong, but from what i understand about input methods, no, it's
not possible. when emacs starts, no input method is selected. since an
input method is always buffer-local, setting it in e.g. .emacs only sets if
for whatever buffer .emacs is executed in (if it's executed in a buffer at
all, i don't know.)

one way to more or less get what you want is to add a function setting your
desired input method to the various major mode hooks that you use.

the only alternative i see is to file a feature request...


-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

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

* Re: Emacs22: set the input method to latin-1-prefix
  2007-10-01 19:23 ` Joost Kremers
@ 2007-10-02  7:37   ` Ulrich Scholz
  2007-10-02  8:41     ` Joost Kremers
  2007-10-10 16:16     ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Ulrich Scholz @ 2007-10-02  7:37 UTC (permalink / raw)
  To: help-gnu-emacs

On Oct 1, 9:23 pm, Joost Kremers <joostkrem...@yahoo.com> wrote:
> Ulrich Scholz wrote:
> i could be wrong, but from what i understand about input methods, no, it's
> not possible

Thanks for you explanation.

For a feature request I deem my personal wish too small.

But I would be grateful if someone could point me to a small,
practical example how to set the default input method by a function
and add this function to a major mode hook. Or - even better - give me
a small code snippet.

Thanks,

Ulrich

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

* Re: Emacs22: set the input method to latin-1-prefix
  2007-10-02  7:37   ` Ulrich Scholz
@ 2007-10-02  8:41     ` Joost Kremers
  2007-10-02 11:42       ` Ulrich Scholz
  2007-10-10 16:16     ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Joost Kremers @ 2007-10-02  8:41 UTC (permalink / raw)
  To: help-gnu-emacs

Ulrich Scholz wrote:
> But I would be grateful if someone could point me to a small,
> practical example how to set the default input method by a function
> and add this function to a major mode hook. Or - even better - give me
> a small code snippet.

to create a function to set the input method:

(defun my-set-default-input-method ()
  (set-input-method 'latin-1-prefix))

then to add it to a hook:

(add-hook 'text-mode-hook 'my-set-default-input-method)

read the section on hooks in the emacs manual for some more details.

HTH

-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

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

* Re: Emacs22: set the input method to latin-1-prefix
  2007-10-02  8:41     ` Joost Kremers
@ 2007-10-02 11:42       ` Ulrich Scholz
  0 siblings, 0 replies; 8+ messages in thread
From: Ulrich Scholz @ 2007-10-02 11:42 UTC (permalink / raw)
  To: help-gnu-emacs

Thank you.  With your help I did it.

Adding the function my-set-default-input-method directly to the text-
mode-hook does not work because this variable is re-set afterwards by
customization. So I added the function as new entry in the
customization interface.  Now it works fine.

Ulrich

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

* Re: Emacs22: set the input method to latin-1-prefix
  2007-10-02  7:37   ` Ulrich Scholz
  2007-10-02  8:41     ` Joost Kremers
@ 2007-10-10 16:16     ` Stefan Monnier
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2007-10-10 16:16 UTC (permalink / raw)
  To: help-gnu-emacs

> But I would be grateful if someone could point me to a small,
> practical example how to set the default input method by a function
> and add this function to a major mode hook. Or - even better - give me
> a small code snippet.

There are many files where I like to use greek letters and other funny math
symbols, via the TeX input method, so I add the following to the end of the
file:

 * Local Variables:
 * eval: (activate-input-method "TeX")
 * End:

and I then added

   (put 'activate-input-method 'safe-local-eval-function t)

to tell Emacs that the above `eval' can be executed without first asking me
for permission.


        Stefan

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

end of thread, other threads:[~2007-10-10 16:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-01 13:51 Emacs22: set the input method to latin-1-prefix Ulrich Scholz
2007-10-01 16:08 ` Eli Zaretskii
2007-10-01 18:47 ` Reiner Steib
2007-10-01 19:23 ` Joost Kremers
2007-10-02  7:37   ` Ulrich Scholz
2007-10-02  8:41     ` Joost Kremers
2007-10-02 11:42       ` Ulrich Scholz
2007-10-10 16:16     ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.