Giter Club home page Giter Club logo

Comments (3)

felixwiemuth avatar felixwiemuth commented on June 19, 2024 1

Thanks that would be really nice!
Maybe for the beginning changing delete for trash would be a quick first step.

from emacs-conflict.

ibizaman avatar ibizaman commented on June 19, 2024

That’s a good idea! I don’t know when I’ll have time to work on all this but I’ll try to at least take a pass at having an archive / trash / rename feature.

from emacs-conflict.

felixwiemuth avatar felixwiemuth commented on June 19, 2024

I also noticed that conflict files deleted by emacs-conflict-resolve-conflicts still show up under recent buffers, which is not the case for files deleted with spacemacs/delete-file, which I otherwise use. If I execute delete-file (as used by this script) interactively, it asks whether to trash but then just clears the file content, keeping the empty file, which again is another behaviour.

Looking at the documentation for delete-file, I discovered that it has a trash argument, which might be useful here:

(delete-file FILENAME &optional TRASH)

Probably introduced at or before Emacs version 1.6.

This function has :before advice: ‘delete-file-projectile-remove-from-cache’.

Delete file named FILENAME. If it is a symlink, remove the symlink.
If file has multiple names, it continues to exist with the other names.
TRASH non-nil means to trash the file instead of deleting, provided
‘delete-by-moving-to-trash’ is non-nil.

When called interactively, TRASH is t if no prefix argument is given.
With a prefix argument, TRASH is nil.

from emacs-conflict.

Related Issues (3)

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.