Git Product home page Git Product logo

quickrun's Introduction

melpa badge melpa stable badge jcs-elpa badge

quickrun.el

Introduction

quickrun.el is Emacs port of quickrun.vim.

CI

quickrun.el is a extension to execute editing buffer. quickrun.el is similar to executable-interpret, but quickrun.el provides more convenient commands. quickrun.el execute not only script languages(Perl, Ruby, Python etc), but also compiling languages(C, C++, Go, Java etc) and markup language.

Requirements

  • Emacs 24.3 or higher.

Installation

You can install quickrun.el from MELPA with package.el.

Or install directly:

$ cd load-path-dir
$ wget https://raw.githubusercontent.com/syohex/emacs-quickrun/master/quickrun.el

After Installation add following to your configuration file(~/.emacs.d/init.el, ~/.emacs etc)

(require 'quickrun)

Support Programming Languages

quickrun.el supports following programming languages and markup languages as default. But you can register your own command and apply other languages.

Programming Language(commands used)

  • Assembly Language (nasm, masm)
  • Applescript (osascript)
  • C (gcc / clang / Visual C++)
  • C++ (g++ / clang++ / Visual C++)
  • C# (dotnet / mono)
  • Objective-C (gcc -objc)
  • D Language (dmd)
  • Fortran (gfortran)
  • Java (javac / java)
  • Perl (perl)
  • Perl6 (perl6)
  • Ruby (ruby / mruby)
  • Python (python)
  • PHP (php)
  • Emacs Lisp (elisp)
  • Scheme (gosh)
  • Smalltalk (gst)
  • Racket (racket)
  • Common Lisp (clisp / sbcl / ccl)
  • Clojure (jark / clj-env-dir)
  • Javascript (node / v8 / js / jrunscript / cscript / deno)
  • Coffee Script (coffee)
  • JSX (jsx)
  • Markdown (Markdown.pl / bluecloth / kramdown / pandoc / redcarpet)
  • Haskell (runghc)
  • Go Language (go / gccgo)
  • Io (io)
  • Lua (lua)
  • Groovy (groovy)
  • Scala (scala) Please use UTF-8 encoding
  • HAML (haml)
  • SASS (sass)
  • LESS (lessc)
  • Erlang (escript)
  • OCaml (ocamlc)
  • F# (fsharpc)
  • ShellScript (shebang's shell)
  • AWK (awk)
  • Rust (rustc)
  • Dart (dart)
  • Elixir (elixir)
  • TypeScript (tsc)
  • Tcl (tclsh)
  • Swift (swift, xcrun)
  • ATS2 (patscc)
  • R (Rscript)
  • Nim/NimScript (nim)
  • Julia (julia)
  • Gnuplot (gnuplot)
  • Kotlin (kotlin)
  • Crystal (crystal)
  • V (v)
  • Zig (zig)

See also quickrun--support-languages global variable.

Basic Usage

quickrun

Execute current buffer. If quickrun.el does not find command-key, then quickrun.el asks you command-key(You always input command if you use C-u prefix key)

quickrun-select

Like quickrun command but select the backend before the execution.

quickrun-region

Execute region. (Java is not supported)

quickrun-with-arg

Execute current buffer with arguments. quickrun.el asks you command line argument

quickrun-shell

Execute current buffer in eshell for interactive command such as program which reads input from STDIN.

quickrun-compile-only

Compile current buffer with compile.el framework, not execute. quickrun with C-u C-u prefix behaves same as quickrun-compile-only.

quickrun-compile-only-select

Like quickrun-compile-only command but select the backend before the execution.

quickrun-replace-region

Replace region of code with its output.

quickrun-autorun-mode

Minor mode which executes quickrun after saving buffer.

helm-quickrun

M-x quickrun with helm interface

anything-quickrun

M-x quickrun with anything interface

Note

If quickrun returns command not found, please check (executable-find "THE_COMMAND_NAME") [for example (executable-find "gnuplot")] . If this returns nil, I strongly recommend you use https://github.com/purcell/exec-path-from-shell

Send File to STDIN

If executed_file.qrinput(like foo.c.qrinput) is existed in directory same as executed buffer file, quickrun.el sends its content to stdin of executed program. Please set quickrun-input-file-extension to nil If you want to disable this feature.

Customize

quickrun-focus-p(Default: t)

If this value is nil, quickrun.el does not move focus to output buffer.

quickrun-truncate-lines(Default: t)

The truncate-lines' value for quickrun` buffer.

User Defined Command

You can add your own command or override existsing command by quickrun-add-command as below.

;; Use this parameter as C++ default
(quickrun-add-command "c++/c1z"
  '((:command . "g++")
    (:exec    . ("%c -std=c++1z %o -o %e %s"
		 "%e %a"))
    (:remove  . ("%e")))
  :default "c++")

;; Use this parameter in pod-mode
(quickrun-add-command "pod"
  '((:command . "perldoc")
    (:exec    . "%c -T -F %s"))
  :mode 'pod-mode)

;; You can override existing command
(quickrun-add-command "c/gcc"
  '((:exec . ("%c -std=c++1z %o -o %e %s"
	      "%e %a")))
  :override t)

First argument of quickrun-add-command is command key. Second argument of it is command parameter, which is described laster. quickrun-add-command also takes key parameters, :default, :mode, :override.

Argument Description
:default lang Use this command parameter as default in specified language
:mode mode this command parameter in specified mode
:override bool Override existing parameter with specified parameter

Command Parameter

Command alist has following parameters,

:command(mandatory parameter)

Command name. %c is expanded into this value.

:cmdopt(optional)

Command(:command) option. %o is expanded into this value.

:exec

Executed commands. You can also set command list parameter. If you set list parameter, quickrun.el executes command list in order.

If this parameter is omitted, quickrun.el use default execute command template "%c %o %s %a".

:timeout(optional)

Timeout in seconds for the process spawn by the command. This value takes precedence over the quickrun-timeout-seconds custom variable.

:compile-only

Command exected by quickrun-compile-only. This option is used for syntax check or converting another language(e.g. CoffeeScript => JavaScript).

:compile-conf

Configuration of quickrun-compile-only. This parameter must be alist.

:remove

Remove files after executing. If command create some intermediate files, you should set this parameter. :remove value is atom or list.

:outputter

Please see Outputter section.

:default-directory

Directory where commands are executed.

:tempfile

Use temporary file or not. quickrun.el uses temporary file if you omit this parameter.

NOTE: If you set this parameter, you cannot use quickrun-region.

:description

Description of this command. This parameter is used in helm-quickrun or anything-quickrun

Placeholders

You can use following placeholders in command parameter

Placeholder Expanded
%c Command
%o Command line option
%s Source(absolute path)
%a Script's arguments
%n Source without extension(absolute path)
%N Source without extension(nondirectory)
%d Directory name of Source(absolute path)
%e Source with executable suffix(absolute path)
%E Source with executable suffix(nondirectory)

Source file name(%s, %n etc) is not original file name except Java language. Because quickrun.el copys source file to temporary file firstly.

Change Default Command

quickrun-set-default changes default command in language that is registerd multiple command parameters(like c, c++,Javascript).

(quickrun-set-default "c" "c/clang")

This means that quickrun uses "c/clang" for C files.

Timeout Seconds

quickrun.el kills process if program run over 10 seconds as default. This avoids infinite loop program or endless program by some mistakes. You control timeout second to set quickrun-timeout-seconds. This feature is disabled if quickrun-timeout-seconds is nil. The timeout can also be set per command with the :timeout parameter. (You can also kill process by C-c C-c in quickrun buffer)

Key bindings in quickrun buffer

Key Command
q Close quickrun window
C-c C-c Kill quickrun process

Buffer Local Variables

Buffer local variables is priority to default parameters.

quickrun-option-cmd-alist

Command alist.

quickrun-option-command

Command key(Expanded to %c)

quickrun-option-cmdkey

Command key of command parameter.

quickrun-option-cmdopt

Command option(Expanded to %o)

quickrun-option-args

Program argument(Expanded to %a.)

quickrun-option-shebang

If this value is non-nil and first line of source file is started "#!", the following string is treated as ":command".

quickrun-option-outputter

Outputter function. See Outputter section

Example of buffer local variable

Setting C++11.

#include <iostream>
#include <vector>
#include <string>

int main (int argc, char *argv[])
{
    std::vector <std::string> lst = { "a", "b", "c", "d" };

    for (auto x : lst) {
        std::cout << "[" << x << "]" << std::endl;
    }

    for (auto i = 1; i < argc; i++) {
        std::cout << "[" << argv[i] << "]" << std::endl;
    }

    return 0;
}

/*
  Local Variables:
  quickrun-option-cmd-alist: ((:command . "g++")
                              (:exec    . ("%c -std=c++0x -o %n %s"
                                           "%n apple orange melon"))
                              (:remove  . ("%n")))
  End:
*/

Hooks

quickrun-after-run-hook

Run hooks after execute all commands.

Outputter

Outputter is a function for processing command output. Default outputter is to output to *quickrun* buffer and processing ANSI Color sequence.

quickrun.el defines following functions as default.

buffer:buffername

Output to buffer. outputter buffer sample

file:filename

Output to file. outputter file sample

variable:varname

Output to variable. outputter variable sample

browser

Output to Web browser(using function browse-url) outputter browser sample

message

Output to *Message* buffer(using function message) outputter message sample

multi

Use multiple outputters. outputter multi sample

null

No output. outputter null sample

Using quickrun as function from other functions

quickrun can be used as function from other functions. You can pass configuration by :source argument. Sample is following:

(defun test-perl ()
  (interactive)
  (let* ((cmd "git rev-parse --show-toplevel")
         (topdir (with-temp-buffer
                   (call-process-shell-command cmd nil t nil)
                   (goto-char (point-min))
                   (if (re-search-forward "^\\(.+\\)$" nil t)
                       (match-string 1)))))
    (quickrun :source `((:command . "prove")
                        (:default-directory . ,topdir)
                        (:exec . ("%c -bv --color %s"))))))

quickrun's People

Contributors

anihm136 avatar bkyle avatar calancha avatar conao3 avatar dangirsh avatar darkstego avatar dependabot[bot] avatar dewdrops avatar easbarba avatar ejmr avatar jcs090218 avatar juergenhoetzel avatar koko1000ban avatar kozo2 avatar leoncamel avatar marsam avatar murasesyuka avatar palikar avatar pogin503 avatar repelliuss avatar shuntakeuch1 avatar svend avatar syohex avatar tmalsburg avatar wickedjargon avatar ylluminarious avatar yorkz avatar yuutayamada avatar zonuexe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickrun's Issues

add support for Julia.

I try to read source code of quickrun, But failed, I don't know how to add support for Julia.
So I add an issue here.

BTW, can you add an example in README, let user can reference to add new support?

How to hide new-line characters in output?

For me, I keep getting the ^M new line character for output. Here is an example when running an emacs-lisp file:

2021-04-10-164332_580x55_scrot

I have this is my init.el to set the coding system, but it doesn't seem to work.

(setq default-buffer-file-coding-system 'utf-8-auto)

I'd appreciate the help.

Maintain Issue.

@tarsius Is there anyone already maintaining this package? This package is great! Let me know if I can maintain this package! :)

Thanks!

Tool-bar button?

Could we have a button in to tool bar for the quickrun command? I think it would be nice for people who are new to emacs.
Something like this:
(tool-bar-add-item "run" 'quickrun 'quickrun :help "Compile and execute the buffer")

Here is a nice xpm picture file that would look good as the button (I totaly didn't steal it from Netbeans) (I know it says .png but just rename it to .xpm)
run

problem with quickrun-focus-p

When I run M-x quickrun repeatedly with the following setup, everything works. However, if I press Cmd-r repeatedly, the focus part only works the first time. On the second run, my cursor is placed in the quickrun buffer. Is there something else I need to do?

(require 'quickrun)
(global-set-key (kbd "s-r") 'quickrun)
(setq quickrun-focus-p nil)

rust compile only error

quickrun rustc with C-u C-u (compile only) will give below error:

-*- mode: compilation; default-directory: "~/Rust/101/" -*-
Comint started at Thu Jan 26 15:30:53

rustc --no-trans --warn-unused-imports  -o /Users/pro/Rust/101/1.out 1.rs
error: Unrecognized option: 'no-trans'.


Comint exited abnormally with code 101 at Thu Jan 26 15:30:53

Rust 1.14

fail to display ANSI color codes

ansi color code is not support?

I run quickrun, c++ compile error log on quickrun buffer is

�[1mqr_3031oQQ.cpp:5:1: �[0m�[0;1;31merror: �[0m�[1mC++ requires a type specifier for all declarations�[0m
a;
�[0;1;32m^
�[0m1 error generated.

I expect error log, as follows

Welcome to the Emacs shell

$ 
$ clang++ -O3 -std=c++1z xorshift.cpp 
xorshift.cpp:5:1: error: C++ requires a type specifier for all declarations
a;
^

env

I use quickrun version is

;; Package-Version: 20151203.2152
;; Version: 2.2.6

emacs and gcc version is

$ emacs --version
GNU Emacs 24.5.1
...
$ gcc --version
gcc (Debian 5.3.1-5) 5.3.1 20160101
...

Not remove temporary file on Windows

Windows環境で、テンポラリファイルが削除されずに残ることがある。
理由は

    gcc -o output foo.c

としたときに、outputではなく、output.exeが生成されてしまうため。

[BUG]quickrun-shell doesn't change the eshell's working directory

If I firstly executed quickrun-shell when the file of current buffer is in directory A,
then I change current buffer to another file in directory B, and execute quickrun-shell again,
it will fail to find the file to compile, because it still try to find it in the directory A.

Moreover, I don't think the minibuffer is a good place to show the message "Press 'r' to run again, any other key to finish", because it will easily go away if I were doing something else in the mean time. Is it possible to show it in the program running buffer? And would the terminal-emulator function be the better choice than eshell for running the program?

buffer scrolls too much when not needed.

Thanks for making emacs-quickrun, it's great.
I use it to eval current ruby buffer. only problem is that it scrolls the output out of sight. so if buffer just consists of: "puts 'hello'" and I quickrun it, I need to scroll up in the quickrun buffer to see the output because the buffer scrolls it out of sight.

2 other questions:
Can I have it not move my cursor into the quickrun buffer?
Can quickrun buffer be vertical to the right of my edit buffer?

In nim, quickrun doesn't fail if it needed

I tried emacs -Q (with master branch emacs)
and I checked quickrun.el and quickrun.elc (updated today)

In following file named array.nim, the compile process should fail
because of using same file name and type, but M-x quickrun success to compile.
(Nim recognizes file name as module name, so. about module)

array.nim

var a: array[0..2, int] = [1, 2, 3]
for ary in a:
  echo ary

from M-x quickrun:
-> 1, 2, 3

from shell:

$ nim compile --run --verbosity:0 array.nim # <- actually I tried absolute path
array.nim(1, 8) Error: ambiguous identifier: 'array' -- use a qualifier

nim version:

$ nim --version
Nim Compiler Version 0.13.1 (2016-02-01) [Linux: amd64]
Copyright (c) 2006-2016 by Andreas Rumpf

git hash: ac1e7a245093bb28a1a366f1e169ab50e6660c94
active boot switches: -d:release

quickrun scrolls the code buffer to the bottom

When I run quickrun with eshell, and abort the program before it finishes with C-c C-c, quickrun always scrolls my code buffer to the bottom, which is annoying.

To reproduce:

  • Set quickrun to use Eshell.
  • Run a program with some input i.e. scanf
  • When you are asked for input, C-c C-c to abort the program and press q to quit Eshell.
  • Point is at the bottom in code buffer.

no need to recenter the quickrun output buffer when using `quickrun-replace-region``

using quickrun-replace-region throws the error : Wrong type argument: window-live-p, nil (region get replaced as expected). For example on this python code : print("hello")
I have solve the issue with :

*** a/quickrun.el
--- b/quickrun.el
***************
*** 868,875 ****
                       (message "Failed: Exit Status=%d" exit-status))
                   (quickrun/apply-outputter outputter-func)
                   (run-hooks 'quickrun-after-run-hook))
!                (cond ((> scroll-conservatively 0) (quickrun/recenter nil))
!                      ((/= scroll-step 0) (quickrun/recenter -1)))
                 (quickrun/remove-temp-files)))))))

  ;;
--- 868,876 ----
                       (message "Failed: Exit Status=%d" exit-status))
                   (quickrun/apply-outputter outputter-func)
                   (run-hooks 'quickrun-after-run-hook))
!                (unless (string= outputter-func 'replace)
!                  (cond ((> scroll-conservatively 0) (quickrun/recenter nil))
!                        ((/= scroll-step 0) (quickrun/recenter -1))))
                 (quickrun/remove-temp-files)))))))

  ;;

Regards
lompik

quickrun leaves an empty buffer each time

Hi and thx for this great package!

im a neewb and having trouble configuring how why when i use quicklaunch emacs opens a ugly buffer beside the current one. is there a way to disable this?
thx so much!

Z

Cannot executes remote buffer

When working on a remote buffer with Tramp, quickrun cannot see it and try to execute the file locally and fails.

run in terminal

Quickrun is GREAT, however, I failed to find a way to input something to the running program except for using the quickrun-with-input-file command. It is very inconvenient when I want to input something freely.

It may be better to execute the program with the built-in function -- term, which enables us to interact with the running program.

Quickrun and Quickrun-Shell have differing environments because of eshell

Quickrun-shell is the way to enable stdin when running a file, but the way it does this is via eshell, which doesn't load the standard environment.

For example, this means if you use something like pyenv to manage python installations, quickrun and quickrun-shell will run two different versions of python.

Afaik eshell explicitly does not try to load bash profiles or anything like that, so there's no real way to make this work with eshell.

But what you can do, however, is instead of using eshell, use compilation-start and pass t to put it in interactive mode.

I'm not sure if you can get the "press R to restart" behavior with comint mode, but I'd much rather have stdin and consistent environments than the ability to rerun with a single key. That's what M-x repeat-command is for 😛

How to inhibit the *quickrun* window?

I'm trying to open a new Emacs.app to do some tests and print logs in there:

;; Local Variables:
;; quickrun-option-cmd-alist: ((:command . "/bin/bash")
;;                             (:exec    . ("open -a /Applications/Emacs-26.3.app --args -Q -l %d/%s"))
;;                             (:tempfile . nil))
;; End:

How should I do to inhibit the *quickrun* window in original Emacs?

Apply the same quickrun command for multiple files

Hi,

I think this is a useful feature. Let me explain the use case: in competitive programming, you often need to get file input through standard stream. Something like this:

./program < test_case1.txt

It would be nice if I can reuse quickrun-with-arg for multiple files. This is my hack to achieve that:

  (defalias 'qrr 'quick-run-multiples-redirect)
  (defun quick-run-multiples-redirect (buf-name &rest args-list)
    (let* ((cur-buf (if buf-name (get-buffer buf-name) (current-buffer)))
           (cur-window (get-buffer-window cur-buf))
           (result))
      (dolist (arg (hif-flatten args-list))
        (with-current-buffer cur-buf
          (select-window cur-window)
          (delete-other-windows)
          (select-window cur-window)
          (quickrun-with-arg (concat "< " arg))
          (sit-for 1)
          (with-current-buffer quickrun--buffer-name
            (setq result (concat result arg ": "  (buffer-string))))))
      (with-current-buffer (generate-new-buffer quickrun--buffer-name)
        (erase-buffer)
        (insert result)
        (quickrun--mode)
        (switch-to-buffer (current-buffer)))))

So, in eshell, I can put command like this:

qrr file.cpp (edf ".*.txt")
  • qrr is the alias of quick-run-multiples-redirect.
  • file.cpp is the file for quickrun-with-arg to run on.
  • (edf ".*.txt) expands all the .txt files in the current directory. edf is the alias for eshell-directory-files.

Here is an example C++ file:

#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int n, tmp;

    cin >> n;

    while (cin >> tmp) {
        cout << tmp;
    }

    debug(n, tmp);

    return 0;
}

Here is a sample test case:

5
1 2 3 4 5

Essentially, I will have many of such test cases, and I want to run all of them with a single command. With the qrr command, it is able to do that, but then it opens a *quickrun* buffer for every test case before it finally aggregates results into the final buffer.

Running perldoc on a perl file?

In README, you give an example on how to run perldoc on a POD file. Is it just me not being able to see how to run quickrun on a perl file and execute that perldoc statement?

I've set the command and key bindings for running perl interpreter from plenv with and without arguments, but I can not see a way to run perldoc, too.

Getting "ModuleNotFoundError" errors when "#!/usr/bin/env python" is used in Python scripts

Distribution: ArchLinux
Emacs: GNU Emacs 27.1
Quickrun version: 2.3.0
Python version: 3.8.5
Emacs function used: M-x quickrun

Hello,
As mentioned in the title, Python scripts are not working unless if I use a more direct path to the Python interpreter (!#/usr/bin/python). Example: the only error outputted in the quickrun buffer looks like this:

Traceback (most recent call last):
  File "meteo.py", line 3, in <module>
    from env_canada import ECData
ModuleNotFoundError: No module named 'env_canada'

I have no clue what might cause this problem, hence why I've opened this issue. Let me know if you need more details.

How to change scheme run command?

Hi, guys. Sorry to raise this issue. I've read the readme, but still can't figure out how to change my scheme file run command. Let's say that I want my current scheme file run by the command chez --script, How would I do that?
I'm using use-package and this is my current config file. But it raises an error, now. Please help me. Thanks!

(use-package quickrun
  :config
  (quickrun-add-command "scheme"
    '((:exec . ("%c -std=chez --script %o -o %e %s"
                "%e %a")))
    :default "scheme"
    :override t)
  :ensure t)

Show finish message when the program exit

Is it possible to show a message indicate that the program has been exit (similar to compile command)? This will be very useful for long running programs/scripts.

Thanks

#![allow(dead_code)] in Rust error

#![allow(dead_code)] not support for rust in the head of rust file.

error message:

'[allow' is not recognized as an internal or external command,
operable program or batch file.

On windows.

More helm functions

  • helm-quickrun-region
  • helm-quickrun-with-arg
  • helm-quickrun-shell
  • helm-quickrun-compile-only
  • helm-quickrun-replace-region

Example use case: When writing an HTML document, you could write a part in markdown (e.g., a list), select it, and transform it to HTML using helm-quickrun-replace-region.

How to make *quickrun* stay in the same window?

If I run (quickrun), it opens the *quickrun* buffer in a window. Then, if I run (quickrun) again, it moves the buffer out of the original window and into a new window. I want the *quickrun* buffer to stay in one window consistently so I can have my source code files in certain designated windows and *quickrun* in another designated window. (Note that Emacs compile commands open the *Compilation* buffer, and they have the behavior I want, where they will keep the buffer in the same window if it's already visible.) How do I make quickrun behave like this?

I tried using Emacs's dedicated-window functionality, but that doesn't work. If I mark the window with *quickrun* as a designated window and then run (quickrun) again, it closes the window with *quickrun* in it and then puts *quickrun* in a different window.

Help on this issue is much appreciated.

quickrun-shell binds "q" to (quickrun--eshell-window-restore) in every eshell buffer

quickrun-shell creates a buffer named eshell-quickrun,then quickrun--mode-map is enabled in every eshell buffer include eshell.
so,"q" is bind to (quickrun--eshell-window-restore) in every eshell buffer(including eshell buffer) instead of just in eshell-quickrun;;

I guess this could be a bug,and can be reproducted with minimal setup;

(require 'quickrun)

How to stop quickrun frame/window from changing its size.

Ive bound 'quickrun to a key but everytime I use it the frame/window is resized to the middle of the screen, this can get annoying after I have run it the first time then resize the frame/window and then run it again the frame/window goes back to the middle.... how can I stop that?

Great package by the way... keep up the good work.

Timeout per quickrun command

Is there a plan to add a feature where one can specify how long is the timeout for a process but on a command basis? For example, quickrun-add-command can take an extra argument :timeout which controls the behavior of the specific command.

If the effort is not that big, I could implemented it myself. Would you be interested in PR?

Cannot handle spaces in path name

Hi, I'm using quickrun in doom emacs. I recently noticed that using quickrun in a file which has a space in its pathname causes an error, taking the part after the space as a second argument. I wonder if it is something that's easy to fix?

Add a customised variable

I have a toy programming language that I want to just use the source file name instead of copying to temporary file first after invoking quickrun (like the case of Java language).

Could it be possible to provide such customised variable that users can specify for which quickrun will not generate a temporary file?

quickrun-shell should switch cursor to shell buffer by default

For example, I have an interactive C++ program that requires input. For this reason, I use the quickrun-shell command over the quickrun command. But, the cursor is on *quickrun* by default and I have to switch to *eshell* buffer manually. Also, I have to quit the eshell before quitting the *quickrun* buffer because if I press q to quit *quickrun* buffer first, quitting *eshell* bufferr gives error, so it's better for the cursor on shell buffer by default.

Use quickrun together with popwin package.

I use following popwin config

(add-to-list 'popwin:special-display-config "*quickrun*")

But popwin handle only *quickrun* buffer with compilation state. After that quickrun pop to buffer running application. At that moment popwin mess window control. Now you can't close *quickrun* window with C-g.

Get this behavior at c-mode with single c source file and gcc compiller.

Support autoload

現在は requireするしか quickrunを読み込めないので、
autoloadに対応する。

color comes late

When I run quickrun, it puts all output to a buffer, and applies colors after it is finished. In my opinion that's a bit ugly, especially when you are watching what is happening in that buffer:

�[32mHint: �[0mhello_triangle�[36m [Processing]
�[0m�[32mHint: �[0mmacros�[36m [Processing]
�[0m�[32mHint: �[0msequtils�[36m [Processing]
�[0m�[32mHint: �[0mx�[36m [Processing]
�[0m�[32mHint: �[0mxlib�[36m [Processing]
�[0m�[32mHint: �[0mxutil�[36m [Processing]
�[0m�[32mHint: �[0mkeysym�[36m [Processing]
�[0m�[32mHint: �[0mdynlib�[36m [Processing]
�[0m�[32mHint: �[0mstrutils�[36m [Processing]
�[0m�[32mHint: �[0mparseutils�[36m [Processing]
�[0m�[32mHint: �[0mmath�[36m [Processing]
�[0m�[32mHint: �[0malgorithm�[36m [Processing]
�[0m�[32mHint: �[0mvec�[36m [Processing]
�[0m�[32mHint: �[0mmat�[36m [Processing]
�[0m�[32mHint: �[0mmat_transform�[36m [Processing]
�[0m�[32mHint: �[0mglobals�[36m [Processing]
�[0m�[32mHint: �[0mquat�[36m [Processing]
�[0m�[32mHint: �[0mtimes�[36m [Processing]
�[0m�[32mHint: �[0munsigned�[36m [Processing]
�[0m�[32mHint: �[0mposix�[36m [Processing]
�[0m�[32mHint: �[0mospaths�[36m [Processing]

When I use quickrun-shell, all color is applied directly, but this one has the disadvantage, that it does change focus to that window, even though I do not want that (I configured quickrun-focus-p). I almost wanted to commit the issue, that quickrun-focus-p does not have an effect on quickrun-shell, but then I realized it was intentional, because that command is interactive programs. Is there a solution for my problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.