[ESS] Emacs for former XEmacs users
rsparapa at mcw.edu
Wed Aug 24 18:21:56 CEST 2011
Rodney Sparapani wrote:
> However, for me, this does nothing. Perhaps this is a good point
> to end this off topic discussion. ESS 5.14 is out now and it
> should resolve a few Emacs glitches (and be more consistent with
> the XEmacs behavior as well).
I know I ended this off-topic thread. However, I have developed
something related that is practically on-topic. Earlier, I mentioned
that tabbar is a nice addition for former XEmacs users. I have since
found that it is also available in some Emacs distros like Aquamacs.
However, the default behavior of tabbar is probably not what you want.
For example, an *R* buffer will appear in a different tab group from *.R
files (and *R:2* is in yet another group, doh!). And, similarly, ESS
Help will appear in different tab groups, i.e. ?apply. None of this is
configurable in tabbar as far as I can tell. However, you can use the
source (Luke)! I managed to get what I want by hacking tabbar.el
(certainly, this is as drastic as hacking ESS to get what you want, but
I see no alternative). Specifically, I changed the function
tabbar-buffer-groups as follows (near the bottom of tabbar.el):
(defun tabbar-buffer-groups ()
"Return the list of group names the current buffer belongs to.
Return a list of one element based on major mode."
'("*R*" "*R:2*" "*R:3*" "*R:4*" "*R:5*" "*R:6*" "*R:7*"
((or (get-buffer-process (current-buffer))
;; Check if the major mode derives from `comint-mode' or
major-mode '(comint-mode compilation-mode)))
'("*ESS*" "*Messages*" "*Warnings*"))
((eq major-mode 'dired-mode)
'(help-mode apropos-mode Info-mode))
rmail-edit-mode vm-summary-mode vm-mode mail-mode
mh-letter-mode mh-show-mode mh-folder-mode
gnus-summary-mode message-mode gnus-group-mode
gnus-article-mode score-mode gnus-browse-killed-mode))
;; Return `mode-name' if not blank, `major-mode' otherwise.
(if (and (stringp mode-name)
;; Take care of preserving the match-data because this
;; function is called when updating the header line.
(save-match-data (string-match "[^ ]" mode-name)))
Maybe this is of use to somebody.
More information about the ESS-help