all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Glenn Morris <rgm@gnu.org>
Cc: Jonathan H <pythonnut@gmail.com>, 17155@debbugs.gnu.org
Subject: bug#17155: 24.3; ELPA files should not appear in recentf
Date: Tue, 20 May 2014 05:58:20 +0300	[thread overview]
Message-ID: <87iop1w3zn.fsf@yandex.ru> (raw)
In-Reply-To: <3qd2fvoium.fsf@fencepost.gnu.org> (Glenn Morris's message of "Fri, 02 May 2014 19:34:41 -0400")

Glenn Morris <rgm@gnu.org> writes:

> I think this is because package.el uses `save-buffer'.
>
> Unless it really needs to do that, I think it should use something more
> low-level.

The patch below seems to work okay:


=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el	2014-03-28 22:47:46 +0000
+++ lisp/emacs-lisp/package.el	2014-05-20 02:53:29 +0000
@@ -1245,9 +1245,7 @@
       (when (listp (read (current-buffer)))
 	(make-directory dir t)
 	(setq buffer-file-name (expand-file-name file dir))
-	(let ((version-control 'never)
-              (require-final-newline nil))
-	  (save-buffer))))
+	(basic-save-buffer-1)))
     (when good-signatures
       ;; Write out good signatures into archive-contents.signed file.
       (write-region (mapconcat #'epg-signature-to-string good-signatures "\n")
@@ -1495,9 +1493,11 @@
                          (format "%s-readme.txt" name)
                        (setq buffer-file-name
                              (expand-file-name readme package-user-dir))
-                       (let ((version-control 'never)
-                             (require-final-newline t))
-                         (save-buffer))
+                       (save-excursion
+                         (goto-char (point-max))
+                         (unless (bolp)
+                           (insert ?\n)))
+                       (basic-save-buffer-1)
                        (setq readme-string (buffer-string))
                        t))
 		 (error nil))






  reply	other threads:[~2014-05-20  2:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 22:39 bug#17155: 24.3; ELPA files should not appear in recentf Jonathan H
2014-05-02 23:34 ` Glenn Morris
2014-05-20  2:58   ` Dmitry Gutov [this message]
2014-05-20  6:16     ` Glenn Morris
2014-05-20 13:04       ` Dmitry Gutov
2014-05-20 15:35         ` Stefan Monnier
2014-05-21  2:16           ` Dmitry Gutov
2014-05-20 14:15       ` Stefan Monnier

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=87iop1w3zn.fsf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=17155@debbugs.gnu.org \
    --cc=pythonnut@gmail.com \
    --cc=rgm@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.