From mboxrd@z Thu Jan 1 00:00:00 1970 From: "T. V. Raman" Subject: Re: Re: Suggestions on list create/edit commands: Date: Sun, 14 May 2006 09:07:23 -0700 Message-ID: <17511.21947.794305.677405@localhost.localdomain> References: <17502.40561.129424.558703@localhost.localdomain> <7e4a61cd45a7242e6fdc788c21a98b8e@science.uva.nl> <17507.62823.384215.54685@localhost.localdomain> <3d3d5883e14e6a91427aef741fabf487@science.uva.nl> <87ac9k3hsr.fsf@sarge.yax.org.uk> Reply-To: raman@users.sf.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfJ86-0007T8-J8 for emacs-orgmode@gnu.org; Sun, 14 May 2006 12:07:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfJ7z-0007OG-Vg for emacs-orgmode@gnu.org; Sun, 14 May 2006 12:07:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfJ7z-0007Nv-2K for emacs-orgmode@gnu.org; Sun, 14 May 2006 12:07:31 -0400 Received: from [216.148.227.153] (helo=rwcrmhc13.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FfJAC-0006iR-7r for emacs-orgmode@gnu.org; Sun, 14 May 2006 12:09:48 -0400 In-Reply-To: <87ac9k3hsr.fsf@sarge.yax.org.uk> 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: phil@yax.org.uk Cc: emacs-orgmode@gnu.org this is nice. given that newer emacsuns can have a region-specific region, I wonder if it would be possible to turn this pop-input-buffer trick around and allow one to create regions in an email message that have org mode on. >>>>> "Philip" == Philip Rooke writes: Philip> Carsten Dominik writes: Philip> >> 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? Philip> Philip> I know this is not what you are asking for, but I Philip> find the following very helpful when I want to use Philip> org-mode facilities to quickly create a piece of text Philip> whilst in an email message or, indeed, anywhere else: Philip> Philip> (defun popup-input-buffer () "Provide an input buffer Philip> in a specified mode." (interactive) (let Philip> ((buffer-name (generate-new-buffer-name "*input*")) Philip> (mode (intern (completing-read "Mode: " (mapcar Philip> (lambda (e) (list (symbol-name e))) (apropos-internal Philip> "-mode$" 'commandp)) nil t)))) (pop-to-buffer Philip> (make-indirect-buffer (current-buffer) buffer-name)) Philip> (narrow-to-region (point) (point)) (funcall mode) Philip> Philip> (let ((map (copy-keymap (current-local-map)))) Philip> (define-key map (kbd "C-c C-c") (lambda () Philip> (interactive) (kill-buffer nil) (delete-window))) Philip> (use-local-map map)) Philip> (shrink-window-if-larger-than-buffer))) Philip> Philip> Whilst in some mode other than org-mode simply: Philip> Philip> M-x popup-input-buffer org-mode [...use Philip> org-mode...] C-c C-c Philip> Philip> I can claim no credit for this idea, I found the Philip> function in a GPL'd file of elisp snippets written by Philip> someone called Mark Triggs. Philip> Philip> Phil Philip> Philip> Philip> Philip> Philip> Philip> Philip> _______________________________________________ Philip> Emacs-orgmode mailing list Emacs-orgmode@gnu.org Philip> http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs