From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Sperber Subject: Re: org-babel and Xemacs incompatibilities Date: Mon, 07 Jun 2010 15:04:41 +0200 Message-ID: References: <7z1vdiztxi.fsf@vzell-de.de.oracle.com> <877hn2rudj.fsf@gmail.com> <7zsk5gqlhw.fsf@vzell-de.de.oracle.com> <7zsk5g9mph.fsf@vzell-de.de.oracle.com> <877hmrmrsy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=50076 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLc0Z-0005oh-2R for emacs-orgmode@gnu.org; Mon, 07 Jun 2010 09:04:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLc0T-0001MK-OW for emacs-orgmode@gnu.org; Mon, 07 Jun 2010 09:04:50 -0400 Received: from h615406.serverkompetenz.net ([81.169.143.132]:64890) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLc0T-0001LX-9l for emacs-orgmode@gnu.org; Mon, 07 Jun 2010 09:04:45 -0400 In-Reply-To: <877hmrmrsy.fsf@gmail.com> (Eric Schulte's message of "Tue, 25 May 2010 18:26:37 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable "Eric Schulte" writes: >> And two more >> >> o Symbol's function definition is void: assoc-default when trying to = display an image >> [...] >> o Symbol's function definition is void: make-temp-file when using org= -babel-dot >> [...] Both of these are in XEmacs 21.5, but not 21.4. As 21.4 is almost not moving anymore, it may not be worth the effort to add them to 21.4. (Volker would have to wait quite a while to get a 21.4 that works with this.) My suggestion is to leave org-mode and XEmacs 21.4 as is, and for Volker to copy the definitions from 21.5 to his init.el. (Attached.) Is this acceptable? --=20 Cheers =3D8-} Mike Friede, V=F6lkerverst=E4ndigung und =FCberhaupt blabla --=-=-= Content-Disposition: inline (defun assoc-default (key alist &optional test default) "Find object KEY in a pseudo-alist ALIST. ALIST is a list of conses or objects. Each element (or the element's car, if it is a cons) is compared with KEY by evaluating (TEST (car elt) KEY). If that is non-nil, the element matches; then `assoc-default' returns the element's cdr, if it is a cons, or DEFAULT if the element is not a cons. If no element matches, the value is nil. If TEST is omitted or nil, `equal' is used." (let (found (tail alist) value) (while (and tail (not found)) (let ((elt (car tail))) (when (funcall (or test 'equal) (if (consp elt) (car elt) elt) key) (setq found t value (if (consp elt) (cdr elt) default)))) (setq tail (cdr tail))) value)) (defun make-temp-file (prefix &optional dir-flag suffix) "Create a temporary file. The returned file name (created by appending some random characters at the end of PREFIX, and expanding against the return value of `temp-directory' if necessary), is guaranteed to point to a newly created empty file. You can then use `write-region' to write new data into the file. If DIR-FLAG is non-nil, create a new empty directory instead of a file. If SUFFIX is non-nil, add that at the end of the file name. This function is analagous to mkstemp(3) under POSIX, avoiding the race condition between testing for the existence of the generated filename (under POSIX with mktemp(3), under Emacs Lisp with `make-temp-name') and creating it." (let ((umask (default-file-modes)) (temporary-file-directory (temp-directory)) file) (unwind-protect (progn ;; Create temp files with strict access rights. It's easy to ;; loosen them later, whereas it's impossible to close the ;; time-window of loose permissions otherwise. (set-default-file-modes #o700) (while (condition-case () (progn (setq file (make-temp-name (expand-file-name prefix temporary-file-directory))) (if suffix (setq file (concat file suffix))) (if dir-flag (make-directory file) (write-region "" nil file nil 'silent nil 'excl)) nil) (file-already-exists t)) ;; the file was somehow created by someone else between ;; `make-temp-name' and `write-region', let's try again. nil) file) ;; Reset the umask. (set-default-file-modes umask)))) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--