【问题标题】:Emacs "error in process filter: menu-bar-update-yank-menu: Wrong type argument: stringp, nil"Emacs“进程过滤器错误:menu-bar-update-yank-menu:错误类型参数:stringp,nil”
【发布时间】:2023-04-01 17:43:01
【问题描述】:

我在 https://github.com/coordinate/bingapiel 维护一个 elisp 项目。

用于在 emacs 中使用 bing api 进行翻译。

一些用户抱怨这个错误:

error in process filter: menu-bar-update-yank-menu: Wrong type argument: stringp, nil
error in process filter: Wrong type argument: stringp, nil

但我无法在我的计算机上重现该错误。

所以我在这里寻求帮助。有没有人也遇到过这个错误。有谁知道“menu-bar-update-yank-menu:错误的类型参数:stringp,nil”的含义。欢迎提出任何建议。

【问题讨论】:

    标签: emacs elisp


    【解决方案1】:

    可能是由于未按预期喂食的钩子造成的 例如缓冲区在课程间被杀死

    第 128-131 行 bing-translate.el 对我来说看起来很奇怪

        (with-current-buffer buf
          (let* ((xmldata (decode-coding-string (buffer-string) 'utf-8))
                 (result nil))
            (kill-buffer (current-buffer))
            (when (equal "expired" (bingapi-check-accesstoken xmldata))
              ;; get secend time
              (setq buf (url-retrieve-synchronously
                         (bingtranslate-make-url
                          "GetLanguagesForTranslate?" nil)))
              (if buf
    

    ;;;;

    即current-buf "buf" 被杀死, 稍后再设置“何时” 但只有“当”

    in not,后面 if 运行为空 (?)

    就像第一眼看上去一样......

    【讨论】:

    • 感谢 Andreas Röhler。你说的对。使用“with-current-buffer”,我不再需要 kill-buffer。我想知道您是否将 bingapiel 添加到您的 emacs 中?效果好吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多