[ESS] help pops up automatically in browser

Ista Zahn istazahn at gmail.com
Tue Apr 16 15:18:41 CEST 2013


On Tue, Apr 16, 2013 at 6:18 AM, Jannis <bt_jannis at yahoo.de> wrote:
> I just realized that i send this to emacs-help instead of (as i intended)
> ess-help (so sorry for cross posting):
>
> Dear Ess users,
>
>
> i have recently updated to ESS 12.09-2. Now, as soon as I type any command
> in the console (or in a R script), a browser starts (after few seconds),
> displaying the respective html help page of that command. No idea whether
> this is caused by the updated ess version or by the autocomplete.el stuff
> that i installed recently.

They way this is supposed to work is that the help is displayed in an
emacs overlay. See http://www.emacswiki.org/emacs/ESSAuto-complete for
screenshots of this in action.

In your case this is not working because you told emacs to use html
help by setting

'(setq inferior-ess-r-help-command "help(\"%s\", help_type=\"html\")\n")'



>
> Is there any way to switch this behaviour off?

Yes, set the variable 'ac-use-quick-help' to 'nil'.

 Or, better, bind it to a
> special key?

Yes, you can do something like

;; set long ac-quick-help-delay (don't activate automatically)
(setq ac-quick-help-delay 9999)
;; set key to call ac-quick-help manually
(define-key ac-completing-map (kbd "M-h") 'ac-quick-help)

This will still result in the help page opening in the browser, which
is not ideal. My advice would be to use the emacs R help mechanism
instead of the html one (i.e., comment out your setq
inferior-ess-r-help-command... line).

Best,
Ista
>
> My .emacs is attached below.
>
>
> Thanks a lot
> Jannis
>
>
>
>
> ;;(setq inferior-R-program-name "c:/progra~1/R/R-2.12.0/bin/i386/Rterm.exe")
> (server-start)
>
>
> ;; Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/.
> (custom-set-variables
>   '(auto-save-file-name-transforms '((".*" "~/.emacs.d/autosaves/\\1" t)))
>   '(backup-directory-alist '((".*" . "~/.emacs.d/backups/"))))
>
> ;; create the autosave dir if necessary, since emacs won't.
> (make-directory "~/.emacs.d/autosaves/" t)
>
>
> ;; no line wrap
> (setq default-truncate-lines t)
>
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ess stuff
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; ess stuff
> (require 'ess-site)
>
> ;; turn off echoing of commands
> (setq ess-eval-visibly-p nil)
>
>
> ;;R help
> (setq inferior-ess-r-help-command "help(\"%s\", help_type=\"html\")\n")
>
> ;; Enable function argument hint for ESS
> (require 'ess-eldoc)
>
>
> ;;start tracebug
> (require 'ess-tracebug)
> (add-hook 'ess-post-run-hook 'ess-tracebug t)
>
> ;; Code folding in ess mode
> (add-hook 'ess-mode-hook
>   (lambda()
>     (local-set-key (kbd "C-c <right>") 'hs-show-block)
>     (local-set-key (kbd "C-c <left>")  'hs-hide-block)
>     (local-set-key (kbd "C-c <up>")    'hs-hide-all)
>     (local-set-key (kbd "C-c <down>")  'hs-show-all)
>     (hs-minor-mode t)))
>
> (autoload 'ess-rdired "ess-rdired"
>   "View *R* objects in a dired-like buffer." t)
>
>
> ;;set up ssh tunelling
> (load "~/.emacs.d/ssh.el")
> (setq ssh-program "ssh")
>
> ;; In every buffer, the line which contains the cursor will be fully
> ;; highlighted
> (global-hl-line-mode 1)
>
> ;; ===== Set standard indent to 2 rather that 4 ====
> (setq standard-indent 2)
>
> ;; scroll only one line
> (setq scroll-step 1)
>
> ;; ========== Support Wheel Mouse Scrolling ==========
> (mouse-wheel-mode t)
>
> ;; jump to last line of output
>
> (custom-set-variables
>    ;; custom-set-variables was added by Custom.
>    ;; ...
>    '(comint-move-point-for-output (quote others))
>    ;; ...
> )
>
> ;; turn off shell command echo
> (defun my-comint-init ()
>   (setq comint-process-echoes t))
> (add-hook 'comint-mode-hook 'my-comint-init)
>
> ;; activate parenthesis matching
> (show-paren-mode t)
>
>
> ;; show tabs
> (require 'tabbar)
> (tabbar-mode)
>
> ;; ido stuff
> (require 'ido)
> (ido-mode t)
> (setq ido-enable-flex-matching t)
>
> (setq ido-create-new-buffer 'always)
>
>
> ;; screen
> ;; used to send screen keybindings to shell in emacs
> (define-key shell-mode-map (kbd "C-l") (lambda (seq) (interactive "k")
> (process-send-string nil seq)))
> (define-key inferior-ess-mode-map (kbd "C-l") (lambda (seq) (interactive
> "k") (process-send-string nil seq)))
>
>
> ;; open recent files
> (require 'recentf)
> (setq recentf-auto-cleanup 'never) ;; disable before we start recentf!
> (recentf-mode 1)
> 0
> ;;disable startup messages
> (setq inhibit-startup-message t)
>
> ;; want two windows at startup
> (split-window-horizontally)
>
> ;;fullscreen mode
> (defun toggle-fullscreen ()
>   (interactive)
>   (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
>                          '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
>   (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
>                          '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
> )
> (toggle-fullscreen)
>
>
> ;;(set-frame-position (selected-frame) 0 0)
> ;;(set-frame-size (selected-frame) 180 50)
>
>
>
> ;;speed up emacs by removing echoing
> (setq ess-eval-visibly-p nil)
>
> ;; Tell emacs where is your personal elisp lib dir
> ;; this is the dir you place all your extra packages
> (add-to-list 'load-path "~/.emacs.d/")
>
>
> ;;regex tool
> (load "regex-tool" t)
>
> ;; bind recent files
> (global-set-key "\C-x\C-r" 'recentf-open-files)
>
> ;; clipboard
> (setq x-select-enable-clipboard t)
>
>
> ;; show changes
> (global-highlight-changes-mode t)
> (global-set-key (kbd "<M-down>") 'highlight-changes-next-change)
> (global-set-key (kbd "<M-up>")  'highlight-changes-previous-change)
> (set-face-foreground 'highlight-changes nil)
> (set-face-background 'highlight-changes "#6495ed")
> (set-face-foreground 'highlight-changes-delete nil)
> (set-face-background 'highlight-changes-delete "#ff8c00")
> (global-set-key (kbd "<f6>")      'highlight-changes-visible-mode) ;;
> changes
> (add-hook 'ess-mode-hook
> (defun highlight-changes-remove-after-save ()
>   "Remove previous changes after save."
>   (make-local-variable 'after-save-hook)
>   (add-hook 'after-save-hook
>             (lambda ()
>                 (highlight-changes-remove-highlight (point-min)
> (point-max))))))
>
>
> ;; autocomplete stuff
> (add-to-list 'load-path "~/.emacs.d/autocomplete/")
> (require 'auto-complete-config)
> (add-to-list 'ac-dictionary-directories "~/.emacs.d/autocomplete//ac-dict")
> (ac-config-default)
> (define-key ac-completing-map [tab] 'ac-complete)
> ;;(define-key ac-completing-map [return] nil)
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list