[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby 57642c27fd 053/265: inf-ruby-completions: support
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby 57642c27fd 053/265: inf-ruby-completions: support non-"current" inf-ruby-mode buffers and Pry |
Date: |
Sat, 9 Jul 2022 21:59:13 -0400 (EDT) |
branch: elpa/inf-ruby
commit 57642c27fdb435db667ce4cd9bcb24662fd4cc85
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
inf-ruby-completions: support non-"current" inf-ruby-mode buffers and Pry
---
inf-ruby.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index c0997d0a9a..4b1468b832 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -359,12 +359,19 @@ The reason for this is unknown. Remove this line from
`completions'."
(defun inf-ruby-completions (seed)
"Return a list of completions for the line of ruby code starting with SEED."
- (let* ((proc (get-buffer-process inf-ruby-buffer))
+ (let* ((proc (inf-ruby-proc))
(comint-filt (process-filter proc))
(kept "") completions)
(set-process-filter proc (lambda (proc string) (setq kept (concat kept
string))))
- (process-send-string proc (format "puts
IRB::InputCompletor::CompletionProc.call('%s').compact\n"
- (ruby-escape-single-quoted seed)))
+ (process-send-string
+ proc
+ (format (concat "if defined?(Pry.config);"
+ "completor =
Pry.config.completer.build_completion_proc(binding)"
+ "elsif defined?(IRB::InputCompletor::CompletionProc);"
+ "completor = IRB::InputCompletor::CompletionProc;"
+ "end;"
+ "puts completor.call('%s').compact if completor\n")
+ (ruby-escape-single-quoted seed)))
(while (and (not (string-match inf-ruby-prompt-pattern kept))
(accept-process-output proc 2)))
(setq completions (butlast (split-string kept "\r?\n") 2))
- [nongnu] elpa/inf-ruby 505a7bc140 170/265: Merge pull request #84 from janpath/patch-1, (continued)
- [nongnu] elpa/inf-ruby 505a7bc140 170/265: Merge pull request #84 from janpath/patch-1, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4d82095424 174/265: inf-ruby-console-gem: Only try to load Ruby files, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4f6a265640 178/265: Add support for zeus console, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby af4f238ef4 200/265: Merge pull request #99 from dgopstein/master, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 4893dd6426 208/265: Describe how to add custom prompt patterns (#108), ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 49d59a7897 216/265: Merge pull request #115 from p-sdk/add-ruby-send-and-go-commands, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby a4c766e605 231/265: Use pry_instance, _pry_ is not in Pry 0.13 anymore, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 9f0f79ff45 232/265: inf-ruby-console-rails: Try to handle IRB's "multiline" thing here, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c2a28ef6a1 242/265: Replace toggle-read-only-mode with read-only-mode, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby cd50ce8432 249/265: Creating eval overlay feature, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 57642c27fd 053/265: inf-ruby-completions: support non-"current" inf-ruby-mode buffers and Pry,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby 33e17e055f 037/265: Move keys to a new minor mode, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 91bbd7763d 071/265: Avoid error when trying to switch to non-existing inf-ruby buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 54508a9923 011/265: Mac OS: Fix completion output splitting for Ruby 1.8.7 compatibility., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 74e96360b1 034/265: Added macruby to inf-ruby-implementations, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby a7bb5f99e3 013/265: Pesky header stuff., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 164f2dda53 065/265: Add commands to launch different types of consoles, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby d776551688 087/265: Add pry to inf-ruby-implementations, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 28b84de084 122/265: Advertise using the .pryrc workaround, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 562fa9a422 094/265: Close #37, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 55559dfaac 144/265: fix OpenStruct.new syntax to work with ruby 1.8.7, ELPA Syncer, 2022/07/09