2100Re: [jasspa] short questions
- Nov 6, 2006dsjkvf schrieb:
> On 11/6/06, dsjkvf <dsjkvf@...> wrote:From next-buffer(2):
>> i want to create a new file and apply certain template to it (in my
>> particular case i want the file's major mode be set to doc). of
>> course, i want to do it with one keypress :) (with macro, i think) --
>> in fact, it should be something like that: ask for a name for a new
>> buffer, create buffer with this name and then set buffer's major mode
>> to doc.
>> how new buffers are created in ME at all? i don't seem to find any
>> create-buffer command :).
"find-buffer switches to buffer "buffer-name" in the current window. If
the buffer does not exist and a zero argument n is supplied then the
command fails. If the buffer does not exist but no argument or a positive
argument n is specified then a new buffer is created, at which point the
file-hook is evaluated."
> in fact, i can even operate this way:I would rather try to set up a <mode>.etf file in your ME search path. It
> define-macro new-doc-file
> find-buffer "*scratch*"
> insert-string "> -!- document -!-"
> but then the highlighting will not work -- the file needs either to be
> reopen (and then the header will set it's major mode to doc) or i
> should set his mode manually via Tools -> Buffer setup -> Major mode.
> what do you think, is there any way to automate this procedure?
will be inserted automatically if you create a new file of the chosen mode.
E.g. I have a latex.etf in my ~/.jasspa file on Linux and if I press C-x
C-f newfile.tex then I get a new buffer with content of latex.etf in it.
Gruß / Regards
Da sie sich für weise hielten, sind sie zu Narren geworden. Rö 1,22
- << Previous post in topic Next post in topic >>