From mboxrd@z Thu Jan 1 00:00:00 1970 From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) Subject: Re: Using orgstruct-mode (or just org-cycle) in emacs-lisp-mode Date: Sun, 08 Nov 2015 12:36:24 -0500 Message-ID: <87pozk1jhj.fsf@yale.edu> References: <87oaf4wn30.fsf@bernoul.li> <87vb9c7bui.fsf@nicolasgoaziou.fr> <87a8qofq62.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvTtN-0003UZ-H3 for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 12:36:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvTtK-0006XZ-BK for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 12:36:37 -0500 Received: from plane.gmane.org ([80.91.229.3]:42063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvTtK-0006XU-5j for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 12:36:34 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZvTtI-00049O-QZ for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 18:36:33 +0100 Received: from 130.132.236.141 ([130.132.236.141]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Nov 2015 18:36:32 +0100 Received: from jorge.alfaro-murillo by 130.132.236.141 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Nov 2015 18:36:32 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Jonas Bernoulli writes: > `orgstruct-mode' sounds like it could be really useful too, but > as I mentioned it doesn't work for me at all. So for now I > would like to stick to just `outline-minor-mode'. > > Thanks > Jonas > > Ps: I am still not sure whether I am just doing something stupid > or why else `orgstruct-mode' doesn't work for me. So I would > apprechiate a little tutorial starting from emacs -Q that > demonstrates what setup is required and what keys I have to > press for things to happen. Generally it is enough to set orgstruct-heading-prefix-regexp and turn-on-orgstruct. I do this on a per mode basis, for example: #+BEGIN_SRC emacs-lisp (add-hook 'elisp-mode-hook 'turn-on-orgtbl) (add-hook 'elisp-mode-hook (lambda () (setq-local orgstruct-heading-prefix-regexp ";; "))) #+END_SRC Then you can organize your code using ;; * section-name ;; ** subsection-name and folding with TAB, shift-TAB, etc will work when you are in those lines. To use lists you just have to start a line with -, +, 1., etc and then lists keybindings work, for example M-C-m for new items. I do not know why lists do not respect orgstruct-heading-prefix-regexp, it has always seem weird to me that I cannot gain orgstruct functionality with something like: ;; - first item ;; - second item -- Jorge.