From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: Re: ECB and org-mode Date: Wed, 14 Oct 2009 19:57:42 +0200 Message-ID: <87tyy1zwmh.fsf@thinkpad.tsdh.de> References: <87k4z0yeqz.wl%ucecesf@ucl.ac.uk> <87y6ng6335.wl%ucecesf@ucl.ac.uk> <87iqehhp2n.wl%ucecesf@ucl.ac.uk> 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 1My879-0005Gs-4K for emacs-orgmode@gnu.org; Wed, 14 Oct 2009 13:58:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1My874-0005FQ-7w for emacs-orgmode@gnu.org; Wed, 14 Oct 2009 13:58:18 -0400 Received: from [199.232.76.173] (port=39903 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My874-0005FN-2Z for emacs-orgmode@gnu.org; Wed, 14 Oct 2009 13:58:14 -0400 Received: from lo.gmane.org ([80.91.229.12]:54193) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1My873-0003Az-IY for emacs-orgmode@gnu.org; Wed, 14 Oct 2009 13:58:13 -0400 Received: from list by lo.gmane.org with local (Exim 4.50) id 1My870-00046h-44 for emacs-orgmode@gnu.org; Wed, 14 Oct 2009 19:58:10 +0200 Received: from p54af237a.dip0.t-ipconnect.de ([84.175.35.122]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Oct 2009 19:58:10 +0200 Received: from tassilo by p54af237a.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Oct 2009 19:58:10 +0200 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: emacs-orgmode@gnu.org Eric S Fraga writes: Hi Eric, > (defadvice ecb-method-clicked (after esf/org-show-context) > "Make sure hierarchy is visible when jumping into location from ECB tree buffer" > (if (string= major-mode "org-mode") Here, you want (eq major-mode 'org-mode). Your version also works, but only because string= converts symbols to their string name, and the value of `major-mode' is a symbol. The `eq' version is more efficient, but mostly it's for style reasons. > Again, apologies for my minimal (yet increasing) elisp knowledge! Hey, it works! What do you want more? ;-) Bye, Tassilo