|
- ;;; r-object-browser.el --- Summary
-
- ;; Copyright (C) 2019 Maxime Wack
-
- ;; Author: Maxime Wack <maximewack@free.fr>
- ;; Version: 0.1
-
- ;; This file is not part of GNU Emacs.
-
- ;; This program is free software: you can redistribute it and/or modify
- ;; it under the terms of the GNU General Public License as published by
- ;; the Free Software Foundation, either version 3 of the License, or
- ;; (at your option) any later version.
-
- ;; This program is distributed in the hope that it will be useful,
- ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ;; GNU General Public License for more details.
-
- ;; You should have received a copy of the GNU General Public License
- ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- ;;; Commentary:
-
- ;; This package is intended to emulate Nvim-R's object browser, for ESS.
-
- ;;; Code:
-
- (defvar robj-buffer "*R object browser*"
- "Name of buffer for displaying R objects.")
-
- (defun r-object-browser ()
- "Show an R object explorer."
- (interactive)
- (unless (and (string= "R" ess-dialect)
- ess-local-process-name)
- (error "Not in an R buffer with attached process"))
- (let ((proc ess-local-process-name))
- (pop-to-buffer (get-buffer-create robj-buffer))
- (setq ess-local-process-name proc)
- (r-object-browser-mode)))
-
- (defun r-object-browser-mode ()
- "Run R object browser mode.")
-
- (provide 'r-object-browser)
-
- ;;; r-object-browser.el ends here
- ;;; Test zone
-
- (ess-force-buffer-current) ;; get current R process buffer
- (ess-command "ls()\n" (get-buffer robj-buffer))
|