* Add a new tool-bar item in emacs
@ 2006-06-09 15:29 hrmadhu
2006-06-09 16:23 ` hrmadhu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: hrmadhu @ 2006-06-09 15:29 UTC (permalink / raw)
Hello:,
I'm using GNU Emacs 22.0.50.1 (powerpc-apple-darwin8.5.0) of
2006-03-22 on G5.local from
http://homepage.mac.com/zenitani/emacs-e.html
I'm trying to add a new button to the toolbar that will call
pdflatex when I hit it. The code I have so far is at the end of this
email.
It displays the button with the appropriate icon on the toolbar,
but when I click the button all i see in the message window is
"tool-bar-". If I click it again, then the message buffer says "
<tool-bar> <tool-bar> is undefined."
I believe this has something to do with the tool-bar-map, but I am
sure. I could use some help with this.
Thanks.
~Madhu.
---------------
code in .emacs:
(defun compile-if-latex-or-bibtex-file ()
(interactive)
(setq thefilename
( file-name-sans-versions buffer-file-name) )
(if (and (equal (file-name-extension thefilename) "tex")
(file-regular-p thefilename))
(save-window-excursion
(save-excursion
(shell-command (concat "pdflatex -interaction=nonstopmode
-dEmbedAllFonts=true " thefilename " & ")) () ) ) )
(if (and (equal (file-name-extension thefilename) ".bib")
(file-regular-p thefilename))
(save-window-excursion
(save-excursion
(shell-command (concat "bibtex " thefilename " & ")) () ) ))
)
(tool-bar-add-item "texshop" '(compile-if-latex-or-bibtex-file) nil
:help "Run pdflatex" )
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add a new tool-bar item in emacs
2006-06-09 15:29 Add a new tool-bar item in emacs hrmadhu
@ 2006-06-09 16:23 ` hrmadhu
2006-06-09 18:32 ` Peter Dyballa
[not found] ` <mailman.2806.1149877968.9609.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: hrmadhu @ 2006-06-09 16:23 UTC (permalink / raw)
(tool-bar-add-item "texshop" 'compile-if-latex-or-bibtex-file
'compile-if-latex-or-bibtex-file :help "Run pdflatex" )
seems to work.
YMMV
~Madhu.
hrmadhu@gmail.com wrote:
> Hello:,
> I'm using GNU Emacs 22.0.50.1 (powerpc-apple-darwin8.5.0) of
> 2006-03-22 on G5.local from
> http://homepage.mac.com/zenitani/emacs-e.html
> I'm trying to add a new button to the toolbar that will call
> pdflatex when I hit it. The code I have so far is at the end of this
> email.
> It displays the button with the appropriate icon on the toolbar,
> but when I click the button all i see in the message window is
> "tool-bar-". If I click it again, then the message buffer says "
> <tool-bar> <tool-bar> is undefined."
> I believe this has something to do with the tool-bar-map, but I am
> sure. I could use some help with this.
> Thanks.
> ~Madhu.
>
>
> ---------------
> code in .emacs:
>
>
> (defun compile-if-latex-or-bibtex-file ()
> (interactive)
> (setq thefilename
> ( file-name-sans-versions buffer-file-name) )
> (if (and (equal (file-name-extension thefilename) "tex")
> (file-regular-p thefilename))
> (save-window-excursion
> (save-excursion
> (shell-command (concat "pdflatex -interaction=nonstopmode
> -dEmbedAllFonts=true " thefilename " & ")) () ) ) )
> (if (and (equal (file-name-extension thefilename) ".bib")
> (file-regular-p thefilename))
> (save-window-excursion
> (save-excursion
> (shell-command (concat "bibtex " thefilename " & ")) () ) ))
> )
> (tool-bar-add-item "texshop" '(compile-if-latex-or-bibtex-file) nil
> :help "Run pdflatex" )
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add a new tool-bar item in emacs
2006-06-09 15:29 Add a new tool-bar item in emacs hrmadhu
2006-06-09 16:23 ` hrmadhu
@ 2006-06-09 18:32 ` Peter Dyballa
[not found] ` <mailman.2806.1149877968.9609.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2006-06-09 18:32 UTC (permalink / raw)
Cc: help-gnu-emacs list
Am 09.06.2006 um 17:29 schrieb hrmadhu@gmail.com:
> I'm trying to add a new button to the toolbar that will call
> pdflatex when I hit it.
Do you know AUCTeX? It's built into Carbon Emacs.
--
Greetings
Pete
»¿ʇı̣ əsnqɐ ʇ,uɐɔ noʎ ɟı̣
ɓuı̣ɥʇʎuɐ sı̣ pooɓ ʇɐɥʍ«
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add a new tool-bar item in emacs
[not found] ` <mailman.2806.1149877968.9609.help-gnu-emacs@gnu.org>
@ 2006-06-09 21:53 ` David Kastrup
2006-06-09 23:13 ` Peter Dyballa
0 siblings, 1 reply; 5+ messages in thread
From: David Kastrup @ 2006-06-09 21:53 UTC (permalink / raw)
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 09.06.2006 um 17:29 schrieb hrmadhu@gmail.com:
>
>> I'm trying to add a new button to the toolbar that will call
>> pdflatex when I hit it.
>
> Do you know AUCTeX? It's built into Carbon Emacs.
No, it isn't. It is built into the precompiled versions of Carbon
Emacs that are called Aquamacs and Yaced, though.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add a new tool-bar item in emacs
2006-06-09 21:53 ` David Kastrup
@ 2006-06-09 23:13 ` Peter Dyballa
0 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2006-06-09 23:13 UTC (permalink / raw)
Cc: help-gnu-emacs list
Am 09.06.2006 um 23:53 schrieb David Kastrup:
>> Do you know AUCTeX? It's built into Carbon Emacs.
>
> No, it isn't. It is built into the precompiled versions of Carbon
> Emacs that are called Aquamacs and Yaced, though.
I was thinking of the (Japanese) Carbon Emacs "Package" by Seiji
Zenitani et al. It hasn't been updated since March and the home page
is down, only this is still up: http://www.apple.com/downloads/macosx/
unix_open_source/carbonemacspackage.html (there was also a version
for Panther, Mac OS X 10.3, and below by Ringo).
--
Mit friedvollen Grüßen
Pete
UNIX is user friendly, it's just picky about who its friends are.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-09 23:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-09 15:29 Add a new tool-bar item in emacs hrmadhu
2006-06-09 16:23 ` hrmadhu
2006-06-09 18:32 ` Peter Dyballa
[not found] ` <mailman.2806.1149877968.9609.help-gnu-emacs@gnu.org>
2006-06-09 21:53 ` David Kastrup
2006-06-09 23:13 ` Peter Dyballa
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).