0

As can be seen from this question the back trace limit in Rails console is set by passing a new value to context.back_trace_limit. While this can be set in the .irbc file, I'd much rather Emacs set it for me, since I don't normally use irb outside of the editor, and my .emacs is synched across various systems I use.

Is there a way to pass in this value when I start rinari-console?

Community
  • 1
  • 1
Dmitri
  • 2,658
  • 2
  • 25
  • 41

1 Answers1

0

The entire definition of the rinari-console function in rinari.el is:

(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)))

So there's no built-in way to pass values to the irb session. However, I've stopped using Rinari, so am no longer working on a solution.

Dmitri
  • 2,658
  • 2
  • 25
  • 41