UP | HOME

macOS 下 Emacs新人踩坑

Table of Contents

1 dired 无法访问文件

dired 可能因为权限无法正常运行,出现下面错误

Listing directory failed but 'access-file' worked

解决方法:

  1. 进入 System Preferences -> Security & Privacy, 选择 Privacy tab.
  2. 先选左侧 Full Disk Access
  3. 把 ruby 加入全盘访问中

2 tramp 的远端文件 PS1 环境变量问题

在远端 Linux 安装过 oh-my-zsh 后可能会出现 PS1 问题

Tramp: Waiting for prompts from remote shell...failed

解决方法: 在远端中添加如下配置

# fix emacs tramp error
if [[ "$TERM" == "dumb" ]]; then
  unsetopt zle
  unsetopt prompt_cr
  unsetopt prompt_subst
  # unfunction precmd
  # unfunction preexec
  PS1='$ '
fi

Last Updated 2021-11-10 Wed 12:02. Created by Jinghui Hu at 2021-11-10 Wed 11:50.