[ESS] Emacs for former XEmacs users
Rodney Sparapani
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).
>
> Rodney
>
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."
(list
(cond
((member (buffer-name)
'("*R*" "*R:2*" "*R:3*" "*R:4*" "*R:5*" "*R:6*" "*R:7*"
"*R:8*" "*R:9*"))
"ESS[S]"
)
((memq major-mode
'(ess-help-mode))
"ESS[S]"
)
((or (get-buffer-process (current-buffer))
;; Check if the major mode derives from `comint-mode' or
;; `compilation-mode'.
(tabbar-buffer-mode-derived-p
major-mode '(comint-mode compilation-mode)))
"Process"
)
((memq major-mode
'(Man-mode))
"Process"
)
((member (buffer-name)
'("*scratch*"))
"Emacs-Lisp"
)
((member (buffer-name)
'("*ESS*" "*Messages*" "*Warnings*"))
"Bury"
)
((eq major-mode 'dired-mode)
"Dired"
)
((member (buffer-name)
'("*GNU Emacs*"))
"Emacs-Lisp"
)
((memq major-mode
'(help-mode apropos-mode Info-mode))
"Emacs-Lisp"
)
((memq major-mode
'(rmail-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))
"Mail"
)
(t
;; 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)))
mode-name
(symbol-name major-mode))
))))
Maybe this is of use to somebody.
Rodney
More information about the ESS-help
mailing list