4

Whenever package updates a package in Emacs 24.4, and it asks me if I want to delete the previous version, it fails to do so even when I answer y. It gives me the following message:

Delete package `rich-minority-20140821.2020'? (y or n) y
Renaming

Is there a way to fix this?

  • I'm using GNU Emacs 24.4.1, on Debian 7.7 and I wasn't able to reproduce. The deletion was effective after the update. Is there something special/interesting in your *Messages* buffer? – Nsukami _ Dec 10 '14 at 1:53
  • 2
    This looks suspiciously like an advice gone rogue. Do you, by any chance, use an advice regarding file deletion? – Malabarba Dec 10 '14 at 2:23
  • 4
    In any case, try to reproduce this with emacs -Q. – Malabarba Dec 10 '14 at 2:24
  • 1
    @NVaughan make it work. Using emacs -Q, evaluate the configuration which adds your package archives (probably melpa). And then you should have some upgrades available. – Malabarba Dec 10 '14 at 23:32
  • 1
    C-h f shows you advises on the function. And it's probably that we should see your init files know, because your issue is most probably caused by a mis-configuration or a faulty package in your init file. – lunaryorn Dec 11 '14 at 13:17
1

Following the advice of Malabarba and lunaryon, I noticed this piece of code that was blocking the delete-directory function:

 (setq delete-by-moving-to-trash t
       trash-directory "~/.Trash/emacs")

I commented it and everything works fine now.


Update:

After trying a recommendation from Emacswiki, the following works fine:

 (setq delete-by-moving-to-trash t)
  (defun system-move-file-to-trash (file)
    "Use \"trash\" to move FILE to the system trash.
  When using Homebrew, install it using \"brew install trash\"."
    (call-process (executable-find "trash")
      nil 0 nil
      file))
  • I don't think that this should break package-delete. You don't happen to use trash-settings.el, do you? – lunaryorn Dec 11 '14 at 14:09
  • @lunaryorn No, I don't. – NVaughan Dec 11 '14 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.