From 88c10f2e0faf81cc9b622715158b7cfd44efc42f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vincent=20Bela=C3=AFche?= Date: Thu, 2 Jun 2016 20:57:32 +0200 Subject: [PATCH] Make ses-jump with completing input. * lisp/ses.el (ses-jump): Make symbol input completing against list of named cells. --- lisp/ses.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ses.el b/lisp/ses.el index b2fd2bbe9a5..305027c73bb 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2201,7 +2201,17 @@ Based on the current set of columns and `window-hscroll' position." (defun ses-jump (sym) "Move point to cell SYM." - (interactive "SJump to cell: ") + (interactive (let* (names + (s (completing-read + "Jump to cell: " + (and ses--named-cell-hashmap + (progn (maphash (lambda (key val) (push (symbol-name key) names)) + ses--named-cell-hashmap) + names))))) + (if + (string= s "") + (error "Invalid cell name") + (list (intern s))))) (let ((rowcol (ses-sym-rowcol sym))) (or rowcol (error "Invalid cell name")) (if (eq (symbol-value sym) '*skip*) -- 2.39.2