From: Jean Magnan de Bornier <jean@bornier.net>
To: help-gnu-emacs@gnu.org
Subject: Re: LaTeX templates (or just templates in general)
Date: Sat, 16 May 2009 14:52:32 +0200 [thread overview]
Message-ID: <87my9ddxbj.fsf@bornier.net> (raw)
In-Reply-To: mailman.7255.1242453781.31690.help-gnu-emacs@gnu.org
Orri <orritomasson@gmail.com> wrote :
| I am rather new to emacs.
>
| I have used the editor TextMate on mac and it has a very nice feature I like
| and was wondering how I can acheive a similar thing in emacs.
>
| When I am in latex mode in textmate and write temp[tabkey], I can choose
| from a list of code segments to insert to the current file (or buffer). I
| often use this to insert frequently used code segments (3-10 lines) to
| achieve tasks I frequently do. These segments are stored in a folder named
| ~/Library/Applications Support/LaTeX/Templates
>
| I know I can use [C-x i], But it takes so much time to write the correct
| path every single time.
| So I am looking for something like [C-x i] except it by default starts in
| specified directory (rather than the current directory).
>
| I know I can of course, in every latex project directory specify a symbolic
| link (with a short name) to this directory, but I find it to be too much of
| dirty hack.
>
| Does anyone have any suggestions about how to acieve this?
Hi,
I have several elisp functions defined in my .emacs file to help me the
way you think: here is one to add a frame to a beamer document:
.....................
(defun addframe ()
"Ouvre une frame dans beamer"
(interactive)
(insert "\\begin{frame}
\\frametitle{}
\\end{frame}")
(backward-char 13)
(indent-for-tab-command)
)
(global-set-key (kbd "C-c f") 'addframe)
....................
You can write many of those to your needs...
--
Jean
next parent reply other threads:[~2009-05-16 12:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.7255.1242453781.31690.help-gnu-emacs@gnu.org>
2009-05-16 12:52 ` Jean Magnan de Bornier [this message]
2009-05-17 1:29 ` LaTeX templates (or just templates in general) Tim X
2009-05-16 17:43 ` Vagn Johansen
2009-05-17 0:55 ` Orri
2009-05-16 5:56 Orri
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=87my9ddxbj.fsf@bornier.net \
--to=jean@bornier.net \
--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.