[ESS] Skeleton pair insert not working after upgrade.

Vinh Nguyen vqnguyen at uci.edu
Fri Aug 28 02:17:20 CEST 2009


i'm running Mac OS X 10.5.8 with emacs compiled from the cvs source
using the nextstep method.  i have ESS 5.4, and I DO NOT HAVE the
problem u stated.  i have the following in my .emacs:

;; following from Marc Schwartz from ESS list, works globally
;; enable skeleton-pair insert globally
(setq skeleton-pair t)
;(setq skeleton-pair-on-word t)
(global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "\"") 'skeleton-pair-insert-maybe)
;;(global-set-key (kbd "\'") 'skeleton-pair-insert-maybe) ;; apostrophe
(global-set-key (kbd "\`") 'skeleton-pair-insert-maybe)
;;(global-set-key (kbd "<") 'skeleton-pair-insert-maybe)
;; Delete empty pairs like '()' taken from
;; http://www.emacswiki.org/cgi-bin/wiki/SkeletonMode#toc14 ##Deletion section
(defvar skeletons-alist
  '((?\( . ?\))
    (?\' . ?\')
    (?\" . ?\")
    (?[  . ?])
    (?{  . ?})
    (?<  . ?>)
    (?$  . ?$)))
(defadvice delete-backward-char (before delete-empty-pair activate)
  (if (eq (cdr (assq (char-before) skeletons-alist)) (char-after))
      (and (char-after) (delete-char 1))))

vinh
--
This e-mail/fax message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient,
please contact the sender by reply e-mail/fax and destroy all copies
of the original message.



On Thu, Aug 27, 2009 at 4:57 PM, Marc Schwartz<marc_schwartz at me.com> wrote:
> On Aug 27, 2009, at 12:21 PM, S. McKay Curtis wrote:
>
>> Hi all,
>>
>> I recently upgraded my Emacs and ESS using Vincent Goulet's very
>> convenient
>> package and installer.  But now that I have upgraded, the skeleton pair
>> insert for the parenthesis "(" is not working in R files.  That is, I have
>> the following code in my .emacs file
>>
>> (setq skeleton-pair t)
>> ;;(setq skeleton-pair-on-word t)
>> (global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
>> (global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
>> (global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
>> (global-set-key (kbd "\"") 'skeleton-pair-insert-maybe)
>> (global-set-key (kbd "<") 'skeleton-pair-insert-maybe)
>>
>> which, before upgrade, would automatically type a closing parenthesis ")"
>> every time I typed an opening parenthesis "(" [and would do the same for
>> the
>> other characters "[", "{", etc.].  Now that I have upgraded, I do not get
>> a
>> closing parenthesis after I type an open parenthesis when editing R files,
>> even though it works for other characters like "[".  Also, the skeleton
>> pair
>> insert for "(" works in the R command buffer, just not in an R file.
>>
>> Any thoughts on how to fix this?
>>
>>
>> Thanks
>> McKay
>
>
>
> Yep...I can confirm the behavior on OSX 10.5.8, however it is not just with
> Vincent's version of Emacs/ESS. I can replicate it here with my own Emacs 23
> compiled directly from the Emacs cvs and also with Aquamacs downloaded from
> their site. Aquamacs is based upon Emacs 22, so this is not just with Emacs
> 23.
>
> McKay, I presume that you are on OSX?  If so, have you installed the 10.5.8
> update or are you still on 10.5.7? I wonder if that update, which was pushed
> earlier this month on the 5th may have anything to do with this. There was
> also a security update (2009-004) on the 12th.
>
> Is anyone seeing this on other OSs?
>
> It also happens with a brace '{}' pair, where the closing brace is not
> automatically inserted.
>
> This happens in ESS[S] mode, either when editing an R file, or when in an R
> chunk in a .Rnw file. In the LaTeX chunks all is well.
>
> It all works properly in iESS [R] mode and if I disable ESS completely in my
> .emacs file and then open an R file or a .Rnw file, the behavior is correct.
>
> It also works properly in Rd mode.
>
> I see incomplete behavior when opening a Perl script file, where in that
> case (using CPerl mode), double and single quotes will be properly inserted,
> but parens, braces and brackets are not.
>
> I am not sure why I had not noticed this until now and am scratching my head
> to figure it out. I have not changed anything in my .emacs and have not
> updated other emacs lisp packages that I load.
>
> One thing I did note. If I revert to ESS 5.3.11 or 5.3.10 from 5.4, then the
> paren pairing happens OK in ESS[S] modes, but brace ('{}') pairing still
> does not.
>
> I am confuzzled....I am not ready to say this is ESS itself yet, unless
> others on non-OSX systems are seeing it as well.
>
> Regards,
>
> Marc Schwartz
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>



More information about the ESS-help mailing list