Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125322 - app-emacs/httpd needs function: open-network-stream-server
Summary: app-emacs/httpd needs function: open-network-stream-server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-06 19:09 UTC by PL Hayes
Modified: 2006-05-15 09:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PL Hayes 2006-03-06 19:09:52 UTC
httpd.el needs the function open-network-stream-server to work, but this function is not included in emacs anymore. It certainly isn't in emacs-cvs and I doubt it exists in stable emacs either (it's not in my debian 21.4.1 version anyway).

The following elisp in my .emacs fixed it for me:

(unless (fboundp 'open-network-stream-server)
  (defun open-network-stream-server (proc buff port sentl filtr)
    "Compatibility function for httpd.el on newer emacsen"
    (make-network-process :server t
			  :name proc
			  :buffer buff
			  :host "localhost"
			  :service port
			  :sentinel sentl
			  :filter filtr)))
Comment 1 Matthew Kennedy (RETIRED) gentoo-dev 2006-04-26 11:00:50 UTC
Arch testers for amd64 ppc sparc and x86, please confirm the app-emacs/httpd-1.0-r1 ebuild builds so that this bug can be resolved.  Many thanks for the arch testing work :)
Comment 2 David Morgan 2006-04-26 16:53:28 UTC
It builds, and (load "/usr/share/emacs/site-lisp/httpd/httpd.el) runs fine, but when I do (httpd-start) I get

Symbol's function definition is void: make-network-process

Am I doing something stupid, or is something broken? (I'm not overly familar with elisp)
Comment 3 PL Hayes 2006-04-26 19:09:30 UTC
It turns out that neither open-network-stream-server nor make-network-process appear in my Debian emacs 21.4.1. If this is also true of the Gentoo emacs 21.4, then I don't think anything can be done to make httpd.el work. 

Michael Olson has made a more careful and better modification to httpd.el than I did in my .emacs file in his muse distribution: 
http://www.mwolson.org/projects/EmacsMuse.html so I'm using that now (but it still wouldn't work on emacs 21.4, of course). It's in the contrib directory.
Comment 4 Matthew Kennedy (RETIRED) gentoo-dev 2006-04-26 23:22:50 UTC
I commited a new ebuild for httpd-1.1.ebuild. it uses the httpd.el from Muse.  In the source, it says it works for emacs-21 and emacs-22 (cvs).  It works on my emacs-22 (cvs), but as you discovered, not in emacs-21.

  (setq httpd-process
	(if (fboundp 'make-network-process)
	    (make-network-process :name "httpd"
				  :buffer (generate-new-buffer "httpd")
				  :host 'local :service port
				  :server t :noquery t
				  :filter 'httpd-serve)
	  (and (fboundp 'open-network-stream-server)
	       (open-network-stream-server "httpd"
					   (generate-new-buffer "httpd")
					   port nil 'httpd-serve))))

make-network-process is the emacs-22 call, and open-network-stream-server is a mystery.  Its not in emacs-22 or emacs-21.4.1.
Comment 5 Matthew Kennedy (RETIRED) gentoo-dev 2006-04-26 23:33:56 UTC
Sorry for the confusion arch testers, it was premature to get you involved.

I dont think httpd.el works with emacs-21.
Comment 6 PL Hayes 2006-04-27 01:35:59 UTC
(In reply to comment #4)

> make-network-process is the emacs-22 call, and open-network-stream-server is a
> mystery.  Its not in emacs-22 or emacs-21.4.1.

Yes - it looks to me as though the author of httpd.el was using a snapshot of emacs when writing it: 
http://lists.gnu.org/archive/html/emacs-diffs/2004-09/msg00626.html and open-network-stream-server never made it into the actual 21.4 release or 22. So no Gentoo emacs is ever going to have it and

  (setq httpd-process
	(make-network-process :name "httpd"
			      :buffer (generate-new-buffer "httpd")
			      :host 'local :service port
			      :server t :noquery t
			      :filter 'httpd-serve))

would suffice.
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2006-05-07 13:27:42 UTC
mkennedy: what is going on with this?
Comment 8 Matthew Kennedy (RETIRED) gentoo-dev 2006-05-07 13:59:14 UTC
x86 people need to remove the only stable ebuild for this (httpd-1.0.ebuild) from portage.
Comment 9 Mark Loeser (RETIRED) gentoo-dev 2006-05-07 14:43:35 UTC
Put 1.0 back to ~x86.  if you want the ebuild completely removed, go for it :)
Comment 10 Matthew Kennedy (RETIRED) gentoo-dev 2006-05-15 09:19:17 UTC
Thanks.