<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>125322</bug_id>
          
          <creation_ts>2006-03-06 19:09 0000</creation_ts>
          <short_desc>app-emacs/httpd needs function: open-network-stream-server</short_desc>
          <delta_ts>2006-05-15 09:19:17 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>paul@wolfbone.ath.cx</reporter>
          <assigned_to>emacs@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>paul@wolfbone.ath.cx</who>
            <bug_when>2006-03-06 19:09:52 0000</bug_when>
            <thetext>httpd.el needs the function open-network-stream-server to work, but this function is not included in emacs anymore. It certainly isn&apos;t in emacs-cvs and I doubt it exists in stable emacs either (it&apos;s not in my debian 21.4.1 version anyway).

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

(unless (fboundp &apos;open-network-stream-server)
  (defun open-network-stream-server (proc buff port sentl filtr)
    &quot;Compatibility function for httpd.el on newer emacsen&quot;
    (make-network-process :server t
			  :name proc
			  :buffer buff
			  :host &quot;localhost&quot;
			  :service port
			  :sentinel sentl
			  :filter filtr)))</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mkennedy@gentoo.org</who>
            <bug_when>2006-04-26 11:00:50 0000</bug_when>
            <thetext>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 :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>david.morgan@gmail.com</who>
            <bug_when>2006-04-26 16:53:28 0000</bug_when>
            <thetext>It builds, and (load &quot;/usr/share/emacs/site-lisp/httpd/httpd.el) runs fine, but when I do (httpd-start) I get

Symbol&apos;s function definition is void: make-network-process

Am I doing something stupid, or is something broken? (I&apos;m not overly familar with elisp)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>paul@wolfbone.ath.cx</who>
            <bug_when>2006-04-26 19:09:30 0000</bug_when>
            <thetext>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&apos;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&apos;m using that now (but it still wouldn&apos;t work on emacs 21.4, of course). It&apos;s in the contrib directory.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mkennedy@gentoo.org</who>
            <bug_when>2006-04-26 23:22:50 0000</bug_when>
            <thetext>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 &apos;make-network-process)
	    (make-network-process :name &quot;httpd&quot;
				  :buffer (generate-new-buffer &quot;httpd&quot;)
				  :host &apos;local :service port
				  :server t :noquery t
				  :filter &apos;httpd-serve)
	  (and (fboundp &apos;open-network-stream-server)
	       (open-network-stream-server &quot;httpd&quot;
					   (generate-new-buffer &quot;httpd&quot;)
					   port nil &apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mkennedy@gentoo.org</who>
            <bug_when>2006-04-26 23:33:56 0000</bug_when>
            <thetext>Sorry for the confusion arch testers, it was premature to get you involved.

I dont think httpd.el works with emacs-21.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>paul@wolfbone.ath.cx</who>
            <bug_when>2006-04-27 01:35:59 0000</bug_when>
            <thetext>(In reply to comment #4)

&gt; make-network-process is the emacs-22 call, and open-network-stream-server is a
&gt; 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 &quot;httpd&quot;
			      :buffer (generate-new-buffer &quot;httpd&quot;)
			      :host &apos;local :service port
			      :server t :noquery t
			      :filter &apos;httpd-serve))

would suffice.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>halcy0n@gentoo.org</who>
            <bug_when>2006-05-07 13:27:42 0000</bug_when>
            <thetext>mkennedy: what is going on with this?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mkennedy@gentoo.org</who>
            <bug_when>2006-05-07 13:59:14 0000</bug_when>
            <thetext>x86 people need to remove the only stable ebuild for this (httpd-1.0.ebuild) from portage.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>halcy0n@gentoo.org</who>
            <bug_when>2006-05-07 14:43:35 0000</bug_when>
            <thetext>Put 1.0 back to ~x86.  if you want the ebuild completely removed, go for it :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mkennedy@gentoo.org</who>
            <bug_when>2006-05-15 09:19:17 0000</bug_when>
            <thetext>Thanks.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>