Browse files

Fix HISTORY file not to end in vaguaries. Add link to GIMP bug 583778…

… (@ that addresses the problem of not printing the evaluated value back.
  • Loading branch information...
1 parent 296ca33 commit 8901c33fbbb22696e2bdd61f164bdb540c9adc28 @pft committed Nov 7, 2009
Showing with 26 additions and 4 deletions.
  1. +26 −4 HISTORY
@@ -1,4 +1,20 @@
-;; ooh, how convolved this is...
+;; -*- mode: Gimp; -*-
+;;; This file describes the history of various parts of Gimp Mode.
+;;;; 1. History of `emacs-cl-output' macro.
+;; The problems this macro solves is twofold: first, the
+;; script-fu-server in GIMP does not print the return value after
+;; evaluation. Second, the evaluation is not part of the running
+;; scheme image. This macro will write back the evaluation to a file,
+;; to be read both by Emacs and GIMP itself.
+;; Note that the problem of not returning the result of evaluation is
+;; addressed in,
+;; with a working patch available and planned for taking a look at
+;; with version 2.8.
;; First try: make sure define'd stuff is loaded into the image
;; Major defect: double evaluation.
(define-macro (emacs-cl-output . body)
@@ -49,14 +65,20 @@
(with-output-to-emacs-file ,input-file
'(set! *emacs-cl-output* ,@body))
- (display "\n") ;apparently, any sexp at
+ (newline) ;apparently, any sexp at
;top-level needs some distance
;for the reader
(write '(with-output-to-emacs-file
(write *emacs-cl-output*)))
- (display "\n"))
+ (newline))
(load ,(make-emacs-file input-file)))))
-;; Seeing how involved this process is,
+;; Concluding: we let GIMP write two forms into a file. The fist form
+;; is to evaluate the initial input and put the result in a temporary
+;; variable (called `*emacs-cl-output*'). The second form is to write
+;; back this evaluation into a file to be read by Emacs.
+;; After that, GIMP loads the file, and thereby loads the initial
+;; input just once, leaving a file for Emacs to read the result from.

0 comments on commit 8901c33

Please sign in to comment.