[ESS] ... when editing R documents, 'delete' key behaves as 'backspace'

Kasper Daniel Hansen khansen at stat.berkeley.edu
Tue Sep 9 03:17:54 CEST 2008

On Sep 8, 2008, at 2:27 PM, Rodney Sparapani wrote:

> Martin Maechler wrote:
>>    >> I have found a solution to this problem: All I need to do
>>    >> is to comment out line 173 of ess-mode.el, which says:
>>    >> (define-key ess-mode-map "\177"
>>    >> 'backward-delete-char-untabify) After this line is
>>    >> commented out, DEL key deletes forward, the same as in
>>    >> all other modes.  Does that mean that it was an intended
>>    >> behavior in ESS?
>>    StEgl> great, thanks for reporting this.  That code has
>>    StEgl> probably been there a long time, so I'd imagine that
>>    StEgl> yes, its intended.  Stephen
>> It definitely was back then 15-20 years ago.
>> But in those times, I don't think that the concept
>> of <forward deletion>  via the delete key as opposed  to <backward  
>> deletion> via the backspace key
>> was as (almost?) universal as now.
>> I've not used the <delete> key in ESS (or Emacs at that)
>> at all in the last 10 years or so, but because of the changed  
>> "universal" behavior,
>> I propose that we *drop* this behavior from ess-mode {the one
>> for editing *.R, *.S, *.q,  *.SAS, ... files) in ESS.
>> Of course we need to hear further opinions.
>> For that reason, I'm forwarding this communication to ESS-help
>> hoping to get feedback.
>> Martin Maechler
> There may be considerable bit-rot in that file.  For example, the
> two previous lines, 171-172, no longer appear to be necessary either.
> But, unless there is some breakage, I think we should leave 171-172
> alone.  However, I agree that 173 should be changed as proposed.
> I'd only add that there is no backspace key on Mac keyboards.  It
> is actually labeled the delete key, but I think you have a choice
> in Settings as to whether it deletes forward or backward and I think
> backward is the default.

Eh, what exactly do you mean? On all the mac keyboards I have been  
using (which are mostly laptop keyboards, but includes the newer wired  
"flat" keyboard), backspace is backspace exactly as it is on the Sun  
keyboard I am using right now. There is a marker on the backspace key  
saying "delete", but that just indicates that pressing "Fn +  
Backspace" gets a delete behaviour.

Here I tactically assume that backspace standard behaviour is to  
delete backwards and delete is to delete forwards.


More information about the ESS-help mailing list