2013-03-06 4 views
2

나는 여기에있는 제안을 따라 ... R: Display a time clock in the R command line 내 R 프롬프트가 내가 마지막으로 명령에 입력 한 시간을 표시하게했다. 하지만 이제는 M-rM-p이 끊어졌습니다. ESS가 내 끊임없이 변화하는 명령 프롬프트를 명령 줄의 시작으로 더 이상 인식하지 않기 때문입니다.ESS에서 R의 동적 프롬프트를 인식하도록하려면 어떻게합니까?

누구든지 변경해야 할 옵션을 알고 있으므로 프롬프트가 감지되어야하는 모든 목적에 대해 전체 프롬프트 문자열을 일치시키는 대신 ESS는 그 일정한 꼬리 끝과 일치하거나 더 나은 방법으로 "^[0-9] {6} [0-9] {2} : [0-9] {2}> "

감사합니다. 내 ess/ess-custom.el

+0

프롬프트를 식별하기 위해 현재'ESS '가 무엇을보고 있습니까? 프롬프트 문자열을 나타내는 'R'안에 어떤 항목이 있는지 의미합니다. –

답변

0

는 다음과 같은 행이 포함

;; does it make sense to customize here, as we currently set this *directly* 
;; in the FOO-BAR-cust-alist's ??? 
;; VS: Right. It only confuses users. It should be set in post-run-hook if 
;; desired; inferior-S-prompt should be customized instead. 
(defvar inferior-ess-primary-prompt "> " 
    "Regular expression used by `ess-mode' to detect the primary prompt.") 

(make-variable-buffer-local 'inferior-ess-primary-prompt) 
;; (setq-default inferior-ess-primary-prompt "> ") 

(defvar inferior-ess-secondary-prompt nil 
    "Regular expression used by ess-mode to detect the secondary prompt. 
(This is issued by S to continue an incomplete expression). 
Set to nil if language doesn't support secondary prompt.") 
;; :group 'ess-proc 
;; :type 'string) 

(make-variable-buffer-local 'inferior-ess-secondary-prompt) 
;; (setq-default inferior-ess-secondary-prompt "+ ") 

;; need to recognise + + + > > > 
;; and "+ . + " in tracebug prompt 
(defcustom inferior-S-prompt "[]a-zA-Z0-9.[]*\\([>+.] \\)*[+>] " 
    "Regexp used in S and R inferior and transcript buffers for prompt navigation. 

You can set it to \"[]a-zA-Z0-9.[]*\\(> \\)+\" if you want to 
skip secondary prompt when invoking `comint-previous-prompt'. 
" 
    :group 'ess-proc 
    :type 'string) 

그래서 나는 이러한 변수 중 하나를 사용자 정의하는 데 도움이되기를 바랍니다 것입니다. 아마도 사용자 정의 가능한 것으로 시작하는 것입니다 (예 : inferior-S-prompt).

관련 문제