From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH][babel] add a string input to ob-octave Date: Sat, 01 Oct 2011 09:10:30 +0200 Message-ID: <87bou1faqh.fsf@gmail.com> References: <87r52xmuri.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9tk0-0003od-T4 for emacs-orgmode@gnu.org; Sat, 01 Oct 2011 03:12:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9tjz-0002jH-U7 for emacs-orgmode@gnu.org; Sat, 01 Oct 2011 03:12:08 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:39499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9tjz-0002he-PK for emacs-orgmode@gnu.org; Sat, 01 Oct 2011 03:12:07 -0400 Received: by wyf22 with SMTP id 22so1972958wyf.0 for ; Sat, 01 Oct 2011 00:11:36 -0700 (PDT) In-Reply-To: <87r52xmuri.fsf@gmail.com> (Litvinov Sergey's message of "Sat, 01 Oct 2011 02:16:01 +0200") 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: Litvinov Sergey Cc: emacs-orgmode@gnu.org Hello, Litvinov Sergey writes: > + (cond > + ((stringp var) > + (format "\'%s\'" (or var "nil"))) > + (t > + (format "%s" (or var "nil")))))) Just nitpicking: In the first case, var is already identified as a string, so it will always be non-nil, and your "or" is useless. In the second case, (or var "nil") is redundant, as (format "%s" nil) already returns "nil". In other words, replacing (or var "nil") with var would be enough in both cases. Regards, -- Nicolas Goaziou