[Pmwiki-users] Re: Emacs and simultaneous edits

chr@home.se chr
Sun Oct 31 13:13:22 CST 2004


On Sun, 31 Oct 2004, Patrick R. Michaud wrote:

> On Sun, Oct 31, 2004 at 08:15:56PM +0100, chr at home.se wrote:
> > Right now I can only edit existing pages using pmwiki-mode. If I try to 
> > create a new page, the emacs buffer shows this:
> > 	<br />
> > 	<b>Notice</b>:  Undefined index:  text in 
> > 	<b>/home/chr/public_html/wiki/pmwiki.php</b> on line <b>1018</b><br />
> > and the response of the http-post action pasted at the end.
> > 
> > Any ideas? Does pmwiki-mode have to do something differently when trying 
> > to edit a page that does not already exist?
> 
> No, the issue is PHP's silly habit of returning warnings whenever the
> program attempts to access a non-existent index in an array, combined
> with the fact that the pmwiki-devel releases have error notices turned
> on.  I'll need to add an '@' in front of the expression on line 1018
> (done, will be in next release).

Neato. Works at pmwiki.org now.

> > <b>Notice</b>:  Undefined index:  HTTP_USER_AGENT in 
> > <b>/home/chr/public_html/wiki/pmwiki.php</b> on line <b>470</b><br />
> 
> This indicates that your program isn't sending a User-Agent: header
> when it does the POST of the text.  I don't know if that's absolutely
> required, but I'll go ahead and configure PmWiki to not give the warning
> if it's not there.

Or I could add some string to my post action? The code looks like this:

		     (http-post
		      (pmwiki-loc 'base) ;; Get destination
		      (list (cons "pagename" pagename)
			    (cons "action" "edit")
			    (cons "post" "1")
			    (cons "diffclass" diffclass)
			    (cons "author" pmwiki-author)
			    (cons "text" (buffer-string)))
		      'iso-8859-1
		      headers)))))

so I suspect it's just a matter of inserting something like:

			    (cons "User-Agent" "Emacs/pmwiki-mode")

Does those strings look ok to you?

/Christian

-- 
Christian Ridderstr?m, +46-8-768 39 44               http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list