It does not work. What is strange is that if I put (defun souligne () (interactive)
(insert "_{}") (forward-char -1))
(global-set-key "z" 'souligne) when I press "z", emacs write "_{}" !!!
So in emacs, I try to M-x global-unset-key then _ but it does not work in emacs. the button _ still works !!!
I also wanted to press ^ and get ^{} and press $ and have $ $ but it not works !
Notice that for ( ) or {} it works fine
2) my second question is about an historical file and menu.Is it possible that emacs have a menu with the last 10 files that I opened ?
If you can help me, I would be very happy thx Etienne
Thorsten Jolitz
unread,
Aug 31, 2012, 8:20:08 PM8/31/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to help-gn...@gnu.org
Just a curiosity - I'm currently writing an Emacs mode for the
PicoLisp-Wiki that requires exactly this syntax:
,----
| _{}
| ^{}
| !{}
`----
(and quite a few others ...)
Are we, just by casuality, working on the same thing without being
aware of it?
My mode is almost done and lets you insert and fontificate these
constructs. I only need to add a few commands. I probably publish a Beta
version this weekend on Github, will announce it here on the list.
--
cheers,
Thorsten
David Young
unread,
Aug 31, 2012, 11:54:25 PM8/31/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Thorsten Jolitz, help-gn...@gnu.org
I tried this with skeleton, and got similar problems. I cannot trigger the abbrev with _ character even it do listed in the abbrev list.
But when I bound the abbrev to character i, it works fine.
(define-skeleton underscore
"when I type _, Emacs writes _{}" "" "_{}" )
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
> (global-set-key "_" 'souligne)
> It does not work. What is strange is that if I put
> (global-set-key "z" 'souligne)
> when I press "z", emacs write "_{}" !!!
What does C-h k _ tell you? Can it be you're using a major mode which
already redefines the _ key to something else (hence the global-set-key
doesn't have any effect there)?
> 2) my second question is about an historical file and menu.Is it possible
> that emacs have a menu with the last 10 files that I opened ?
Have you tried recentf-mode?
Stefan
Stefan Monnier
unread,
Sep 1, 2012, 9:19:19 AM9/1/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
> I tried this with skeleton, and got similar problems. I cannot trigger the
> abbrev with _ character even it do listed in the abbrev list.
_ is not a char with word-syntax, so you'll need to use an abbrev-table
where you've provided a :regexp argument that explains which chars can
be considered.
Stefan
etienne
unread,
Sep 11, 2012, 4:15:05 AM9/11/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Help-gn...@gnu.org
Dear Thorsten,
I am not working on your stuff. I am only an emacs user :)
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Help-gn...@gnu.org
Dear Stephan,
thank you for your reply,
The answer of emacs to C-h k _ is
*
runs the command souligne, which is an interactive Lisp function in
`init.el'.
It is bound to _.
(souligne)
Not documented.*
Recall that in my .emacs file I have
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Help-gn...@gnu.org
Dear Stefan,
you must be right because when I press _ on a standard file (like the
tutorial) then it write _{} as I expect but this not work in a latex file
because I you said I use an other mode.
What should be I do to use this shortcut ?
Here is the line of my .emacs file about latex and auctex
(setq reftex-plug-into-AUCTeX t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
(require 'reftex)
(setq TeX-PDF-mode nil) ; remove pdflatex by defaut
(setq LaTeX-math-mode t) ; set Latex-math-mode