This file is indexed.

/etc/tkdesk/Popups is in tkdesk 2.0-9.2+b3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
### -------------------------------------------------------------------------
###
###  Popups (TkDesk Configuration File)
###
###  This file defines the file-specific popup-menus that are accessed
###  by pressing the right mouse button in any of TkDesk's file lists.
###  Also the popup menu of the "Copy" dialog is defined here.
###
###  *** Press F5 to save changes and reload this file into TkDesk, 
###  *** F6 to do the same plus to close this window.
###
### -------------------------------------------------------------------------

### In this file four Tcl lists are defined: One for directories, one for
### executables and one for all other files.  The fourth defines the
### popup menu contained in the "Copy, Move, Link" dialog.

### Definition of Popup-Menus:
### The Popup-Menus are defined by the elements of a Tcl list.
### (In the following I try to explain its structure, although it will
### probably best to just have a look at the example definition below.)
### Each element of the list is again a Tcl list, whose first element
### contains a list of "glob" patterns. If a file matches any of these
### patterns, this entry will be used for its popup menu. The second
### element defines the entries of the popup menu, by a set of (usually)
### 2-element lists. The first element is the entry's label, while the
### second contains a Tcl script to execute when this menu entry is
### invoked. Cascaded menus are currently not possible.
### The first menu entry of each popup menu defines the default action,
### which will be invoked when a matching file is double-clicked.
###
### TkDesk commands that can be used in the list definition:
### (Only the most common ones are listed here. For a complete overview
### and a detailed explanation refer to the User's Guide.)
###
### dsk_exec cmd ...   : Executes shell command cmd in background.
### dsk_path_exec path cmd ... : Execute cmd in path.
### dsk_view cmd ...   : Executes cmd, displays output in Editor window.
### dsk_open_dir path  : Opens a new file list for directory path.
### dsk_open_browser path    : Opens a new file browser for directory path.
### dsk_edit file      : Edits file.
### dsk_print file     : Prints file.
### dsk_cd path        : Changes directory of browser to path.
### dsk_du path        : Displays disk usage of directory path.
### dsk_periodic cmd seconds : Executes cmd every x seconds.
### dsk_confirm text script  : Executes script when confirmation was positive.
### dsk_read_string label script  : Executes script when entered string is
###                      not empty. "label" will be displayed in the dialog.
### dsk_sound id       : Plays sound id (defined in config-file Sounds). 
### dsk_cbhelp file regexp   : Invokes TkDesk's help system on file.
### dsk_ask_exec       : Asks for a command to execute.
### dsk_ask_dir        : Asks for a directory to open.
### dsk_save_config    : Saves window layout, history, bookmarks etc.
### dsk_exit ?ask?     : Quits TkDesk. "ask" may be one 1 or 0.
###
### Abbreviations that will be replaced with file names etc.:
###
### %s : Full pathname of the first selected file.
### %f : Its filename only.
### %b : "Basename": just the filename without extension.
### %d : Its directory only.
### %B : Same as %A, but will be replaced with "" if no files are selected.
### %A : List containing full pathnames of all selected resp. dropped files.
### %D : Directory of last "active" viewer.
### %x : Current X selection.
###
### The very first Button provides access to a few functions of TkDesk,
### like history menus, configuration menu etc. Its labels are mostly
### "internally reserved" keywords.
### The second button is only defined by the magic word "date" which inserts
### TkDesk's date display at that place into the AB.
###

### Definition of Popup-Menus for Directories:
### (You should better not change the first, i.e. default entry...!)

set tkdesk(popup,directories) {
    {{RCS} {
        {{Check Out...} {jdb_rcs_co %d}}
        {{Open} {dsk_cd %s}}
	{{New Window} {dsk_open_dir %s}}
	{{New Browser} {dsk_open_browser %s}}
	-
	{{Disk Usage} {dsk_du %s}}
	{{Start XTerm here} {
	    cd %s
	    eval exec $tkdesk(cmd,xterm) &
	    cd ~  ;# this is the standard workdir of TkDesk
	}}
	{{Make tar.gz} {dsk_exec tar cf - -C %d %f | gzip >[string_replace %s " " "_"].tar.gz}}	
    }}
    {{*} {
	{{Open} {dsk_cd %s}}
	{{New Window} {dsk_open_dir %s}}
	{{New Browser} {dsk_open_browser %s}}
	-
	{{Find...} {dsk_find_files -path %s}}
	{{Disk Usage} {dsk_du %s}}
	{{Start XTerm here} {
	    cd %s
	    eval exec $tkdesk(cmd,xterm) &
	    cd ~  ;# this is the standard workdir of TkDesk
	}}
	-
	{{Make tar.gz} {dsk_exec tar cf - -C %d %f | gzip >[string_replace %s " " "_"].tar.gz}}	
	{{Make zip} {dsk_exec zip -r %s.zip %f}}
	{{Which deb} {dsk_view dpkg -S %s}}
    }}
}

### Definition of Popup-Menus for Executables:
### (If the label of one of the entries is "Edit" it will only be added to the
### menu if the executable is script, ie. the first two characters are #!. 
### If you want an "Edit" entry for all executables just change "Edit" to 
### anything else, e.g. "Do Edit" or "Edit the file!".)

set tkdesk(popup,executables) {
    {{*.class} {
	{{Execute in Xterm} {eval dsk_exec $tkdesk(cmd,xterm) -sb -T %f -n %f -e pauseme java %b}}
    	{{Execute} {dsk_exec java %b}}
	{{View Output} {dsk_view java %b}}
    }}
    {{{*.tcl} {*.tk}} {
	{{Source} {source %s}}
	{{Execute} {dsk_exec %s}}
	{{Execute in Xterm} {eval dsk_exec $tkdesk(cmd,xterm) -sb -T %f -n %f -e pauseme %s}}
	{{View Output} {dsk_view %s}}
	-
	{{Edit} {dsk_edit %s}}
    }}
    {{*} {
	{{Execute} {dsk_exec %s}}
	{{Execute in Xterm} {eval dsk_exec $tkdesk(cmd,xterm) -sb -T %f -n %f -e pauseme %s}}
	{{View Output} {dsk_view %s}}
	{{Manual Page} {dsk_view man %f | col -b}}
	-
	{{Edit} {dsk_edit %s}}
	{{Strip} {dsk_exec strip %s}}
	{{Libraries} {dsk_view ldd %s}}
	{{Which deb} {dsk_view dpkg -S %s}}
    }}
}

###
### Definition of Popup-Menus for "Regular" (and other) Files:

set tkdesk(popup,regulars) {
    {{{*-HOWTO} {*-HOWTO.gz}} {
    	{{View (cbhelp)} {dsk_cbhelp %s howto}}
    	{{Edit} {dsk_edit %s}}
    }}
    {{{Makefile} {Gmakefile} {makefile}} {
        {{Make...} {
	    dsk_read_string {Make Target:} {
		eval dsk_exec $tkdesk(cmd,xterm) -sb -geom 80x15 -T \\"make $dsk_read_string\\" -e pauseme make -f %s $dsk_read_string
	    }
        }}
        {{Make Default} {
	    eval dsk_exec $tkdesk(cmd,xterm) -sb -geom 80x15 -T "make" -e pauseme make -f %s
        }}
	-
	{{Edit} {dsk_edit %s}}
	{{XEmacs} {xemacs_load %s}}
	{{Other Window} {xemacs_load %s other}}
	{{Other Frame} {xemacs_load %s frame}}
	-
        {{Check In... (RCS)} {jdb_rcs_ci %s}}
	{{Print...} {dsk_print %s}}
    }}
    {{{*.a} {*.o} {*.sl}} {
    	{{List Symbols} {dsk_view nm %s}}
    	{{List Matches...} {
    	    dsk_read_string {List Symbols Matching (RegExp):} {
    	    	dsk_view nm %s | grep $dsk_read_string
    	    }
    	}}
    }}
    {{{*.c} {*.h} {*.cpp} {*.tcl}} {
	{{Edit} {dsk_edit %s}}
	{{XEmacs} {xemacs_load %s}}
	{{Other Window} {xemacs_load %s other}}
	{{Other Frame} {xemacs_load %s frame}}
	-
        {{Check In... (RCS)} {jdb_rcs_ci %s}}
	{{Print} {dsk_print %s}}
    }}
    {{*.class} {
	{{Execute in Xterm} {eval dsk_exec $tkdesk(cmd,xterm) -sb -T %f -n %f -e pauseme java %b}}
    	{{Execute} {dsk_exec java %b}}
	{{View Output} {dsk_view java %b}}
    }}
    {{core} {
    	{{Strings in Header...} {dsk_view head %s | od -s -A x}}
    }}
    {{*.deb} {
        {{Info } {dsk_view dpkg --info %s}}
        -
        {{Install} {eval dsk_exec_as_root $tkdesk(cmd,xterm) -sl 256 -T "dpkg -i %f" -e pauseme "dpkg -i %s"}}
        {{List Contents} {dsk_view dpkg-deb -c %s}}
        {{Extract} {dsk_exec dpkg-deb -x %s ./}}
    }}    
    {{{*.diff} {*.patch}} {
    	{{Apply here } {eval dsk_exec $tkdesk(cmd,xterm) -sb -T \\"patch from %f\\" -n patch -e pauseme sh -c \\"patch <%s\\"}}
    	{{Edit/View} {dsk_edit %s}}
    	{{Print} {dsk_print %s}}
    }}
    {{{*.diff.gz} {*.patch.gz}} {
    	{{Apply here } {eval dsk_exec $tkdesk(cmd,xterm) -sb -T "patch from %f" -n patch -e pauseme sh -c \\"gzip -cd %s | patch\\"}}
    	{{Edit/View} {dsk_edit %s}}
    }}
    {{*.dvi} {
    	{{View} {dsk_exec xdvi -paper a4 -s 3 %s}}
    	{{Print} {dsk_print %s}}
    	{{-> Postscript } {dsk_exec dvips %s}}
    }}
    {{{*.gif} {*.jpg} {*.jpeg} {*.bmp} {*.pcx} {*.p?m} {*.rle} {*.tif} {*.tga} {*.png}} {
	{{View (xview)} {dsk_exec xview -quiet %s}}
	{{Background (tiled)} {dsk_exec xsetbg %s}}
	{{Background (expand)} {dsk_exec xsetbg -fullscreen %s}}
    }}
    {{{*.html} {*.htm}} {
    	{{Netscape (new window)} {dsk_netscape file %s window}}
	{{Netscape (reuse window)} {dsk_netscape file %s}}
    	{{Lynx} {eval dsk_exec $tkdesk(cmd,xterm) -e lynx %s}}
	{-}
    	{{Edit} {dsk_edit %s}}
	{{XEmacs} {xemacs_load %s}}
	{{Other Window} {xemacs_load %s other}}
	{{Other Frame} {xemacs_load %s frame}}
    }}
    {{*.java} {
      	{{Edit} {dsk_edit %s}}
      	{{Compile} {eval dsk_exec $tkdesk(cmd,xterm) -sb -geom 80x15 -T [list "javac %f"] -e pauseme javac %s}}
      	-
      	{{Print} {dsk_exec groff -Tps -mandoc %s | $tkdesk(cmd,print)}}
    }} 
    {{{*.man} {*.[1-8n]}} {
      	{{View} {dsk_view groff -Tascii -mandoc %s | col -b}}
      	{{Edit} {dsk_edit %s}}
      	{{Print (Postscript)} {dsk_exec groff -Tps -mandoc %s | $tkdesk(cmd,print)}}
    }}
    {{{*.man.gz} {*.[1-8n].gz}} {
      	{{View} {dsk_view gzip -cd %s | groff -Tascii -mandoc | col -b}}
      	{{Edit} {dsk_edit %s}}
      	{{Print (Postscript)} {dsk_exec gzip -cd %s | groff -Tps -mandoc | $tkdesk(cmd,print)}}
    }}
    {{{*.man.Z} {*.[1-8n].Z}} {
      	{{View} {dsk_view zcat %s | groff -Tascii -mandoc | col -b}}
      	{{Edit} {dsk_edit %s}}
      	{{Print (Postscript)} {dsk_exec zcat %s | groff -Tps -mandoc | $tkdesk(cmd,print)}}
    }}
    {{{*.mov} {*.avi}} {
        {{View} {dsk_exec xanim %s}}
    }}
    {{{*.mpg} {*.mpeg}} {
	{{View} {dsk_exec mpeg_play %s 2>/dev/null}}
	{{View (big)} {dsk_exec mpeg_play -dither 2x2 %s 2>/dev/null}}
	{{View (gray)} {dsk_exec mpeg_play -dither gray %s 2>/dev/null}}
    }}
    {{{*.ps} {*.eps}} {
    	{{View (ghostview)} {dsk_exec ghostview -a4 -magstep 1 %s}}
    	{{View (gv)} {dsk_exec gv %s}}
    	{{Print} {dsk_print %s}}
        -
        {{Odd Pages -> ...odd.ps} {dsk_exec psselect -o %s %d/%b.odd.ps}}
        {{Even Pages -> ...even.ps} {dsk_exec psselect -e %s %d/%b.even.ps}}
        {{Two-page doc -> ...2.ps} {dsk_exec psnup -pa4 -2 %s %d/%b.2.ps}}
        -
        {{ps -> eps} {dsk_exec gs -sDEVICE=epswrite -sOutputFile=%b.eps %s}}
        -
        {{Edit} {dsk_edit %s}}
        {{Compress (gzip)} {dsk_exec gzip %A}}
    }}
    {{*.pdf} {
    	{{View (acroread)} {dsk_exec acroread %s}}
      	{{Edit} {dsk_edit %s}}
    }}
    {{{*.ps.gz} {*.ps.Z}} {
    	{{View (ghostview)} {
	     dsk_exec gzip -cd %s | ghostview -a4 -magstep 1 -
	}}
    	{{Print} {dsk_exec gzip -cd %s | $tkdesk(cmd,print)}}
	-
	{{Uncompress} {dsk_exec gzip -d %s}}
    }}
    {{*.rpm} {
       {{Query} {dsk_view rpm -qip %s}}
       {{File List} {dsk_view rpm -qlp %s}}
       {{Full Query} {dsk_view rpm -qiRlp %s}}
       {{Install} {dsk_view rpm -U %s}}
       -
       {{Test} {dsk_view sh -c "rpm -i --test %s 2>&1 && echo 'Test Successful'"}} 
    }}
    {{*.tar} {
      	{{List Contents} {dsk_view tar tvf %s}}
      	{{Short Listing} {dsk_view tar tf %s}}
	-
      	{{Extract} {dsk_exec tar xf %s}}
      	{{Extract to /} {dsk_exec tar xf %s -C /}}
      	{{Extract to /usr/tmp} {dsk_exec tar xf %s -C /usr/tmp}}
    }}
    {{{*.tar.bz2} {*_tar.bz2} {*.tb2}}  {
        {{List Contents} {dsk_view bzip2 -cd %s | tar tvf - | sort +5}}
        {{Short Listing} {dsk_view bzip2 -cd %s | tar tf - | sort}}
        {{Uncompressed Size } {dsk_view bzip2 -l %s}}
        -
        {{Extract} {dsk_exec bzip2 -cd %s | tar xpf -}}
        {{Extract to /} {dsk_exec bzip2 -cd %s | tar xpf - -C /}}
        {{Extract to /usr/tmp} {dsk_exec bzip2 -cd %s | tar xpf - -C /usr/tmp}}
    }}
    {{{*.tar.z} {*.tar.Z} {*.taz} {*.t.Z}} {
      	{{List Contents} {dsk_view zcat %s | tar tvf - | sort +5}}
      	{{Short Listing} {dsk_view zcat %s | tar tf - | sort}}
	-
      	{{Extract} {dsk_exec zcat %s | tar xpf -}}
      	{{Extract to Subdir} {
      		set err [catch {exec mkdir %d/%b} errmsg]
      		if !$err {
      		  dsk_exec sh -c "zcat %s | (cd %d/%b; tar xpvf -)"
      		  dsk_cd %d/%b
      		} else {
      		  cb_error $errmsg
      		}
      	}}
      	{{Extract to /} {dsk_exec zcat %s | tar xpf - -C /}}
      	{{Extract to /usr/tmp} {dsk_exec zcat %s | tar xpf - -C /usr/tmp}}
	-
	{{Open XSelected} {
	    dsk_busy
	    set err [catch {
		eval exec zcat %s | tar xf - -C $tkdesk(tmpdir) %x
	    } errmsg]
	    dsk_lazy
            if {!$err} {
		if [file readable $tkdesk(tmpdir)/%x] {
		    dsk_open "" $tkdesk(tmpdir)/%x
		    exec rm -r $tkdesk(tmpdir)/%x
		}
	    } else {
		dsk_msg_error $errmsg
	    }
        }}
    }}
    {{{*.tar.gz} {*.tgz}} {
      	{{List Contents} {dsk_view gzip -cd %s | tar tvf - | sort +5}}
      	{{Short Listing} {dsk_view gzip -cd %s | tar tf - | sort}}
	{{Uncompressed Size } {dsk_view gzip -l %s}}
	-
      	{{Extract} {dsk_exec gzip -cd %s | tar xpf -}}
      	{{Extract to Subdir} {
      		set err [catch {exec mkdir %d/%b} errmsg]
      		if !$err {
      		  dsk_exec sh -c "gzip -cd %s | (cd %d/%b; tar xpvf -)"
      		  dsk_cd %d/%b
      		} else {
      		  cb_error $errmsg
      		}
      	}}
      	{{Extract to /} {dsk_exec gzip -cd %s | tar xpf - -C /}}
      	{{Extract to /usr/tmp} {dsk_exec gzip -cd %s | tar xpf - -C /usr/tmp}}
	-
	{{Open XSelected} {
	    dsk_busy
	    set err [catch {
		eval exec gzip -cd %s | tar xf - -C $tkdesk(tmpdir) %x
	    } errmsg]
	    dsk_lazy
            if {!$err} {
		if [file readable $tkdesk(tmpdir)/%x] {
		    dsk_open "" $tkdesk(tmpdir)/%x
		    exec rm -r $tkdesk(tmpdir)/%x
		}
	    } else {
		dsk_msg_error $errmsg
	    }
        }}
    }}
    {{*.url} {
    	{{Netscape (new window)} {dsk_netscape url [exec cat %s] window}}
	{{Netscape (reuse window)} {dsk_netscape url [exec cat %s]}}
    	{{Lynx} {eval dsk_exec $tkdesk(cmd,xterm) -e lynx [string trimleft [exec cat %s] file:]}}
	{-}
    	{{Edit} {dsk_edit %s}}
    }}
    {{{*.voc} {*.wav} {*.au}} {
    	{{Play } {
	    if {[info exists tkdesk(soundcmd)]} {
		if {$tkdesk(soundcmd) != ""} {
		    catch {eval exec [format $tkdesk(soundcmd) %s]}
		}
	    } else {
		cb_alert {Don't know how to play a sound. Edit the "Sounds" config file to tell me how.}
	    }
	}}
    }}
    {{*.xbm} {
	{{View (xview)} {dsk_exec xview -quiet %s}}
	{{Edit (bitmap)} {dsk_exec bitmap %s}}
	{{Edit ASCII} {dsk_edit %s}}
    }}
    {{*.xpm} {
	{{View (xview)} {dsk_exec xview -quiet %s}}
	{{View (sxpm)} {dsk_exec sxpm %s}}
	{{Edit (pixmap)} {dsk_exec pixmap -filename %s}}
	{{Edit ASCII} {dsk_edit %s}}
    }}
    {{{*.z} {*.Z}} {
	{{Edit} {dsk_edit %s}}
	{{Uncompress} {dsk_exec gzip -d %s}}
    }}
    {{*.gz} {
	{{Edit} {dsk_edit %s}}
	{{Uncompressed Size } {dsk_view gzip -l %s}}
	-
	{{Uncompress} {dsk_exec gzip -d %s}}
    }}
    {{*.bz2} {
        {{Edit} {dsk_edit %s}}
        {{Uncompressed Size } {dsk_view bzip2 -l %s}}
        -
        {{Uncompress} {dsk_exec bzip2 -d %s}}
    }}
    {{{*.zip}} {
        {{List Contents} {dsk_view unzip -l %s}}
        -
        {{Extract} {dsk_exec unzip %s}}
        {{Extract to /} {dsk_exec unzip %s -d /}}
        {{Extract to /usr/tmp} {dsk_exec unzip %s -d /usr/tmp}}
    }}
    {{*} {
	{{Edit} {dsk_edit %s}}
	{{XEmacs} {xemacs_load %s}}
	{{Other Window} {xemacs_load %s other}}
	{{Other Frame} {xemacs_load %s frame}}
	-
	{{Open Directory} {dsk_open_dir %d}}
	{{Print...} {dsk_print %s}}
	{{Mail to...} {dsk_mail %s}}
	{{Which deb} {dsk_view dpkg -S %s}}
    }}
}


### (fileops,popup):
### Defines the popup menu of the "Copy, Move, Link" dialog.
### For this list, the following shortcuts are available in addition
### to the "usual" ones (see top of this file):
###
### %S : Selected files or file entered in the "File" entry field
### %T : File/directory entered in the "Destination" entry field.

set tkdesk(fileops,popup) {
    {{Link (symbolic)} {
	dsk_exec $tkdesk(cmd,symln) %S %T
    }}
    {{Link (hard)} {
    	dsk_exec $tkdesk(cmd,ln) %S %T
    }}
    {-}
    {{Tar (create)} {
	set l {}
	foreach lf [list %S] {
		lappend l [file tail \$lf]
	}
	eval dsk_exec tar cvf %T \$l
    }}
    {{Tar (append)} {
	set l {}
	foreach lf [list %S] {
		lappend l [file tail \$lf]
	}
	eval dsk_exec tar rvf %T \$l
    }}
    {{Untar} {
        set ext [file extension %S]
	if {\$ext == ".gz" || \$ext == ".Z"} {
	    dsk_bgexec {sh -c "gzip -cd %S | (cd %T; tar xvf -)"} {Untaring %f...}
	} else {
	    dsk_bgexec {sh -c "cd %T; tar xvf %S"} {Untaring %f...}
	}
    }}
    {-}
    {{Diff} {
	dsk_view diff -bc %S %T
    }}
    {{Patch} {
	dsk_path_exec %T $tkdesk(cmd,xterm) -sb -T \\"patch from %f\\" -n patch -e pauseme sh -c \\"patch <%S\\"
    }}
    {{Concatenate} {
	dsk_exec cat %S >%T
    }}
}


# ---------------------------------------------------------------------------
# xemacs_load what ?where?
# An improved proc provided by Erez Strauss (erez@newplaces.com) to
# communicate with a running XEmacs.  For this to work you need to put the
# lines:
# (gnuserv-start)
# (require 'ange-ftp)
# into your ~/.emacs.  The second line allows for FTP through XEmacs.
# $what is the file that is to be loaded, $where may be: same, other, frame.

proc xemacs_load {what {where same}} {

    catch {auto_reset}        
    if ![dsk_auto_execok "gnudoit"] {
        dsk_errbell
        cb_error "Couldn't find gnudoit.  Maybe you don't have XEmacs installed?"
        return
    }
    
    switch $where {
        "same" {
            set func find-file
            # exec gnudoit -q (find-file \"$what\")
        }
        "other" {
            set func find-file-other-window
            # exec gnudoit -q (find-file-other-window \"$what\")
        }
        "frame" {
            set func find-file-other-frame
            # exec gnudoit -q (find-file-other-frame \"$what\")
        }
        "scratch" {
            set func switch-to-buffer-other-frame
            set what {*scratch*}
            # exec gnudoit -q (switch-to-buffer-other-frame \"*scratch*\")
        }
    }
    set err [catch { exec gnudoit -q ($func \"$what\") }]
    if $err {
        if {[cb_yesno "XEmacs is not yet running on your display. Start it now
	?"] == 0} {
            # start new xemacs
            eval dsk_exec xemacs $what
        }
    }
}