all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Wiesner <lunaryorn@gmail.com>
To: 14967@debbugs.gnu.org
Subject: bug#14967: 24.3.50; package-delete deletes by trashing?
Date: Sat, 27 Jul 2013 12:30:15 +0200	[thread overview]
Message-ID: <m238r0nvm0.fsf@lunaryorn-air.fritz.box> (raw)

Currently "package-delete" from package.el is implemented as follows:

(defun package-delete (pkg-desc)
  (let ((dir (package-desc-dir pkg-desc)))
    (if (not (string-prefix-p (file-name-as-directory
                               (expand-file-name package-user-dir))
                              (expand-file-name dir)))
        ;; Don't delete "system" packages.
	(error "Package `%s' is a system package, not deleting"
               (package-desc-full-name pkg-desc))
      (delete-directory dir t t)
      ;; Update package-alist.
      (let* ((name (package-desc-name pkg-desc)))
        (delete pkg-desc (assq name package-alist)))
      (message "Package `%s' deleted." (package-desc-full-name
  pkg-desc)))))

Note that the call to "delete-directory" gives t as the 3rd argument,
thus allowing for deletion by moving to trash depending on
"delete-by-moving-to-trash".

Is that intended behavior?  If so, what is the rationale behind it?





             reply	other threads:[~2013-07-27 10:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-27 10:30 Sebastian Wiesner [this message]
2013-07-29 22:02 ` bug#14967: 24.3.50; package-delete deletes by trashing? Glenn Morris
2013-07-30 10:51   ` Sebastian Wiesner
2013-07-30 14:21     ` Stefan Monnier
2013-07-30 14:40       ` Sebastian Wiesner
2013-07-30 15:14         ` Stefan Monnier
2016-08-05 23:40           ` npostavs
2016-09-03  4:06       ` Alex
2017-06-11 23:58         ` npostavs
2017-06-12  3:26           ` Alex
2017-06-12 14:27             ` Eli Zaretskii
2017-06-12 16:03               ` Glenn Morris
2017-06-12 16:33                 ` Eli Zaretskii
2017-06-12 16:56                   ` Glenn Morris
2017-06-12 17:02                     ` Stefan Monnier
2017-06-14  2:54                       ` Richard Stallman
2017-06-12 17:04                     ` Eli Zaretskii
2017-06-12 17:17                       ` Stefan Monnier
2017-06-12 19:45                         ` Alex
2017-06-12 20:32                           ` Glenn Morris
2017-06-13  3:50                             ` Alex
2017-06-19 18:47                             ` Glenn Morris
2017-06-12 19:37               ` Alex

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m238r0nvm0.fsf@lunaryorn-air.fritz.box \
    --to=lunaryorn@gmail.com \
    --cc=14967@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.