Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex Elisp:搜索带有不平衡引号的字符串会导致Lisp错误_Regex_Elisp - Fatal编程技术网

Regex Elisp:搜索带有不平衡引号的字符串会导致Lisp错误

Regex Elisp:搜索带有不平衡引号的字符串会导致Lisp错误,regex,elisp,Regex,Elisp,搜索文件名。“myfile.txt” 搜索文件名。“myfile.txt(不带最后一个引号) (regexp引用“filename\.\”\\(.+\\)) 调试器输入--Lisp错误:(无效的读取语法“)或向量中的“ 读(#) 前-sexp() eval-last-sexp-1(t) 评估最后一个性别(t) eval-print-last-sexp() 交互调用(eval print last sexp nil nil) 我认为您误解了regexp quote的含义: 从文档(C-h C-f

搜索
文件名。“myfile.txt”

搜索
文件名。“myfile.txt
(不带最后一个引号)

(regexp引用“filename\.\”\\(.+\\))
调试器输入--Lisp错误:(无效的读取语法“)或向量中的“
读(#)
前-sexp()
eval-last-sexp-1(t)
评估最后一个性别(t)
eval-print-last-sexp()
交互调用(eval print last sexp nil nil)

我认为您误解了regexp quote的含义:

从文档(C-h C-f regexp报价RET)

返回一个与字符串完全匹配的regexp字符串,而不返回其他内容

或者我误解了你的问题


无论如何,如果您想搜索某个函数,请向后搜索regexp,向前搜索regexp

这里是另一个简单的失败示例(向前搜索“\”(最大点)t)调试器输入--Lisp错误:(扫描错误“不平衡括号”2308 1)扫描sexps(2309-1)向前搜索sexp(-1)在-sexp()之前eval-last-sexp-1(nil)eval-last-sexp(nil)交互调用(eval-last-sexp nil-nil)我正在使用GNU Emacs 24.0.50.1(i386-mingw-nt6.1.7600)在LENNART-69DE564 Windows 7 Ultimate上发布的2010-08-04版本我在没有个人配置文件的情况下加载emacs时不会遇到这个问题。只需注释掉配置文件的不同部分,直到缩小范围。嗯,问题是什么?只需运行这两个代码段就可以了,因此需要更多信息。
(regexp-quote "filename \. \"\\(.+\\)\"")
"filename \\. \"\\\\(\\.\\+\\\\)\""
(regexp-quote "filename \. \"\\(.+\\)")
Debugger entered--Lisp error: (invalid-read-syntax ") or . in a vector")
  read(#<buffer processing-files.el>)
  preceding-sexp()
  eval-last-sexp-1(t)
  eval-last-sexp(t)
  eval-print-last-sexp()
  call-interactively(eval-print-last-sexp nil nil)