Next Previous Contents

## 11. Tips and Tricks

This section currently contains just one tip on how to combine TkDesk and XEmacs. If you have any procs or other stuff in your configuration file which you consider could be useful for others as well, or just think it's generally cool, please send me an email, so that I can add it to this section! Thanks!

## 11.1 TkDesk and XEmacs

If you are using XEmacs 19.12 or later you can couple TkDesk and XEmacs quite closely together by adding the following proc into any of your configuration files (I have it in "Popups"):

> `

>     proc xemacs_load {what {where same}} {
>         switch $where {
>             "same" {
>                 exec gnudoit -q (find-file \"$what\")
>             }
>             "other" {
>                 exec gnudoit -q (find-file-other-window \"$what\")
>             }
>             "frame" {
>                 exec gnudoit -q (find-file-other-frame \"$what\")
>             }
>             "scratch" {
>                 exec gnudoit -q (switch-to-buffer-other-frame \"*scratch*\")
>             }
>         }
>     }

> `

And now my generic popup menu for files matching `*` reads:

> `

>         {{*} {
>             {{Edit} {dsk_edit %s}}
>             {{XEmacs} {xemacs_load %s}}
>             {{Other Window} {xemacs_load %s other}}
>             {{Other Frame} {xemacs_load %s frame}}
>             -
>             {{Print} {dsk_print %s}}
>         }}

> `

This way you can load files from TkDesk into a running XEmacs! This assumes that you have the command `gnudoit` somewhere in your path, and have started the XEmacs server. This can be done by adding the following line to your `~/.emacs`:

> `

>     (gnuserv-start)

> `

Next Previous Contents