Coder Social home page Coder Social logo

auto-save's Introduction

Hi, I'm ManateeLazyCat

About Me

I often use English name Andy Stewart, my Chinese name is 王勇.

Here are some ideas to get you started:

  • Self-study computer and programming technology
  • Mobile game developer (2005 ~ 2007)
  • Create a clothing factory (2007 ~ 2009)
  • Pre-CTO of deepin operating system (2010 ~ 2018)
  • Own several IT companies now (2019 ~ now)
  • Like self-driving tour, live with kind wife and cute daughter
  • A lot of time on EAF and lsp-bridge

Skills: Python、C、C++、Emacs Lisp、Haskell、Golang、Vala、JavaScript、Ruby、Lua and more

Welcome to my Chinese blog: manateelazycat.github.io

Coding Life

Github Stats

Most Used Languages

Recent Activity

auto-save's People

Contributors

19260007-c9ac-4fd6-9307-0e845161a3c5 avatar cireu avatar ctrl2wei avatar eason0210 avatar loyalpartner avatar luhuaei avatar manateelazycat avatar wztdream avatar yilin-zhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

auto-save's Issues

conflict with blacken-mode

Hi,
auto-save is very useful, but when I used blacken-mode which is to format the python buffer on save, the cursor will jump to the beginning of the buffer when there is white space in current cursor, I set
(setq auto-save-delete-trailing-whitespace nil) but not work

I tried to debug the error but without success, so report issue here.

You can reproduce this by:

  1. clone auto-save and blacken repo
  2. eamcs -q -l test-init.el
  3. open .py file and type some string end with withe space, then the cursor will move to the beginning of buffer
;;; test-init.el
(add-to-list 'load-path "./auto-save")
(require 'auto-save)
(auto-save-enable)
(setq auto-save-silent t)   ; quietly save
(setq auto-save-delete-trailing-whitespace nil)  ; automatically delete spaces at the end of the line when saving

;;; custom predicates if you don't want auto save.
;;; disable auto save mode when current filetype is an gpg file.
(setq auto-save-disable-predicates
      '((lambda ()
          (string-suffix-p
           "gpg"
           (file-name-extension (buffer-name)) t))))
(add-to-list 'load-path "./blacken")
(require 'blacken)
(add-hook 'python-mode-hook 'blacken-mode)

在 org-capture 的 buffer 中会自动删除光标当前行的尾行空格

@manateelazycat

我发现在 org-capture 的 buffer 中,如果开启自动删除尾行空格的话,auto-save 触发时会自动删除当前行的空格,这会导致没法正常输入字符。

这个可能是跟 org-capture 的机制有关,具体什么原因我也不清楚。
你可以通过以下步骤重现:
1 . 启动终端,克隆 auto-save
cd ~/ && git clone [email protected]:manateelazycat/auto-save.git
2. 启动 emacs 并加载 auto-save.el
emacs -Q -l ~/auto-save/auto-save.el
3. 执行M-x auto-save-enable 启动 auto-save
4. 开启自动删除尾行空格
(setq auto-save-delete-trailing-whitespace t)
5. 执行M-x, org-capturet 启动 org-capture
6. 这时在当前行的“TODO”后面加按一个空格,空格马上就会被删除。这就是问题所在,如下图。
image

我目前使用的是 Emacs 29最新版,但这个问题其实在27的时候我就遇到过。
测试的平台:Windows 10,macOS

去行尾部的空白

(setq auto-save-delete-trailing-whitespace nil)

这个属性设置不生效呢~,还是会自动去掉尾部的空格。

有时候写代码,会习惯先打一个空格然后停下思考,过一会继续输入。这种情况每次自动保存都给自动删掉这个有用的空格,比较不方便。

auto-save-silent does not work

image

when i type in files ,it shows the save messages which make emacs so slow
ps: i have made the setting (setq auto-save-silent t)

会自动保存 buffer 的内容到移除了的文件

如题,比如在buffer 之前编辑了 A 文件,切换到另一个分支 A 文件是不存在的,当我切换到 A 文件到 buffer 中时,会自动保存buffer 中的内容到原 A 文件中

这个问题,不知道算不算是自动保存插件的问题。也有可能是 projectile 切换 project时应该自动关闭已移除的文件文件的 buffer ,避免切换到这些已移除文件的buffer 中

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.