From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: Re: Optional arg via lambda Date: Wed, 13 Nov 2013 14:38:26 +0100 Organization: Sebastien Vauban Message-ID: <86r4akzajx.fsf@somewhere.org> References: <868uws1rco.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384350057 8026 80.91.229.3 (13 Nov 2013 13:40:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2013 13:40:57 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Wed Nov 13 14:41:02 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vgago-0005Y7-2K for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Nov 2013 14:41:02 +0100 Original-Received: from localhost ([::1]:48812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgagn-0002w8-L1 for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Nov 2013 08:41:01 -0500 Original-Path: usenet.stanford.edu!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Injection-Info: mx05.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="15074"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX18iZjAosl/qLfdjH5CxYNpF" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:3/7OTafdD1ZLSuanj65k/tzrB6M= sha1:OopLTcxpqnocoAjut98jP3XlVAM= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:202208 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:94477 Archived-At: Hi Thorsten, Thorsten Jolitz wrote: >> I've tried adding an optional arg to the `lambda' and to pass it to >> the funcall of `org-export-dispatch', as shown here: >> >> (define-key org-mode-map >> (kbd "C-c C-e") >> (lambda (&optional arg) >> (interactive) >> (if (fboundp 'org-export-dispatch) >> (progn >> (message "arg: %s" arg) >> (funcall 'org-export-dispatch arg)) >> (message "Upgrade to Org 8!")))) >> >> But this does not work: `org-export-dispatch' is well called when >> pressing both `C-x C-e' and `C-u C-x C-e', but the `C-u' is never >> passed along to the original `org-export-dispatch' function. >> >> What am I missing? > > does > ,------------------------ > | (lambda (&optional arg) > | (interactive "P") ... > `------------------------ > > make a difference? Of course, it does! Thanks for spotting this 3-char bug... Best regards, Seb -- Sebastien Vauban