Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* gimp-mode.el (gimp-selector): Add ESC as binding to cancel the

selector + mention it under ?. Mention binding of ?c to
gimp-cl-connect under ?.
(gimp-first-run-action): Save input ring when gimp is closed
externally.
(gimp-buffer): Just (get-buffer "*GIMP*") if process is finished.
(run-gimp): clear gimp-output before going any further. This
closes the bug "Wrong argument: sequencep Copyright" (or something
like that..).

* gimp-mode.el, gimp-install.el: change default gimp
version from 2.4 to 2.6
  • Loading branch information...
commit 6086e6b1d1aa73953b33fde17a23ba0e1d8d0326 1 parent 4b932c7
sharik authored
View
23 ChangeLog
@@ -1,3 +1,26 @@
+2008-10-05 Niels Giesen <sharik@localhost>
+
+ * gimp-mode.el (gimp-selector): Add ESC as binding to cancel the
+ selector + mention it under ?. Mention binding of ?c to
+ gimp-cl-connect under ?.
+ (gimp-first-run-action): Save input ring when gimp is closed
+ externally.
+ (gimp-buffer): Just (get-buffer "*GIMP*") if process is finished.
+ (run-gimp): clear gimp-output before going any further. This
+ closes the bug "Wrong argument: sequencep Copyright" (or something
+ like that..).
+
+ * gimp-mode.el, gimp-install.el: change default gimp
+ version from 2.4 to 2.6
+
+2008-08-24 Niels Giesen <sharik@localhost>
+
+ * gimp-init.el (magic-mode-alist): when the string "gimp" is part
+ of buffer-file-name (anywhere) AND filename ends in ".scm",
+ gimp-mode will be activated. This effectively means any scheme
+ script distributed with the GIMP, or that is in your
+ gimp-configuration directory will use gimp-mode.
+
2008-08-03 Niels Giesen <sharik@localhost>
* gimp-mode.el (gimp-snippets): drop radio snippet, as the param
View
23 fud.el
@@ -27,7 +27,7 @@
;; TinyScheme implementation shipped with the GIMP, but its design is
;; such that it could in principle work with any scheme.
;;
-;; It's basis is setting break-points. It can also parse the output
+;; Its basis is setting break-points. It can also parse the output
;; of fud.scm, and provides
;; `fud-set-breakpoint' set a breakpoint around a sexp.
@@ -123,10 +123,16 @@
(insert (fud-breakpoint-begin))
(forward-sexp 1)
(insert (fud-breakpoint-end))
-;; (save-excursion
-;; (fud-toplevel)
-;; (gimp-send-last-sexp))
- )
+(save-excursion
+ (fud-toplevel)
+ (gimp-send-last-sexp)))
+
+(defun fud-mouse-set-breakpoint ()
+ "Set a fud breakpoint with the mouse."
+ (interactive)
+ (let ((event (read-event)))
+ (mouse-set-point event)
+ (fud-set-breakpoint)))
(defun fud-remove-breakpoint ()
"Remove breakpoint a point."
@@ -146,10 +152,9 @@
(delete-backward-char
(- (field-end (point))
(field-beginning (point)))))
- ;; (save-excursion
-;; (fud-toplevel)
-;; (gimp-send-last-sexp))
-)
+ (save-excursion
+ (fud-toplevel)
+ (gimp-send-last-sexp)))
(defun fud-update-breakpoints (&optional beg end)
"Update breakpoints for sexp before point."
View
2  fud.scm
@@ -129,7 +129,7 @@
;; INPUT
(case (char-downcase (read-char))
;; Go...
- ((#\s)
+ ((#\g)
(display "Continued... (fud-trace) to trace again")
(newline)
(return (eval (car ',form))))
View
10 gimp-init.el
@@ -1,4 +1,4 @@
-;;; gimp-init.el --- $Id: gimp-init.el,v 1.17 2008-08-01 17:38:06 sharik Exp $
+;;; gimp-init.el --- $Id: gimp-init.el,v 1.18 2008-10-05 08:07:25 sharik Exp $
;; Copyright (C) 2008 Niels Giesen.
;; Author: Niels Giesen <nielsforkgiesen@gmailspooncom, but please
@@ -61,6 +61,14 @@
(add-to-list 'auto-mode-alist
'("\\(s-f-\\|script-fu\\).*\\.scm\\'" . gimp-mode))
+(defun gimp-script-p ()
+ "Return t when current buffer holds a GIMP script."
+ (when (string-match "gimp.*\.scm\\'" (buffer-file-name))
+ t))
+
+(add-to-list 'magic-mode-alist
+ '(gimp-script-p . gimp-mode))
+
;; auto-insert-alist is *not* automatically loaded in a vanilla
;; session... force by toggling:
(auto-insert-mode)
View
56 gimp-install.el
@@ -1,4 +1,4 @@
-;;; gimp-install.el --- $Id: gimp-install.el,v 1.8 2008-08-03 22:03:07 sharik Exp $
+;;; gimp-install.el --- $Id: gimp-install.el,v 1.9 2008-10-05 08:07:25 sharik Exp $
;; Copyright (C) 2008 Niels Giesen.
;; Author: Niels Giesen <nielsforkgiesen@gmailspooncom, but please
@@ -62,8 +62,8 @@ For more information consult the file README."
(if (eq window-system 'w32)
(format "C:/Documents and Settings/%s/%s"
user-login-name
- ".gimp-2.4/")
- "~/.gimp-2.4/")))))
+ ".gimp-2.6/")
+ "~/.gimp-2.6/")))))
(gimp-emacs-dir (expand-file-name (concat gimp-dir "/emacs/")))
(emacs-interaction.scm "emacs-interaction.scm")
(emacs-interaction.scm-target
@@ -74,14 +74,14 @@ For more information consult the file README."
emacs-interaction.scm)
"/")))
-;; (fud.scm "fud.scm")
-;; (fud.scm-target
-;; (expand-file-name
-;; (mapconcat 'identity
-;; (list gimp-dir
-;; "scripts"
-;; fud.scm)
-;; "/")))
+ (fud.scm "fud.scm")
+ (fud.scm-target
+ (expand-file-name
+ (mapconcat 'identity
+ (list gimp-dir
+ "scripts"
+ fud.scm)
+ "/")))
(gimp-init-file (concat gmd "gimp-init.el")))
(unless (file-exists-p gimp-emacs-dir)
@@ -107,23 +107,23 @@ For more information consult the file README."
(setq done t))
(error (message "%s" (error-message-string err)))))))
-; (message "Installing %s..." fud.scm-target)
-;; (let (done
-;; (funs (if (fboundp 'make-symbolic-link)
-;; '(make-symbolic-link copy-file)
-;; '(copy-file))))
-;; (dolist (fun '(make-symbolic-link copy-file))
-;; (unless done
-;; (condition-case err
-;; (progn
-;; (apply fun
-;; (list
-;; (expand-file-name
-;; (concat gmd fud.scm))
-;; fud.scm-target
-;; t))
-;; (setq done t))
-;; (error (message "%s" (error-message-string err)))))))
+ (message "Installing %s..." fud.scm-target)
+ (let (done
+ (funs (if (fboundp 'make-symbolic-link)
+ '(make-symbolic-link copy-file)
+ '(copy-file))))
+ (dolist (fun '(make-symbolic-link copy-file))
+ (unless done
+ (condition-case err
+ (progn
+ (apply fun
+ (list
+ (expand-file-name
+ (concat gmd fud.scm))
+ fud.scm-target
+ t))
+ (setq done t))
+ (error (message "%s" (error-message-string err)))))))
(progn
(find-file-literally (concat gmd "gimp-vars.el"))
View
7 gimp-mode.el
@@ -1,4 +1,4 @@
-;;; gimp-mode.el --- $Id: gimp-mode.el,v 1.49 2008-10-05 08:07:25 sharik Exp $
+;;; gimp-mode.el --- $Id: gimp-mode.el,v 1.50 2008-10-05 08:09:09 sharik Exp $
;; Copyright (C) 2008 Niels Giesen
;; Author: Niels Giesen <nielsforkgiesen@gmailspooncom, but please
@@ -63,7 +63,8 @@
(require 'ring)
(require 'snippet)
(require 'scheme-complete)
- (require 'fud))
+;; (require 'fud)
+ )
;;;; Structure
(defgroup gimp nil "Customization group for GIMP (script-fu) programming."
:group 'shell
@@ -739,7 +740,7 @@ buffer."
(destructuring-bind (version major minor)
(gimp-string-match
"\\([0-9]+\\)\.\\([0-9]+\\)"
- "$Id: gimp-mode.el,v 1.49 2008-10-05 08:07:25 sharik Exp $" )
+ "$Id: gimp-mode.el,v 1.50 2008-10-05 08:09:09 sharik Exp $" )
(if (interactive-p)
(prog1 nil
(message "GIMP mode version: %s.%s" major minor))
View
13 gimpmode.muse
@@ -18,7 +18,7 @@
This version adds a betabetabeta version of =FUD=, meaning the Fu Debugger. It is however not yet set up by default yet (as it is *very* beta, as in "don't expect it to work" (actually it does...) and would break the client mode right now). With FUD, you can define breakpoints and instruct functions for stepping, poking at the environment at run-time &c.
-Uncomment the =(require 'fud)= *before* compilation to experience a bit of what lies ahead. Also, symlink or copy the file fud.scm to =~/.gimp-2.[45]/scripts/=. See contents of =fud.scm= and =fud.el= for ponters. Expect more =FUD= in about three weeks time. First vacation.
+Uncomment the =(require 'fud)= in =gimp-mode.el= *before* compilation to experience a bit of what lies ahead. Also, symlink or copy the file fud.scm to =~/.gimp-2.[45]/scripts/=. See contents of =fud.scm= and =fud.el= for pointers. Expect more =FUD= in about three weeks time. First vacation.
- gimp-mode.el (gimp-snippets): drop radio snippet, as the param
type does not exist
@@ -137,7 +137,7 @@ To overcome the problem of not being able to interact with the GIMP as a subproc
The features the client mode (as opposed to the truly inferior mode) currently lacks are:
- tracing.
- - scheme functions =display=, =write= and any derivatives do not work.
+ - scheme functions =display=, =write= and any derivatives do not work. For these exact reasons, the FU Debugger does not work in this mode.
Note: behaviour when using both modes together is unspecified (what a lovely fall-back that word is...) and unsupported (although I do use it when developing the client mode the trick is to first run =M-x run-gimp=, start the server, and then run =M-x gimp-cl-connect=).
@@ -201,7 +201,8 @@ If you want to hook into a running GIMP session as a client (this is the only me
[[screenshots/script-fu-server.png][Start up the server from the Gimp]]
-Gimp Mode sets up buffers to to automatically use gimp-mode when the file begins with "s-f-" or "script-fu-" and ends with ".scm" (just ending in "scm" does *not* suffice, as it would be improper to impose gimp-mode on any scheme file). There are other ways, such as to put:
+Gimp Mode sets up buffers to to automatically use gimp-mode when the file begins with "s-f-" or "script-fu-" and ends with ".scm" (just ending in "scm" does *not* suffice, as it would be improper to impose gimp-mode on any scheme file). Also any file ending in ".scm" and in a path containing the string "gimp" is automatically started in gimp-mode (as of v1.49). There are other ways, such as to put:
+
<example>
;; -*- mode: Gimp; -*-
@@ -217,9 +218,9 @@ If you have set `auto-insert' set to a non-nil value, gimp-mode will insert that
- Find a way to get to python/C stuff REGISTERED on procedure arguments. (such as: lower and upper bounds, step, precision, default values...) (this has already been done for script-fu)
- Test on an OSX box (interesting).
- Add completion on =script-fu-register=, =script-fu-menu-register=.
- - Add function for constructing a basic =script-fu-register= form from a define form.
+ - Add function for constructing a basic =script-fu-register= form from a =define= form.
- Make completion selection better (navigation and selection between candidates).
- - Show tracing in a separate buffer.
+ - Show tracing in a separate buffer (?).
- And of course I am open to suggestions
* Known Bugs
@@ -230,7 +231,7 @@ Please file any bugs you might find via =M-x gimp-report-bug RET=.
* Possibly Asked Questions
-Q. What was your incentive to write this?
+Q. What was your incentive to write Gimp Mode?
A. When writing a script for the GIMP, I found the discoverability to be quite low, existing interaction mechanisms clunky and, well, to be honest, I simply have the habit of writing an Emacs mode whenever I embark on any new project that can be handled by emacs and has not been handled be emacs yet -- or insufficiently. I have to admit that often this stops me from engaging in the project itself, becoming too absorbed in its interaction with emacs.

0 comments on commit 6086e6b

Please sign in to comment.
Something went wrong with that request. Please try again.