emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: LanX <lanx.perl@googlemail.com>
Cc: Dan Davison <davison@stats.ox.ac.uk>, emacs-orgmode@gnu.org
Subject: Re: Embedding org-syntax in program source
Date: Wed, 14 Apr 2010 14:39:56 +0200	[thread overview]
Message-ID: <87633u1a3n.fsf@gmx.de> (raw)
In-Reply-To: <w2vec36f5051004131654oc62ea56if149e0be824e43ef@mail.gmail.com> (LanX's message of "Wed, 14 Apr 2010 01:54:13 +0200")

Hi,


I think there's no need for Org-mode in programming modes. I see
Org-mode as emacs' programming mode for plain text.


LanX <lanx.perl@googlemail.com> writes:
> my idea for the beginning was to extend my codes with org-modes folding,
> linking and some TODO features in perl comments. Maybe automatically
> switching the mode when the cursor is entering/leaving comments.

It's all there! For folding I use hs-minor-mode, for linking I still
stick with some old keyboard shortcuts here:

* `H-o o'  => 'org-open-at-point-global
* `H-o l'  => 'org-insert-link-global
* `C-c l'  => 'org-store-link

* `F3'     => 'find-file-at-point

  When in emacs-lisp mode, it will open the appropriate *.el file when
  on the symbol, no matter where I store htmlize.el on my system:

     (require 'htmlize)

  In c-mode, place point on unistd.h and press F3 to open
  /usr/include/unistd.h:

     #include <unistd.h>

  But it will find relative paths, too.


* `M-up'   => 'backward-page
* `M-down' => 'forward-page

   `C-q C-l' inserts the formfeed. I tend to divide source files into
   pages and group functions, classes, methods that way. Does not work
   in PHP, :-/ PHP does not consider ^L a whitespace character...but
   those guys don't even consider it a bug :-D


* `M-+'     => 'hs-toggle-hiding

   Finally, here's your fast and simple folding.


All these shortcuts work in comments, too.




>> And relying on an extra step for code generation is dangerous...

I'm a control freak myself - that's why I use emacs in the end :-)




Best wishes

   Sebastian

  reply	other threads:[~2010-04-14 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-13 10:32 Embedding org-syntax in program source LanX
2010-04-13 15:08 ` Eric Schulte
     [not found]   ` <y2wec36f5051004130835k5d850907h35f6645b5f5fef17@mail.gmail.com>
2010-04-13 15:40     ` LanX
2010-04-13 16:47       ` Eric Schulte
2010-04-13 21:31       ` Dan Davison
2010-04-13 23:54         ` LanX
2010-04-14 12:39           ` Sebastian Rose [this message]
2010-04-14 15:22           ` Dan Davison
2010-04-13 16:12 ` Dan Davison

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=87633u1a3n.fsf@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=lanx.perl@googlemail.com \
    /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).