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

Seb spluque at gmail.com
Thu Dec 4 19:50:23 CET 2008


Hi Martin,

On Mon, 8 Sep 2008 09:13:08 +0200,
Martin Maechler <maechler at stat.math.ethz.ch> wrote:

> [Forwarded from a semi-private communication in ESS-bugs]
>>>>>> "StEgl" == Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk> on Sun, 07
>>>>>> Sep 2008 22:21:23 +0100 writes:

>>> 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 probably been
StEgl> there a long time, so I'd imagine that yes, its intended.
StEgl> 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.

I probably should have followed up here to resuscitate the thread.  Line
173 alluded to above in ess-mode.el:

  (define-key ess-mode-map [delete]	'backward-delete-char-untabify)

is still there, uncommented, so it seems as if the change was
implemented some other way, or code has changed for some other reason.

Rodney -- I was confused, the behaviour is the other way around:
[delete] does `backward-delete-char-untabify' in `ess-mode-map' as per
the code above, and `delete-char' in inferior-ess-mode-map.

Personally, I don't need `backward-delete-char-untabify' bound to
[delete] anywhere in Emacs, but I'd guess that most users would expect
this key to do the same thing it does elsewhere in Emacs.  If that's
fine with everybody, perhaps all that's needed is to remove the line
above, as per the thread.


-- 
Seb




More information about the ESS-help mailing list