all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: set-buffer-major-mode: how to use on buffer without file?
Date: Thu, 25 Mar 2021 18:07:38 +0300	[thread overview]
Message-ID: <YFynOtOrUh4/Wm7x@protected.localdomain> (raw)
In-Reply-To: <jwvmturcnwa.fsf-monnier+emacs@gnu.org>

* Stefan Monnier <monnier@iro.umontreal.ca> [2021-03-25 17:31]:
> > I would like to set major mode for the buffer which only displays a
> > revision in a buffer without associated file.
> 
> Your use of "the buffer" above is hilarious: it makes it sound like we
> all should know, as a matter of course, which buffer it is you're
> talking about, like if it had been on the front page of the newspaper
> or something.

I have not expressed myself clearly, I have buffers that come from
database, and are not associated to the file within Emacs
context. Within program they are associated with the file with
specific extension.

vcfiles_filename entry may be "/home/admin/new.scm"

and buffer name becomes something like:

RCD VC Revision ID: 12, /home/admin/new.scm

so buffer is not really associated within Emacs context to file name,
within program's context it is directly associated. Now when I entered
the sphere of auto mode settings I can see that for buffers that
function is missing, or is not there. Am I right?

set-auto-mode function does not verify anything for buffers how I see
it. Maybe it would be better to have something for buffers not
associated to files.

Right now I am doing that trick to associate the file to buffer and
then set auto mode, and then I can disassociate file from buffer. I am
then associating the above example with
/home/admin/RCD-VC-Revision-ID-12-new.scm as that way it becomes
unique file.

So it is solved on my side.

But I still think that auto mode should also work in buffers without
file, at least when user enables it.

Jean



      reply	other threads:[~2021-03-25 15:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25  7:53 set-buffer-major-mode: how to use on buffer without file? Jean Louis
2021-03-25 14:26 ` Stefan Monnier
2021-03-25 15:07   ` Jean Louis [this message]

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=YFynOtOrUh4/Wm7x@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.