From: Philip Rooke <phil@yax.org.uk>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Suggestions on list create/edit commands:
Date: Sun, 14 May 2006 13:35:48 +0100 [thread overview]
Message-ID: <87ac9k3hsr.fsf@sarge.yax.org.uk> (raw)
In-Reply-To: 3d3d5883e14e6a91427aef741fabf487@science.uva.nl
Carsten Dominik <dominik@science.uva.nl> writes:
> On May 12, 2006, at 4:39, T. V. Raman wrote:
>>
>>
>> 1) orgtbl is nice as a minor mode. Why not go once step
>> further and enable org as a minor mode; it would be nice
>> to be able to create structured lists in email.
>
> I don't know how this would be possible. The org-mode keymap would
> take over, no key from the current major mode would keep working.
> Orgtbl used a rather complicated trick to function in tables while
> leaving things to the major mode outside tables. I don't see how a
> similar trick could work for the whole file.
>
> One could construct a restricted minor mode with some functionality -
> what stuff should be in there?
I know this is not what you are asking for, but I find the following
very helpful when I want to use org-mode facilities to quickly create a
piece of text whilst in an email message or, indeed, anywhere else:
(defun popup-input-buffer ()
"Provide an input buffer in a specified mode."
(interactive)
(let ((buffer-name (generate-new-buffer-name "*input*"))
(mode (intern
(completing-read
"Mode: "
(mapcar (lambda (e)
(list (symbol-name e)))
(apropos-internal "-mode$" 'commandp))
nil t))))
(pop-to-buffer (make-indirect-buffer (current-buffer) buffer-name))
(narrow-to-region (point) (point))
(funcall mode)
(let ((map (copy-keymap (current-local-map))))
(define-key map (kbd "C-c C-c")
(lambda ()
(interactive)
(kill-buffer nil)
(delete-window)))
(use-local-map map))
(shrink-window-if-larger-than-buffer)))
Whilst in some mode other than org-mode simply:
M-x popup-input-buffer
org-mode <ret>
[...use org-mode...]
C-c C-c
I can claim no credit for this idea, I found the function in a GPL'd file
of elisp snippets written by someone called Mark Triggs.
Phil
next prev parent reply other threads:[~2006-05-14 12:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-08 1:27 org and remember: T. V. Raman
2006-05-11 11:53 ` Carsten Dominik
2006-05-11 12:00 ` Carsten Dominik
2006-05-12 2:39 ` Suggestions on list create/edit commands: T. V. Raman
2006-05-12 4:41 ` Carsten Dominik
2006-05-14 12:35 ` Philip Rooke [this message]
2006-05-14 16:07 ` T. V. Raman
2006-05-14 16:32 ` Carsten Dominik
2006-05-14 16:16 ` T. V. Raman
2006-05-14 16:20 ` Carsten Dominik
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=87ac9k3hsr.fsf@sarge.yax.org.uk \
--to=phil@yax.org.uk \
--cc=dominik@science.uva.nl \
--cc=emacs-orgmode@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.