From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welle Newsgroups: gmane.emacs.help Subject: Re: org-mode, remember Date: Sat, 11 Sep 2010 19:35:57 +0200 Organization: MB-NET.NET for Open-News-Network e.V. Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291950084 22629 80.91.229.12 (10 Dec 2010 03:01:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 03:01:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 10 04:01:20 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQtEW-0006GD-4L for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Dec 2010 04:01:20 +0100 Original-Received: from localhost ([127.0.0.1]:58467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQtEV-0008N6-3D for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 22:01:19 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!news.mb-net.net!open-news-network.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: dslb-088-066-026-056.pools.arcor-ip.net Original-X-Trace: gwaiyur.mb-net.net 1284226804 19207 88.66.26.56 (11 Sep 2010 17:40:04 GMT) Original-X-Complaints-To: abuse@open-news-network.org Original-NNTP-Posting-Date: Sat, 11 Sep 2010 17:40:04 +0000 (UTC) X-User-ID: U2FsdGVkX1/HnY5LR+HAoQoM+DZ2plugMIhMhnKUONkqj5EoQfkskQ== X-No-Archive: Yes Cancel-Lock: sha1:Z3N+8JCCX7zPNB37Hdli/3n2SLk= User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:181234 X-Mailman-Approved-At: Thu, 09 Dec 2010 20:09:13 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-Gmane-Expiry: 2010-12-24 Xref: news.gmane.org gmane.emacs.help:77241 Archived-At: Hello, and a last one... The problem is that (buffer-file-name (current-buffer)) is evaluated in the buffer that asks to choose a template. This buffer has no file associated, so buffer-file-name is nil. The work around: (defun hmw-remember () (interactive) (setq org-default-notes-file (hmw-get-notes-file-name)) (remember) ) I first set the file name while the buffer in which I want the note to be inserted is current. Then I evaluate (remember), which ask for a template etc. In the template specification the filename parameter is set to nil. Regards hmw -- biff4emacsen - A biff-like tool for (X)Emacs http://www.c0t0d0s0.de/biff4emacsen/biff4emacsen.html Flood - Your friendly network packet generator http://www.c0t0d0s0.de/flood/flood.html