emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Custom keymaps on org blocks
Date: Tue, 6 Jun 2017 20:22:19 -0500	[thread overview]
Message-ID: <CAAjq1me9eGqPKS+BXzwSABLH+VGRKi0i_ybuYLL_h=-NiimV7Q@mail.gmail.com> (raw)
In-Reply-To: <m2bmq2nlsy.fsf@andrew.cmu.edu>

On Mon, Jun 5, 2017 at 4:53 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> Is there any interest in having custom keymaps on org blocks?
>
> The idea I had is to have the option to make the major-mode keymaps be
> active on the src blocks.

You want Polymode: https://github.com/vspinu/polymode

> I have tried this, and seems ok, and I wondered if anyone had an opinion
> for or against this idea.

It is confusing alternating between the Org major a mode and the
source block major mode as you scroll through documents. One second
you are an author for humans and the other an author for the computer.
That is how literate programming is defined in theory, but in practice
I don't do it like that because it is mentally jarring.

I spell check my Org-Mode Literate Documents. But the spell checker
does not check source blocks. That is up to the major mode for that
source block, not for the containing literate document. When you think
about it, probably every Org-Mode literate programming has it set up
this way, otherwise the spell checker would go crazy on typical source
code. That is revealing. The source blocks are very different "things"
than the containing document.

For me the source block is another cognitive workspace that I enter
consciously. I am digging deeper into the document itself. For me the
source block is a window into that world of the source block. In the
top level document I write literature about things, including the
various source blocks. Then I jump into editing the source block
itself.

John you once had a discussion (or answered a (my?) question) about
making source blocks not-editable. That is how I would like it to work
all the time. That is why I don't fontify source blocks natively and
that is why I wouldn't enjoy what you describe.

  parent reply	other threads:[~2017-06-07  1:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 21:53 Custom keymaps on org blocks John Kitchin
2017-06-06 18:16 ` Nicolas Goaziou
2017-06-07 12:58   ` John Kitchin
2017-06-07 13:21     ` Nicolas Goaziou
2017-06-07 13:50       ` John Kitchin
2017-06-08  0:22         ` Grant Rettke
2017-06-10  9:03         ` Nicolas Goaziou
2017-06-10 13:58           ` John Kitchin
2017-06-10 19:31             ` John Kitchin
2018-09-05 15:52               ` Matt Price
2017-06-07  1:22 ` Grant Rettke [this message]
2017-06-07 12:49   ` John Kitchin
2017-06-07 23:52     ` Grant Rettke

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='CAAjq1me9eGqPKS+BXzwSABLH+VGRKi0i_ybuYLL_h=-NiimV7Q@mail.gmail.com' \
    --to=gcr@wisdomandwonder.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /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).