[ESS-bugs] ess-mode 5.3.6; inferior-R-input-sender modifies `current-buffer' when entering help(foo) at R prompt

Martin Maechler maechler at stat.math.ethz.ch
Wed Mar 5 15:24:31 CET 2008


>>>>> "LM" == Lawrence Mitchell <wence at gmx.li>
>>>>>     on Tue, 04 Mar 2008 12:10:21 +0000 writes:

    LM> This bug report will be sent to the ESS bugs email list
    LM> Press C-c C-c when you are ready to send your message.

    LM> inferior-R-input-sender can change the value of (current-buffer)
    LM> when the input is a help command.  Specifically,
    LM> ess-display-help-on-object sets the current buffer to be the
    LM> newly displayed *help* buffer.  This means that typing a help
    LM> command at the prompt gives an error

    LM> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
    LM> comint-send-input()
    LM> inferior-ess-send-input()

I cannot easily reproduce this, {can you give a bit more details
about the circumstance on where you can produce the error; maybe
it only happens in Emacs 23.x  which I don't have yet ?},

but it does make sense to simply wrap the code by
(save-current-buffer ...) as your patch does;
hence I've committed it to the SVN version of ESS.

Thank you, Lawrence!
(are you really in Lichtenstein ?)

Martin Maechler, ETH Zurich



    LM> This is because the comint-last-input-start and other markers
    LM> have no value in the *help* buffer.

    LM> The following patch fixes this problem by ensuring that
    LM> inferior-R-input-sender restores the correct buffer on exit.

    LM> Cheers,

    LM> Lawrence

    [...........patch..........]

    LM> Emacs  : GNU Emacs 23.0.60.3 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
    LM> of 2008-02-26 on lamacq.ph.ed.ac.uk
    LM> Package: ess-mode 5.3.6

    LM> current state:
    LM> ==============
    LM> (setq
    LM> ess-language "S"
    LM> ess-dialect "R"
    LM> ess-ask-for-ess-directory t
    LM> ess-ask-about-transfile nil
    LM> ess-directory nil
    LM> ess-keep-dump-files "always"
    LM> ess-source-directory "/tmp/"
    LM> )
    LM> -- 
    LM> Lawrence Mitchell <wence at gmx.li>



More information about the ESS-bugs mailing list