从这个问题中可以看出,Rails控制台中的回跟踪限制是通过向context.back_trace_limit传递一个新值来设置的。虽然这可以在.irbc文件中设置,但我更希望Emacs为我设置它,因为我通常不会在编辑器之外使用irb,而且我的.emacs是在我使用的不同系统之间同步的。
在启动rinari-控制台时,是否有一种传递此值的方法?
发布于 2015-12-28 21:43:05
在rinari.el中,rinari-控制台函数的整个定义是:
(defun rinari-console (&optional edit-cmd-args)
"Run a Rails console in a compilation buffer.
The buffer will support command history and links between errors
and source code. Optional prefix argument EDIT-CMD-ARGS lets the
user edit the console command arguments."
(interactive "P")
(let* ((default-directory (rinari-root))
(command (rinari--maybe-wrap-with-ruby
(rinari--wrap-rails-command "console"))))
;; Start console in correct environment.
(when rinari-rails-env
(setq command (concat command " " rinari-rails-env)))
;; For customization of the console command with prefix arg.
(setq command (if edit-cmd-args
(read-string "Run Ruby: " (concat command " "))
command))
(with-current-buffer (run-ruby command "rails console")
(rinari-launch)))因此,没有内置的方式将值传递给irb会话。但是,我已经停止使用Rinari,因此不再使用解决方案。
https://stackoverflow.com/questions/34442237
复制相似问题