Euro symbol inconvenience... suggestions?

173 views
Skip to first unread message

mic...@michaelteter.com

unread,
Mar 15, 2017, 11:05:27 AM3/15/17
to Ledger
Hi all.

I'm new to ledger-cli, and I am using Emacs Ledger mode to enter my transactions.  Most of my transactions are in Euros, and while I can use option-shift-2 on my Mac in normal text boxes, Emacs doesn't approve.  

So I followed suggestions somewhere and made a euro function that I have to meta-x call every time I enter a transaction.  This is really a drag on my entry speed, and I'm hoping someone can suggest how I can improve my workflow/tools.

Suggestions?

Thanks in advance!

Marcin Borkowski

unread,
Mar 15, 2017, 1:21:57 PM3/15/17
to ledge...@googlegroups.com
Hi,

you can of course bind your function to whichever key you like
(e.g. with M-x local-set-key, M-x global-set-key or in your init.el),
but notice that you may also press C-x 8 * E (not that this is an
extremely convenient binding;-) ).

> Thanks in advance!

Best,

--
Marcin Borkowski

Erik Hetzner

unread,
Mar 15, 2017, 3:04:04 PM3/15/17
to ledge...@googlegroups.com
In general, in emacs, I'd do

`C-x (` to start a keyboard macro
`C-x 8 * E` (as Marcin said)
`C-x )` to stop the keyboard macro
`C-x C-k n euro` to name the macro
Open your `.emacs` file
`C-u M-x insert-kbd-macro`

This will create a reusable keyboard macro that is bound to a keystroke that you can use.

You could also use the `latin-9-prefix` input method (https://www.gnu.org/software/emacs/manual/html_node/emacs/Input-Methods.html) and use ~e


That said, you can also just use `EUR` as your currency symbol, or even `E` :)

best, Erik



--

---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcin Borkowski

unread,
Mar 15, 2017, 4:09:41 PM3/15/17
to ledge...@googlegroups.com

On 2017-03-15, at 20:04, Erik Hetzner <ehet...@gmail.com> wrote:

> In general, in emacs, I'd do
>
> `C-x (` to start a keyboard macro
> `C-x 8 * E` (as Marcin said)
> `C-x )` to stop the keyboard macro
> `C-x C-k n euro` to name the macro
> `C-x C-k b` to bind the macro to a key (e.g. C-c e) (see
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html#Key-Binding-Conventions
> )
> Open your `.emacs` file
> `C-u M-x insert-kbd-macro`
>
> This will create a reusable keyboard macro that is bound to a keystroke
> that you can use.

If you want to go that route, in recent Emacsen it is easier to start
and stop recording a keyboard macro with <f3> and <f4> respectively.

Best,

--
Marcin Borkowski

Craig Earls

unread,
Mar 15, 2017, 4:22:36 PM3/15/17
to ledge...@googlegroups.com
I would just wait a few years then you'll probably be back to your national currency. 

--

---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Craig, Corona De Tucson, AZ
missile_flyout
enderw88.wordpress.com

John Wiegley

unread,
Mar 15, 2017, 4:47:53 PM3/15/17
to Marcin Borkowski, ledge...@googlegroups.com
>>>>> "MB" == Marcin Borkowski <mb...@mbork.pl> writes:

>> I'm new to ledger-cli, and I am using Emacs Ledger mode to enter my
>> transactions. Most of my transactions are in Euros, and while I can use
>> option-shift-2 on my Mac in normal text boxes, Emacs doesn't approve.

I just end up using EUR, although it doesn't display as nicely.

--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2

thierry

unread,
Mar 15, 2017, 6:39:46 PM3/15/17
to Ledger
I am not sure it will help, but here I am using a French keyboard, and typing AltGr+E is producing € (AltGr is Right Alt, just right to space bar). And ledger does manage very nicely the € symbol in its output.

Thierry

Ben Finney

unread,
Mar 15, 2017, 7:01:50 PM3/15/17
to ledge...@googlegroups.com
mic...@michaelteter.com writes:

> I'm new to ledger-cli, and I am using Emacs Ledger mode to enter my
> transactions. Most of my transactions are in Euros, and while I can
> use option-shift-2 on my Mac in normal text boxes, Emacs doesn't
> approve.

Many responses have ignored this part, but I'd really like to know: How
can we make Emacs accept the character from the operating system's input
method?

Typing the Euro character as Michael describes should send that event to
any program, and Emacs should be no different in this. How can we make
Emacs respond correctly to character input?

--
\ “I went to the hardware store and bought some used paint. It |
`\ was in the shape of a house.” —Steven Wright |
_o__) |
Ben Finney

Craig Earls

unread,
Mar 15, 2017, 7:04:49 PM3/15/17
to ledge...@googlegroups.com
That is an emacs question. Perhaps asking over on an emacs specific venue would gehave better answers

--

---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mic...@michaelteter.com

unread,
Mar 15, 2017, 8:11:30 PM3/15/17
to Ledger
True, I guess the real problem to address is why Emacs doesn't understand my €.

But amongst the good suggestions, I'll probably just use E for now.

Thanks everyone!

mic...@michaelteter.com

unread,
Mar 15, 2017, 8:27:48 PM3/15/17
to Ledger
I can answer my own question now.  How could I forget that Emacs uses my Option key for Meta...?

There was a suggestion on http://emacs.stackexchange.com/a/17552/13908 that works well for my situation:
(setq ns-alternate-modifier 'meta)
(setq ns-right-alternate-modifier 'none)
That allows me to use my right Option key as the standard Mac Option key, so now I can Opt-Shift-2 for €.  :)

Yuval Hager

unread,
Mar 18, 2017, 8:15:19 PM3/18/17
to ledge...@googlegroups.com
On 03/15/2017 03:39 PM, thierry wrote:
> I am not sure it will help, but here I am using a French keyboard, and
> typing AltGr+E is producing € (AltGr is Right Alt, just right to space
> bar).

AltGr+5 produces € for me (US keyboard, Linux)
Reply all
Reply to author
Forward
0 new messages