You are not logged in.

#1 2008-06-19 19:55:21

scrawler
Member
Registered: 2005-06-07
Posts: 318

help me with gnuserv?

Hey guys,

I just updated my gnuserv PKGBUILD in the aur.  It
works fine, but only after I do some messing by hand.
I'd like to make it so that everything is done
automatically, the way it should be.

Right now I build it with makepkg, then go to the src
directory, copy gnuserv.el and gnuserv-compat.el to my
$HOME/emacs directory, and add a couple lines to my
.emacs.

what should I do to have all these files go where they
should without my interaction?

Oh, I also have (gnuserv start) in my .emacs, and that
also should be taken care of for me.

any ideas?

emacsclient does funny things with multiple desktops.
Start it anywhere and you either jump to the main emacs
buffer (with the buffer you want wherever you just were),
or the emacsclient frame jumps to whatever desktop the
main instance is on.

gnuclient doesn't do all this junk, so I like it much better.

Offline

#2 2008-06-19 21:19:17

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: help me with gnuserv?

The documentation says, that the .el  and .elc files should got to the sit-lisp directory, i.d. /usr/share/emacs/site-lisp on ArchLinux. The PKGBUILD can easyly put them there.

What do you put into your .emacs? You should hav an install file with some echo lines to inform the user what to put in there.

Offline

#3 2008-06-19 23:23:41

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: help me with gnuserv?

How does gnuserv handle the multiple desktop thing? I don't really like emacsclient for exactly the reason you mention. If gnuserv does something interesting I'll fix up the PKGBUILD.

Offline

#4 2008-06-20 00:00:49

scrawler
Member
Registered: 2005-06-07
Posts: 318

Re: help me with gnuserv?

gnuclient just acts like any other editor would.

I usually start emacs and leave it on desktop 10, minimized.  If I go to desktop three and enter "gnuclient file.txt",  a gnuclient frame just pops up all by its little self (quickly) and I can edit it.  closing is weird, but I'm used to it: M-x Shift 3.  Main Emacs stays hidden on 10 like it's supposed to.  I have scripts that gnuclient, it's the default editor for my rox-filer--it acts just like you would expect it to.  also, if you use a macro in gnuclient, then close it, the same macro will still be loaded and ready to go when you call gnuclient again.

Hey, vi might rule, but emacs rocks, and gnuserv makes it rock harder.

Offline

#5 2008-06-20 08:37:53

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: help me with gnuserv?

btw. gnuserv is on the "AUR cleanup day" list for deletion. Maybe you should drop a comment there, that it is not deprecated.

Offline

#6 2008-06-20 09:39:31

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: help me with gnuserv?

Here you go. A new PKGBUILD and gnuserv.install file.

PKGBUILD

pkgname=gnuserv
pkgver=3.12.8
pkgrel=1
pkgdesc="gnuserv with gnu emacs compatability layer"
arch=('i686' 'x86_64')
url="http://meltin.net/hacks/emacs/"
license="GPL"
depends=('bash')
makedepends=()
conflicts=()
replaces=()
backup=()
install="$pkgname.install"
source=(http://meltin.net/hacks/emacs/src/gnuserv-3.12.8.tar.gz)
md5sums=('3173682652726fa3685a4cf2193c27e4')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make prefix=$startdir/pkg/usr install
  mkdir -p $startdir/pkg/usr/share/emacs/site-lisp
  make prefix=$startdir/pkg/usr install-elisp
  cp gnuserv-compat.el{,c} $startdir/pkg/usr/share/emacs/site-lisp/
  cp devices.el{,c} $startdir/pkg/usr/share/emacs/site-lisp/  
}

gnuserv.install

post_install () {
echo ""
echo "==> To use gnuserv, add the following Lisp to your ~/.emacs file:"
echo "==> "
echo "==> (autoload 'gnuserv-start \"gnuserv-compat\""
echo "==>           \"Allow this Emacs process to be a server for client processes.\""
echo "==>           t)"
echo "==> "
echo "==> Then, run (gnuserv-start). This may be done in your ~/.emacs. See "
echo "==> /usr/share/emacs/site-lisp/gnuserv-compat.el for commentary."
echo ""
}

post_upgrade () {
        post_install $1
}

op=$1
shift
$op $*

Two points, I copied gnuserv-compat.* and devices.* into the site-lisp, since without these gnuserv won't run. Also, putting the (gnuserv-start) in a user's .emacs automatically is not safe. It's better to tell them what they need to do.

Regards.

Offline

#7 2008-06-20 10:56:42

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: help me with gnuserv?

Thank you, I will test later (not at my arch pc right now). BTW. I made the entry on the AUR Cleanup day list suggested above.

Offline

#8 2008-06-20 17:17:26

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: help me with gnuserv?

I now installed gnuserv using the new PKGBUILD. Unfortunately I got a message

Gnuserv process exited; restart with `M-x gnuserv-start'

Running gnuclient results in

gnuclient  file.tex
gnuclient: No such file or directory
gnuclient: unable to connect to local
[haawda@bertrand ~]$ which gnuclient
/usr/bin/gnuclient

Last edited by Stefan Husmann (2008-06-20 17:17:56)

Offline

#9 2008-06-20 17:32:31

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: help me with gnuserv?

Odd. What were you (or emacs) doing when the first message appeared? What version of emacs do you use? I'm using 22.2.1 here without any problems. Are you sure that you only have one gnuserv instance in your emacs load path?

Also, did you customize your .emacs as noted by the installation process? Did you run gnuserv-start before trying gnuclient? It certainly looks like you did, but it might be worthwhile checking that the configuration in .emacs is correct.

Good luck.

Offline

#10 2008-06-20 18:01:10

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: help me with gnuserv?

I have a cvs-version of emacs, build with my own PKGBUILD emacs-otf which I maintain in AUR. I put the lines in my .emacs as suggested and afterwards a (gnuserv-start)

(autoload 'gnuserv-start "gnuserv-compat"
             "Allow this Emacs process to be a server for client processes."
             t)
(gnuserv-start)

emacs was started in .xinitrc with a simple emacs&, but I also tried emacs --execute "(server-start)"&

Offline

#11 2008-06-20 18:26:34

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: help me with gnuserv?

OK, if you're using emacs-otf and it downloads emacs from cvs, then wouldn't that be emacs 23.x.x? I don't know if gnuserv has been tested with that. That said,  the PKGBUILD I made also installs gnuserv-compat.* and devices.* in /usr/share/emacs/site-lisp, since these do not come with emacs 22. Perhaps you do not need them for emacs 23 and they are causing problems. I would try removing these files from your site-lisp and then trying out gnuserv again.

Last edited by jbromley (2008-06-20 18:28:09)

Offline

#12 2008-06-20 20:00:47

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: help me with gnuserv?

Yes its is emacs 23.0.60.x, where x is changing but not always rising.

There are no *gnuserv* other than that from the gnuserv package on my system.

Offline

#13 2008-06-20 21:30:57

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: help me with gnuserv?

Did you try moving gnuserv-compat.* and devices.* out of your site-lisp? Perhaps there are some conflicts with code in emacs 23. Also, run your emacs and make sure you've done gnuserv-start. Then, take a look at your /tmp directory, there should be a gsrvdir<uid> directory where <uid> is your user ID from /etc/passwd. Take a look inside that directory to make sure there is a socket like the following:

srwx------ 1 jay users 0 2008-06-20 10:27 gsrv

The error you reported makes it seem like perhaps the socket doesn't exist or can't be opened by gnuclient. Wow, what I thought would be a simple PKGBUILD is turning out to be some work! I think I'm going to install the emacs-otf you are using and try it out here.

Regards.

Offline

#14 2008-06-21 01:07:37

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: help me with gnuserv?

If I move the device.* and gnuserv-compat* files away, what have I to write into .emacs? There is no variable temp-directory set then. With gnuserv-compat, it is correctly set to /tmp.

/tmp seems to keep untouched by starting emacs. No directories created.

Offline

#15 2008-06-21 20:29:15

scrawler
Member
Registered: 2005-06-07
Posts: 318

Re: help me with gnuserv?

you could always try the "cheating" way I did it.

the first line of my .emacs is
(setq load-path (cons (expand-file-name "~/emacs/elisp") load-path))

I also have the autoload blah blah lines in there.

I copied gnuserv-compat.el and gnuserv.el into my elisp directory.  That does the trick for me. It's not pretty, but oh well.

if I don't have (gnuserv-start) in my .emacs, or if I have to restart it for some reason, I just start it from emacs with M-x gnuserv-start.

Offline

#16 2008-06-21 22:30:42

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: help me with gnuserv?

I did a M-x gnuserv-start. It did not work. The elisp files are in the load-path, and they are loaded, but they do not work as expected.

Offline

Board footer

Powered by FluxBB