/usr/lib/swi-prolog/dotfiles/edit is in swi-prolog-nox 5.10.4-3ubuntu1.
This file is owned by root:root, with mode 0o755.
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 | #!/bin/bash -f
#
# Ask PceEmacs to edit files for me. To use this package, make sure
# xpce-client is installed in your path and one XPCE process runs PceEmacs
# as a server. One way to do that is to put the following in your X
# startup:
#
# xterm -iconic -title 'PceEmacs server' -e xpce -g emacs_server
#
# Author: Jan Wielemaker
# Copying: GPL-2
usage()
{ echo "usage: `basename $0` file[:line]"
exit 1
}
line=""
if [ -z "$HOST" ]; then HOST=`hostname`; fi
server="$HOME/.xpce_emacs_server.$HOST"
if [ ! -S "$server" ]; then
server="$HOME/.xpce_emacs_server"
if [ ! -S "$server" ]; then
echo "No PceEmacs server"
exec emacs "$*"
fi
fi
file="$1"
case "$file" in
"") usage
;;
[~/]*) ;;
*) file=`pwd`/$file ;;
esac
case "$file" in
*:[0-9]*)
eval `echo $file | sed 's/\(.*\):\([0-9]*\)$/file=\1;line=\2/'`
;;
esac
if [ "$line" = "" ]; then
cmd="edit('$file')"
else
cmd="edit('$file', $line)"
fi
xpce-client $server -bc "$cmd"
if [ $? = 2 ]; then exec emacs $*; fi
|