From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: org-cycle behaves differently when called with M-x? Date: Sun, 16 Mar 2014 15:36:42 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPGrT-00019G-Lg for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 15:36:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPGrS-0007Lw-SH for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 15:36:43 -0400 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:51207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPGrS-0007Lq-OU for emacs-orgmode@gnu.org; Sun, 16 Mar 2014 15:36:42 -0400 Received: by mail-qg0-f48.google.com with SMTP id j107so14121938qga.7 for ; Sun, 16 Mar 2014 12:36:42 -0700 (PDT) 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: Org Mode Hi, I am not sure if this a bug or intended behaviour, but org-cycle behaves ddifferently than expected when I call it using M-x (rather than with TAB). Instead of cycling FOLDED-->CHILDREN-->SUBTREE-->FOLDED it cycles FOLDED-->CHILDREN-->FOLDED Does everyone else see the same issue? I think the issue is likely caused by this (cond) clause startging at line 6857 of org.el, within org-cycle-internal-local: ((or children-skipped (and (eq last-command this-command) (eq org-cycle-subtree-status 'children))) I still don't quite understand how the value of (this-command) is set, but I'm imagining that M-x may also set it? So if called with M-x, it may not give the desired result. thank you! Matt