all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Sebastian Wiesner <lunaryorn@gmail.com>
Cc: Tom Tromey <tromey@redhat.com>, Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Inhibit "Wrote foo" from write-region
Date: Wed, 22 Jan 2014 10:09:06 -0500	[thread overview]
Message-ID: <jwvob342gwx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2ppnkkxa3.fsf@lunaryorn-air.fritz.box> (Sebastian Wiesner's message of "Wed, 22 Jan 2014 13:37:24 +0100")

In the case at hand, I think that package.el should never need to say
"write file <foo>".  What do you think of the patch below?


        Stefan


=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el	2014-01-22 01:50:40 +0000
+++ lisp/emacs-lisp/package.el	2014-01-22 15:08:04 +0000
@@ -641,7 +641,7 @@
 	     ";; End:\n"
 	     ";;; " (file-name-nondirectory file)
 	     " ends here\n")
-     nil file))
+     nil file nil 'silent))
   file)
 
 (defvar generated-autoload-file)
@@ -710,7 +710,7 @@
            (package-desc-extras pkg-desc))))
         "\n")
        nil
-       pkg-file))))
+       pkg-file nil 'silent))))
 
 (defun package--alist-to-plist (alist)
   (apply #'nconc (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist)))
@@ -759,7 +759,7 @@
 
 (defun package--write-file-no-coding (file-name)
   (let ((buffer-file-coding-system 'no-conversion))
-    (write-region (point-min) (point-max) file-name)))
+    (write-region (point-min) (point-max) file-name nil 'silent)))
 
 (defmacro package--with-work-buffer (location file &rest body)
   "Run BODY in a buffer containing the contents of FILE at LOCATION.
@@ -874,7 +874,8 @@
 		    (expand-file-name
 		     (concat (package-desc-full-name pkg-desc)
 			     ".signed")
-		     package-user-dir))
+		     package-user-dir)
+                    ni 'silent)
       ;; Update the old pkg-desc which will be shown on the description buffer.
       (setf (package-desc-signed pkg-desc) t)
       ;; Update the new (activated) pkg-desc as well.
@@ -1280,7 +1281,8 @@
       ;; Write out good signatures into archive-contents.signed file.
       (write-region (mapconcat #'epg-signature-to-string good-signatures "\n")
 		    nil
-		    (expand-file-name (concat file ".signed") dir)))))
+		    (expand-file-name (concat file ".signed") dir)
+                    nil 'silent))))
 
 (declare-function epg-check-configuration "epg-config"
 		  (config &optional minimum-version))
@@ -1636,10 +1638,12 @@
 Letters do not insert themselves; instead, they are commands.
 \\<package-menu-mode-map>
 \\{package-menu-mode-map}"
-  (setq tabulated-list-format [("Package" 18 package-menu--name-predicate)
+  (setq tabulated-list-format
+        `[("Package" 18 package-menu--name-predicate)
 			       ("Version" 12 nil)
 			       ("Status"  10 package-menu--status-predicate)
-			       ("Archive" 10 package-menu--archive-predicate)
+          ,@(if (cdr package-archives)
+                '(("Archive" 10 package-menu--archive-predicate)))
 			       ("Description" 0 nil)])
   (setq tabulated-list-padding 2)
   (setq tabulated-list-sort-key (cons "Status" nil))
@@ -1825,19 +1829,20 @@
 		(`"unsigned"  'font-lock-warning-face)
 		(_            'font-lock-warning-face)))) ; obsolete.
     (list pkg-desc
-	  (vector (list (symbol-name (package-desc-name pkg-desc))
+	  `[,(list (symbol-name (package-desc-name pkg-desc))
 			'face 'link
 			'follow-link t
 			'package-desc pkg-desc
 			'action 'package-menu-describe-package)
-		  (propertize (package-version-join
+            ,(propertize (package-version-join
                                (package-desc-version pkg-desc))
 			      'font-lock-face face)
-		  (propertize status 'font-lock-face face)
-		  (propertize (or (package-desc-archive pkg-desc) "")
-                              'font-lock-face face)
-		  (propertize (package-desc-summary pkg-desc)
-                              'font-lock-face face)))))
+            ,(propertize status 'font-lock-face face)
+            ,@(if (cdr package-archives)
+		  (list (propertize (or (package-desc-archive pkg-desc) "")
+                                    'font-lock-face face)))
+            ,(propertize (package-desc-summary pkg-desc)
+                         'font-lock-face face)])))
 
 (defun package-menu-refresh ()
   "Download the Emacs Lisp package archive.




  reply	other threads:[~2014-01-22 15:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 12:32 Inhibit "Wrote foo" from write-region Sebastian Wiesner
2014-01-21 12:38 ` Sebastian Wiesner
2014-01-21 15:57   ` Eli Zaretskii
2014-01-21 16:31     ` Sebastian Wiesner
2014-01-21 16:47       ` Eli Zaretskii
2014-01-22 12:35         ` Sebastian Wiesner
2014-01-22 15:11           ` Stefan Monnier
2014-01-22 17:00             ` Sebastian Wiesner
     [not found]       ` <<834n4xgu3z.fsf@gnu.org>
2014-01-21 17:59         ` Drew Adams
2014-01-21 18:26           ` Eli Zaretskii
2014-01-22  8:05           ` Juri Linkov
2014-01-21 16:42 ` Tom Tromey
2014-01-22 12:37   ` Sebastian Wiesner
2014-01-22 15:09     ` Stefan Monnier [this message]
2014-01-22 17:08       ` Sebastian Wiesner
2014-01-22 19:20         ` Stefan Monnier
2014-01-23  9:35           ` Sebastian Wiesner
2014-01-23 13:50             ` Stefan Monnier
2014-01-23 14:24               ` Sebastian Wiesner
2014-01-23 15:18                 ` Stefan Monnier
2014-01-23 16:15                   ` Sebastian Wiesner
2014-01-23 16:29                 ` Eli Zaretskii
2014-01-23 17:31                   ` Sebastian Wiesner
2014-01-23 18:04                     ` Eli Zaretskii
2014-01-24 20:14                       ` Sebastian Wiesner
2014-01-23 16:25               ` Eli Zaretskii
2014-01-23 17:37                 ` Sebastian Wiesner
2014-01-23 18:07                   ` Eli Zaretskii
2014-01-24 13:34                     ` Johan Andersson
2014-01-24 13:48                       ` Stefan Monnier
2014-01-24 14:25                       ` Eli Zaretskii
     [not found] <"<m2r481o6rh.fsf"@lunaryorn-air.fritz.box>

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=jwvob342gwx.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lunaryorn@gmail.com \
    --cc=tromey@redhat.com \
    /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.