我是怎么用Emacs学习英文的?

你的另一个插件company-english-helper已安装成功。谢谢楼主!

1 个赞

mac os 搜索单词总是提示“Have search finished with “word”” ,什么鬼?此处 "word"是待搜单词。

命令行执行 sdcv 可以正确搜索。

在win7下,sdcv版本0.5.2,

(shell-command-to-string "sdcv -x -n -u \"简明英汉词典\" \"a\" --data-dir=~/.stardict/dic/")

会报以下错误, "Internal error: map::at " 删除-x选项后正常

在函数(defun sdcv-translate-result (word dictionary-list)中

你好 你的sdcv是自己编译的吗

是自己编译的,用的是这个https://github.com/yygcode/sdcv

你好,我编译的时候出错了,我对c++不是很了解,能帮我看看哪里出问题了吗

-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
CMake Warning at /usr/share/cmake-3.15.5/Modules/Platform/MSYS.cmake:15 (message):
  CMake no longer defines WIN32 on MSYS!

  (1) If you are just trying to build this project, ignore this warning or
  quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
  the CMake cache.  If later configuration or build errors occur then this
  project may have been written under the assumption that MSYS is WIN32.  In
  that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.

  (2) If you are developing this project, add the line

    set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required

  at the top of your top-level CMakeLists.txt file or set the minimum
  required version of CMake to 2.8.4 or higher.  Then teach your project to
  build on Cygwin without WIN32.
Call Stack (most recent call first):
  /usr/share/cmake-3.15.5/Modules/CMakeSystemSpecificInformation.cmake:27 (include)
  CMakeLists.txt:1 (project)


-- Check for working C compiler: /usr/bin/cc.exe
-- Check for working C compiler: /usr/bin/cc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Found ZLIB: /usr/lib/libz.dll.a (found version "1.2.11")
-- Found PkgConfig: /usr/bin/pkg-config.exe (found version "0.29.2")
-- Checking for one of the modules 'glib-2.0'
-- Found GLib2: glib-2.0;intl;pcre;intl;iconv;pcre /usr/include/glib-2.0;/usr/lib/glib-2.0/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - not found
CMake Error at CMakeLists.txt:36 (set):
  set given invalid arguments for CACHE mode.


-- REQUIRED_VARS
-- Looking for mmap
-- Looking for mmap - found
-- Looking for locale.h
-- Looking for locale.h - found
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
READLINE_INCLUDE_DIR
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
   used as include directory in directory /c/Users/li/sdcv
READLINE_LIBRARY
    linked by target "sdcv" in directory /c/Users/li/sdcv

-- Configuring incomplete, errors occurred!
See also "/tmp/build-sdcv/CMakeFiles/CMakeOutput.log".
See also "/tmp/build-sdcv/CMakeFiles/CMakeError.log".


Determining if files glib/gregex.h exist failed with the following output:
Change Dir: /tmp/build-sdcv/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make.exe cmTC_4efab/fast && /usr/bin/make -f CMakeFiles/cmTC_4efab.dir/build.make CMakeFiles/cmTC_4efab.dir/build
make[1]: 进入目录“/tmp/build-sdcv/CMakeFiles/CMakeTmp”
Building C object CMakeFiles/cmTC_4efab.dir/HAVE_GLIB_GREGEX_H.c.o
/usr/bin/cc.exe  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -Wall    -o CMakeFiles/cmTC_4efab.dir/HAVE_GLIB_GREGEX_H.c.o   -c /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c
In file included from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gregex.h:25:2: 错误:#error "Only <glib.h> can be included directly."
   25 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gregex.h:28,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gerror.h:23:2: 错误:#error "Only <glib.h> can be included directly."
   23 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gregex.h:28,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gquark.h:29:2: 错误:#error "Only <glib.h> can be included directly."
   29 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gquark.h:32,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gregex.h:28,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gtypes.h:29:2: 错误:#error "Only <glib.h> can be included directly."
   29 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/lib/glib-2.0/include/glibconfig.h:9,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/gquark.h:32,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gregex.h:28,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gmacros.h:33:2: 错误:#error "Only <glib.h> can be included directly."
   33 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gtypes.h:34,
                 from /usr/include/glib-2.0/glib/gquark.h:32,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gregex.h:28,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gversionmacros.h:29:2: 错误:#error "Only <glib.h> can be included directly."
   29 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gregex.h:29,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gstring.h:29:2: 错误:#error "Only <glib.h> can be included directly."
   29 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gstring.h:33,
                 from /usr/include/glib-2.0/glib/gregex.h:29,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gunicode.h:24:2: 错误:#error "Only <glib.h> can be included directly."
   24 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gstring.h:34,
                 from /usr/include/glib-2.0/glib/gregex.h:29,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gbytes.h:26:2: 错误:#error "Only <glib.h> can be included directly."
   26 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gbytes.h:30,
                 from /usr/include/glib-2.0/glib/gstring.h:34,
                 from /usr/include/glib-2.0/glib/gregex.h:29,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/garray.h:29:2: 错误:#error "Only <glib.h> can be included directly."
   29 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
In file included from /usr/include/glib-2.0/glib/gstring.h:35,
                 from /usr/include/glib-2.0/glib/gregex.h:29,
                 from /tmp/build-sdcv/CMakeFiles/CheckIncludeFiles/HAVE_GLIB_GREGEX_H.c:2:
/usr/include/glib-2.0/glib/gutils.h:29:2: 错误:#error "Only <glib.h> can be included directly."
   29 | #error "Only <glib.h> can be included directly."
      |  ^~~~~
make[1]: *** [CMakeFiles/cmTC_4efab.dir/build.make:66:CMakeFiles/cmTC_4efab.dir/HAVE_GLIB_GREGEX_H.c.o] 错误 1
make[1]: 离开目录“/tmp/build-sdcv/CMakeFiles/CMakeTmp”
make: *** [Makefile:121:cmTC_4efab/fast] 错误 2


Source:
/* */
#include <glib/gregex.h>


int main(void){return 0;}


我也不了解,我编译没遇到这些问题。根据错误提示,貌似你的glib有问题,看下这些里面的头文件。或者问下其他大老吧

你是咋解决的,我也是小黑框。。 :joy:

懒猫大佬这里指出了问题 :grimacing:

我安装了楼主的company-english-helper,发现补全单词释义的每一个字符以及后面的点都有一个下划线,如下图所示。这是什么原因啊?有遇到同样情况的吗?

你的header line是emacs里的,还是系统的呀?真好看

我猜是终端问题,平常我用gui客户端,所以不知道,你等等其他人来帮你。

系统的,archlinux + sway,最上边是waybar。

果然是终端问题,我刚才在gui下试了一下,没问题。我用的终端是termite。

BTW,我把company-show-number设成t,这个company-english-helper显示的数字编号是在候选单词的后面。而我用company补全别的语言(比如eglot补全C++)的时候,编号在候选项的前面。

当然,这也不是问题,也不影响使用。只是有点疑惑,对于不同的后端,company的行为有点不一致。

这个你得问问楼主了,因为我最近才开始玩emacs,插件都没装几个,一边学编程一边用,只会一点点编程知识,所以很多插件没用过/用不上。(楼主上面这个插件我早上才装的😅)

能给一个不同爬梯子就能下载星际译王词典的链接吗? :pray:

http://download.huzheng.org/

这个访问不了诶。楼上所有的链接我都试了

没墙的,我移动的宽带还能访问,只是有点慢罢了。

改天看看能不能做个种子,反正那些词典好几年了都没变过。

实在不行早上访问下载试试,最近网络的确有点迷