From: Thibaut Verron <thibaut.verron@gmail.com>
To: Jean Louis <bugs@gnu.support>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: How to open file unconditionally?
Date: Sun, 16 Oct 2022 12:29:38 +0200 [thread overview]
Message-ID: <CAFsi02Ry1cnDhYFNOyz-kpZ9+N+pR5-HKcfJUut83O-G5kCPrg@mail.gmail.com> (raw)
In-Reply-To: <d3d70f03e7ff4b8dc46910573a0b46dc.support1@rcdrun.com>
Le dim. 16 oct. 2022 à 11:16, Jean Louis <bugs@gnu.support> a écrit :
> I wish to open file unconditionally. In my case I am opening
> dynamically generated pictures. Once picture is in Emacs, another
> dynamic picture is generated. I wish that find-file does not ask me
> yes/no when opening a file that already has a buffer. I want to simply
> open it without disturbance.
>
Unless I'm mistaken, this message will only appear if the buffer or the
file has been modified.
Do you want to switch to the existing buffer, or create a new buffer?
If it is the latter, this answer should do it:
https://emacs.stackexchange.com/a/52513/184
If it is the former, and assuming that you want to show the on-disk content
of the file, find-file-noselect has a 'nowarn second argument disabling the
prompt.
So (switch-to-buffer (find-file-noselect FILE t)) should work.
>
> I have tried following:
>
> (let ((confirm-nonexistent-file-or-buffer 1))
> (find-file svg)))))))
>
> but that does not get noticed by find-file
>
confirm-nonexistent-file-or-buffer seems to be about the opposite problem,
whether to query when the file/buffer does not exist, rather than create a
new one.
Best wishes,
Thibaut
next prev parent reply other threads:[~2022-10-16 10:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-16 9:13 How to open file unconditionally? Jean Louis
2022-10-16 10:29 ` Thibaut Verron [this message]
2022-10-17 4:01 ` Jean Louis
2022-10-17 8:59 ` Thibaut Verron
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=CAFsi02Ry1cnDhYFNOyz-kpZ9+N+pR5-HKcfJUut83O-G5kCPrg@mail.gmail.com \
--to=thibaut.verron@gmail.com \
--cc=bugs@gnu.support \
--cc=help-gnu-emacs@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.