아래 텍스트가 있음 (실제 탭이 \ t 대신에 있음) "설명"다음에 탭 바로 다음에 있어야하고 모든 텍스트를 가져와야합니다 버퍼의 끝까지. 여기 elisp 잘못된 형식 인수 : 정수 또는 마커 -p 오류
key1\tval1
key2\tval2
key3\tval3
Description\tlots and lots and lots and lots and lots lots
and lots and lots and lots and lots lots and lots and lots and
lots and lots lots and lots and lots and lots and lots lots and
lots lots and lots and lots and lots and lots lots and lots lots
and lots and lots and lots and lots lots and lots lots and lots
and lots and lots and lots lots and lots lots and lots and lots
and lots and lots lots and lots lots and lots and lots and lots
and lots lots and lots lots and lots and lots and lots and lots
은 LISP 함수 :
(defun find-description()
(interactive)
(goto-char (point-min))
(when (re-search-forward "Description\t")
(setq myStr (buffer-substring (point) (end-of-line)))
(goto-char (point-max))
(insert "\n\n\ndescription=")
(insert myStr)
)
)
그리고이 오류가있는 (SETQ 라인에 실패 I 정규식 검색 후에 점이 될 것이라는 것을 가정
Wrong type argument: integer-or-marker-p, nil
설명 \ t 다음에 변수가 설정되지 않는 이유는 무엇입니까?
'end-of-line' *은 줄을 반환하지 않고 끝까지 이동합니다. 대신'line-end-position'을 사용하고 싶습니다. – Stefan