From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: bugs in C-* Date: Wed, 21 Jan 2009 18:43:07 +0100 Message-ID: <16043C00-30E4-46E0-9BBE-4CF8ADBA6D78@uva.nl> References: <200812291702.mBTH2sVD004384@bp34.u.washington.edu> <49592BC2.2090400@u.washington.edu> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: multipart/mixed; boundary="===============1154188408==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPh6l-0007Ox-Hh for emacs-orgmode@gnu.org; Wed, 21 Jan 2009 12:43:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPh6i-0007LF-7V for emacs-orgmode@gnu.org; Wed, 21 Jan 2009 12:43:18 -0500 Received: from [199.232.76.173] (port=41460 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPh6h-0007L0-UT for emacs-orgmode@gnu.org; Wed, 21 Jan 2009 12:43:16 -0500 Received: from mail-ew0-f20.google.com ([209.85.219.20]:59364) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPh6h-00087z-9k for emacs-orgmode@gnu.org; Wed, 21 Jan 2009 12:43:15 -0500 Received: by ewy13 with SMTP id 13so1890343ewy.18 for ; Wed, 21 Jan 2009 09:43:12 -0800 (PST) In-Reply-To: <49592BC2.2090400@u.washington.edu> 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: Scott Otterson Cc: emacs-orgmode@gnu.org --===============1154188408== Content-Type: multipart/alternative; boundary=Apple-Mail-1-849517494 --Apple-Mail-1-849517494 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi, following this thread, I have revisited the commands `C-c -' and `C-c *' and hope that they are now better behaved and more useful: If there is an active region, these commands will act on the region, otherwise on the current line. C-c - This command turns headings or normal lines into items, or items into normal lines. When there is a region, everything depends on the first line of the region: - if it is a item, turn all items in the region into normal lines. - if it is a headline, turn all headlines in the region into items. - if it is a normal line, turn all lines into items. - special case: if there is no active region and the current line is an item, cycle the bullet type of the current list. C-c * This command turns items and normal lines into headings, or headings into normal lines. When there is a region, everything depends on the first line of the region: - if it is a item, turn all items in the region into headlines. - if it is a headline, turn all headlines in the region into normal lines. - if it is a normal line, turn all lines into headlines. I hope these commands a now more consistent and better. - Carsten On Dec 29, 2008, at 8:57 PM, Scott Otterson wrote: > I just discovered the very handy C-* function -- I've been > converting lists to headlines manually! But I also discovered a > couple of bugs: > > If I select a region containing a plain list and then type C-*, org > mode adds the leading stars but doesn't remove the plain list > symbols, for example, this: > > * headline > - list 1 > - list 2 > > is converted to this: > > * headline > *** - list 1 > *** - list 2 > > Also, if I'm at the end of a file so that the region can't be > extended beyond the end of the last item in the list, then that item > isn't converted. In other words, I get this: > > * headline > *** - list 1 > - list 2 > > Thanks, > > Scott > > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-1-849517494 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi,

following this = thread,  I have revisited the commands
`C-c -' and `C-c *' and = hope that they are now better
behaved and more useful:


=   If there is an active region, these commands will act on = the
  region, otherwise on the current line.

=   C-c -
      This command = turns headings or normal lines into
=       items, or items into normal lines. =  When there is a
      region, = everything depends on the first line of the
=       region:
=        - if it is a item, turn all = items in the region into
=          normal lines.
=        - if it is a headline, turn = all headlines in the region
=          into items.
=        - if it is a normal line, turn = all lines into items.
       - = special case: if there is no active region and the
=          current line is an = item, cycle the bullet type of the
=          current = list.

   C-c *
=        This command turns items and = normal lines into
=        headings, or headings into = normal lines.  When there is
=        a region, everything depends = on the first line of the
=        region:
=        - if it is a item, turn all = items in the region into
=          headlines.
=        - if it is a headline, turn = all headlines in the region
=          into normal = lines.
       - if it is a normal = line, turn all lines into headlines.

I hope these commands a now = more consistent and better.

- Carsten

On Dec 29, 2008, at = 8:57 PM, Scott Otterson wrote:

I just = discovered the very handy C-* function -- I've been converting lists to = headlines manually!   But I also discovered a couple of = bugs:

If I select a = region containing a plain list and then type C-*, org mode adds the = leading stars but doesn't remove the plain list symbols, for example, = this:

* = headline
 - list = 1
 - list = 2

is converted to this:

* = headline
*** - list = 1
*** - list = 2

Also, if I'm at the end of a file so that the region can't = be extended beyond the end of the last item in the list, then that item = isn't converted.  In other words, I get = this:

* = headline
*** - list = 1
- list = 2

Thanks,

Scott






_______________________________________________
Emacs-orgmode mailing = list
Remember: use `Reply All' = to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.= gnu.org/mailman/listinfo/emacs-orgmode

= --Apple-Mail-1-849517494-- --===============1154188408== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1154188408==--