emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#24036: closed (25.0.95; Prevent warnings when open


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24036: closed (25.0.95; Prevent warnings when opening files during desktop restore)
Date: Fri, 22 Jul 2016 19:58:02 +0000

Your message dated Fri, 22 Jul 2016 19:57:09 +0000
with message-id <address@hidden>
and subject line Re: 25.0.95; Prevent warnings when opening files during 
desktop restore
has caused the debbugs.gnu.org bug report #24036,
regarding 25.0.95; Prevent warnings when opening files during desktop restore
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24036: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24036
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.0.95; Prevent warnings when opening files during desktop restore Date: Wed, 20 Jul 2016 13:58:15 +0000
Hi,

This bug report is more like a minor enhancement in the process of file restoration during desktop-restore.

@Juanma, Stefan: I am copying you guys to review this as this section of desktop.el has commits made by you the most. (PS: vc-region-history is awesome!)

I use the *Messages* buffer at startup as a check that everything's good in my config.

But as I use desktop save/restore in my workflow, I also get stuff like

Note: file is write protected [2 times]
<something else>
Note: file is write protected [19 times]
<something else>
Note: file is write protected 
<something else>
Note: file is write protected [3 times]

Finally after much digging I had figured out that it is `desktop-restore-file-buffer` that is causing this. 

I understand that "file is write protected" and other warning are useful to the user when they are doing find-file interactively. But in this scenario, they just add clutter in the *Messages* buffer and provide no useful debug info.

The patch that I am proposing in this report has been living in my emacs config since Nov 2014! and I have not seen a single bad side-effect of that. I hope this get merged into the master.

===== patch start
From e5fdf14a387248c282abd94effe7f97be51340b5 Mon Sep 17 00:00:00 2001
From: Kaushal Modi <address@hidden>
Date: Wed, 20 Jul 2016 09:50:38 -0400
Subject: [PATCH] No find-file warnings during desktop-restore

* lisp/desktop.el (desktop-restore-file-buffer): Do not print warnings
  when files are being opened during desktop restore.
---
 lisp/desktop.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/desktop.el b/lisp/desktop.el
index 1f460b7..df4ff55 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1402,7 +1402,7 @@ desktop-restore-file-buffer
  (or coding-system-for-read
     (cdr (assq 'buffer-file-coding-system
        desktop-buffer-locals))))
-       (buf (find-file-noselect buffer-filename)))
+       (buf (find-file-noselect buffer-filename :nowarn)))
   (condition-case nil
       (switch-to-buffer buf)
     (error (pop-to-buffer buf)))
-- 
2.6.0.rc0.24.gec371ff
===== patch end


In GNU Emacs 25.0.95.11 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
 of 2016-06-29
Repository revision: 6192b6c3a4374b2cb6e02ca865e1899a04a7f7dc
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Workstation release 6.6 (Santiago)

Thanks!
--

Kaushal Modi


--- End Message ---
--- Begin Message --- Subject: Re: 25.0.95; Prevent warnings when opening files during desktop restore Date: Fri, 22 Jul 2016 19:57:09 +0000
Thanks!

On Fri, Jul 22, 2016 at 2:49 PM Stefan Monnier <address@hidden> wrote:
> Can you please commit it to master when you get a chance?

Done,
--

Kaushal Modi


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]