从this question可以看出,Rails控制台中的后向跟踪限制是通过将新值传递给context.back_trace_limit
来设置的。虽然这可以在.irbc文件中设置,但我更倾向于Emacs为我设置它,因为我通常不在编辑器之外使用irb
,并且我的.emacs在我使用的各种系统中同步
当我启动rinari-console时,有没有办法传递这个值?
答案 0 :(得分:0)
rinari.el中rinari-console功能的完整定义是:
(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,因此我不再致力于解决方案了。