Re: [Chicken-users] using flymake with chicken
From: Daniel Leslie d...@ironoxide.ca Subject: Re: [Chicken-users] using flymake with chicken Date: Fri, 23 Nov 2012 14:09:34 -0800 Oh excellent! You may be able to remove the need for the shell script by running something like: (shell-command-to-string (format csi -SAv \%s\ || true option-or-filename)) That's right. I initially tested this on Windows, and I don't know wether cmd.exe supports this syntax (so I used a batch file). On Unixen, the command above is of course the simpler solution. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] using flymake with chicken
Also: is there a way to show the error message? I found flymake-display-err-menu-for-current-line, but that gives an annoying popup with the message, which is cut off so you can't read the most important parts. Oh, look: https://raw.github.com/illusori/emacs-flymake-cursor/master/flymake-cursor.el !!! There is nothing like emacs. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] using flymake with chicken
Felix scripsit: There is nothing like emacs. 'There's nothing like eating hay when you're faint,' he [the White King] remarked to her [Alice], as he munched away. 'I should think throwing cold water over you would be better,' Alice suggested: 'or some sal-volatile [smelling-salts, ammonium carbonate].' 'I didn't say there was nothing *better*,' the King replied. 'I said there was nothing *like* it.' Which Alice did not venture to deny. --Through The Looking Glass, chapter 7 -- There is no real going back. Though I John Cowan may come to the Shire, it will not seem co...@ccil.org the same; for I shall not be the same. http://www.ccil.org/~cowan I am wounded with knife, sting, and tooth, and a long burden. Where shall I find rest? --Frodo ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] using flymake with chicken
On Sat, Nov 24, 2012 at 08:21:05PM +0100, Felix wrote: Also: is there a way to show the error message? I found flymake-display-err-menu-for-current-line, but that gives an annoying popup with the message, which is cut off so you can't read the most important parts. Oh, look: https://raw.github.com/illusori/emacs-flymake-cursor/master/flymake-cursor.el !!! There is nothing like emacs. Indeed! 3 Cheers, Peter -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] using flymake with chicken
On Fri, Nov 23, 2012 at 08:27:32PM +0100, Peter Bex wrote: Suggestions are welcome. Flymake doesn't have default key bindings for going to the next/prev error. Maybe the mode can set up something like M-n and M-p to step between errors? Or does it make more sense to let the user do this so it can be customized consistently across languages that use flymake? Also: is there a way to show the error message? I found flymake-display-err-menu-for-current-line, but that gives an annoying popup with the message, which is cut off so you can't read the most important parts. Note that I'm not familiar with flymake itself, either. Cheers, Peter -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] using flymake with chicken
Oh excellent! You may be able to remove the need for the shell script by running something like: (shell-command-to-string (format csi -SAv \%s\ || true option-or-filename)) Thanks, -Dan On Fri, Nov 23, 2012 at 11:05 AM, Felix fe...@call-with-current-continuation.org wrote: Hello! Attached is a first go at flymake[1] support for Scheme code. It is derived from flymake-lua.el and very simple. Put chicken-flymake in your PATH, make it executable, load flymake-chicken.el into your emacs, open some .scm file and do M-x flymake-chicken-mode Now, lines containing scrutinizer warnings (and other errors that show a line number) are highlighted. I have not used this seriously yet, but it's sort of weirdly cool ... I have added the code to the git repository (see the scripts and misc subdirectories). Suggestions are welcome. cheers, felix [1] http://www.emacswiki.org/emacs/FlyMake flymake for CHICKEN ;; Taken from: ;; https://github.com/sroccaserra/emacs/blob/master/flymake-lua.el ;; ;; Flymake for Lua ;; ;; Usage: ;; (require 'flymake-lua) ;; (add-hook 'lua-mode-hook 'flymake-lua-load) ;; ;; Note: litterally stolen from Steve Purcell's Flymake Ruby. ;; See http://github.com/purcell/emacs.d/blob/master/site-lisp/flymake-ruby/flymake-ruby.el ;; (require 'flymake) (defgroup flymake-chicken nil Flymake Chicken Customizations) (defcustom flymake-chicken-program chicken-flymake How to invoke csc. :type 'file :group 'flymake-chicken) (defun flymake-create-temp-in-system-tempdir (filename prefix) (make-temp-file (or prefix flymake-chicken))) (defun flymake-chicken-init () (list flymake-chicken-program (list (flymake-init-create-temp-buffer-copy 'flymake-create-temp-in-system-tempdir (defvar flymake-chicken-allowed-file-name-masks '((\\.scm\\' flymake-chicken-init))) (defvar flymake-chicken-err-line-patterns '(( *(\\(.+\\):\\([0-9]+\\)) * 1 2) (\\(Error\\|Warning\\|Note\\): *(line \\([0-9.]*\\)) nil 2))) ;(defvar flymake-lua-err-line-patterns ; '((^.*luac[0-9.]*\\(.exe\\)?: *\\(.*\\):\\([0-9]+\\): \\(.*\\)$ ;2 3 nil 4))) ;;;###autoload (defun flymake-chicken-mode () (interactive) (when (and (not (null buffer-file-name)) (file-writable-p buffer-file-name)) (set (make-local-variable 'flymake-allowed-file-name-masks) flymake-chicken-allowed-file-name-masks) (set (make-local-variable 'flymake-err-line-patterns) flymake-chicken-err-line-patterns) (flymake-mode t))) (provide 'flymake-chicken) #!/bin/sh # # usage: chicken-flymake OPTION-OR-FILENAME ... csc -SAv $@ || true ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users