From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philip Rooke Subject: Re: Re: Suggestions on list create/edit commands: Date: Sun, 14 May 2006 13:35:48 +0100 Message-ID: <87ac9k3hsr.fsf@sarge.yax.org.uk> References: <17502.40561.129424.558703@localhost.localdomain> <7e4a61cd45a7242e6fdc788c21a98b8e@science.uva.nl> <17507.62823.384215.54685@localhost.localdomain> <3d3d5883e14e6a91427aef741fabf487@science.uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfFp8-0007ot-Qk for emacs-orgmode@gnu.org; Sun, 14 May 2006 08:35:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfFp7-0007oW-DT for emacs-orgmode@gnu.org; Sun, 14 May 2006 08:35:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfFp7-0007oK-7S for emacs-orgmode@gnu.org; Sun, 14 May 2006 08:35:49 -0400 Received: from [81.2.121.252] (helo=sarge.yax.org.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FfFrI-0007Kf-FT for emacs-orgmode@gnu.org; Sun, 14 May 2006 08:38:04 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org Carsten Dominik 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 [...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