emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Patrick Drechsler <patrick@pdrechsler.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: usage of bgein_src in 'Literal examples' section
Date: Wed, 04 Jun 2008 21:58:10 -0400	[thread overview]
Message-ID: <87lk1k63t9.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <484743F5.3090100@pdrechsler.de> (Patrick Drechsler's message of "Thu\, 05 Jun 2008 03\:40\:05 +0200")

Patrick Drechsler <patrick@pdrechsler.de> writes:

> But how do I find out which is the correct string for the Emacs mode?
>
> Is there a `M-x describe-??' method?

I think any function ending in '-mode' would be valid

If you open a file and it automatically loads the correct mode the mode
is listed on the modeline in ()
e.g. while composing this message it's (Message MML Fly OrgStruct) as
major mode and minor modes.

There's a variable 'auto-mode-alist' (C-h v auto-mode-alist) which lists
the mappings of filenames to modes.

I have entries like this in mine:

 ("\\.txt$" . outline-mode)
 ("\\.css\\'" . css-mode)
 ("\\.py\\'" . python-mode)
etc

so for *.py files which use python-mode

#+BEGIN_SRC python
def foo():
    print "in foo"
    10

if __name__ == '__main__':
    foo()
#+END_SRC

HTH,
Bernt

PS. Sorry I didn't answer that the first time around...

  reply	other threads:[~2008-06-05  1:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04 22:21 usage of bgein_src in 'Literal examples' section Patrick Drechsler
2008-06-05  0:30 ` Bernt Hansen
2008-06-05  1:40   ` Patrick Drechsler
2008-06-05  1:58     ` Bernt Hansen [this message]
2008-06-06 10:39       ` Patrick Drechsler
2008-06-06 11:27         ` Dominik, C.
2008-06-07 13:44           ` Patrick Drechsler

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87lk1k63t9.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=patrick@pdrechsler.de \
    /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/org-mode.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).