From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Newsgroups: gmane.emacs.help Subject: Basic emacs lisp question Date: Tue, 09 Sep 2014 15:35:59 -0400 Message-ID: <87egvkvb6o.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410291421 12245 80.91.229.3 (9 Sep 2014 19:37:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2014 19:37:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 09 21:36:54 2014 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 1XRRDh-0005ri-TP for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 21:36:54 +0200 Original-Received: from localhost ([::1]:51564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRRDh-0005rl-Hk for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 15:36:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRRDK-0005q7-2a for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 15:36:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRRCt-0006TN-U9 for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 15:36:29 -0400 Original-Received: from mail-qa0-x22d.google.com ([2607:f8b0:400d:c00::22d]:54705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRRCt-0006T0-PD for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 15:36:03 -0400 Original-Received: by mail-qa0-f45.google.com with SMTP id s7so884055qap.4 for ; Tue, 09 Sep 2014 12:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=K5/1YotMvAIW2c+Vy3OgJr09nYZ+TUYCXDMH7N4czYE=; b=bmh+dv3nNTuAl1SR//JHLHlzx2RqR6o8XqkXWXOJF2agYNjSr9k+JiALxE17y7iYno P+BJlpps0+84b+ZMY8rwL4gYhOEjGy/YsjneIsewCe0HFARd2sVthuuZc40oL5aGPO54 8gDTFsZGIyG8FktgrEiGgr9bHpXLp1lg2cKSAKyAZiJ9AKitVuXtE97Mu+thHa8ibooP 3ehXp6WUdnhFGKuuuhTHTG/xTVRZRx7sTREK4cVbArl0xQ5m8Qw0Oay9KEbpHnpOdxIr v/JrpCaKMKXD3lvzpKws29BFE3bSDqIj5uWp/BgxFWIXCo5WtrsF0FkKkTNy8TY7yVUP ofUQ== X-Received: by 10.140.51.81 with SMTP id t75mr54079166qga.37.1410291363389; Tue, 09 Sep 2014 12:36:03 -0700 (PDT) Original-Received: from localhost (pool-71-126-60-127.bstnma.east.verizon.net. [71.126.60.127]) by mx.google.com with ESMTPSA id j91sm10570157qgf.26.2014.09.09.12.36.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Sep 2014 12:36:02 -0700 (PDT) Original-Received: by localhost (Postfix, from userid 1000) id E825F403D5; Tue, 9 Sep 2014 15:35:59 -0400 (EDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c00::22d X-BeenThere: help-gnu-emacs@gnu.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@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99741 Archived-At: I want to capture whatever is at point in a file into a variable something like the following, but it doesn't seem to work. Can any one suggest what I an doing wrong. It is probably a silly mistake I am unable to see. I am just learning Emacs lisp. (defun process-diary-file () "Perform some manipulation of the diary file" (interactive) (find-file "~/diary") (goto-char 1) (set a (thing-at-point)) (message a)) Thanks in advance for your assistance, Ken -- Q: What do you call a WASP who doesn't work for his father, isn't a lawyer, and believes in social causes? A: A failure.