unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 13159@debbugs.gnu.org
Subject: bug#13159: 24.3.50; `find-file-noselect' should not display or log messages
Date: Thu, 13 Dec 2012 19:27:31 +0200	[thread overview]
Message-ID: <83pq2dooak.fsf@gnu.org> (raw)
In-Reply-To: <E700D439375C4A959F45613EFD9B7F7B@us.oracle.com>

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Wed, 12 Dec 2012 10:46:07 -0800
> 
> I'm using `find-file-noselect', and I see this in *Messages*:
>  
>  Note: file is write protected
>  
> First, that is not helpful at all, without saying WHICH file is
> write-protected.
>  
> More importantly, why does it make sense to display or record
> such a message when the file is not visited interactively?

If you invoke this function non-interactively, pass it a non-nil value
as the 2nd argument.  That should shut up any messages from this
function or the subroutines it calls.  E.g.:

  (find-file-noselect "/foo/bar/nonexistent-file" t)

    => #<buffer nonexistent-file>

and no messages.

Does this solve your problem?





  parent reply	other threads:[~2012-12-13 17:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 18:46 bug#13159: 24.3.50; `find-file-noselect' should not display or log messages Drew Adams
2012-12-12 23:16 ` Juri Linkov
2012-12-12 23:31   ` Drew Adams
2012-12-13 17:27 ` Eli Zaretskii [this message]
2012-12-13 17:46   ` Drew Adams
2012-12-13 18:08     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83pq2dooak.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=13159@debbugs.gnu.org \
    --cc=drew.adams@oracle.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).