From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B.V. Raghav" Newsgroups: gmane.emacs.help Subject: Icicles for filename insertion in buffer Date: Fri, 29 Jan 2016 00:40:18 +0530 Organization: Indian Institute of Technology, Kanpur Message-ID: <87zivp1pwl.fsf@ram.bvr.dp.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454008267 30752 80.91.229.3 (28 Jan 2016 19:11:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jan 2016 19:11:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 28 20:10:54 2016 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 1aOry2-0002Uz-2T for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jan 2016 20:10:54 +0100 Original-Received: from localhost ([::1]:58192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOry1-0008NW-B3 for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jan 2016 14:10:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOrxl-0008NP-N0 for help-gnu-emacs@gnu.org; Thu, 28 Jan 2016 14:10:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOrxi-0003bo-FA for help-gnu-emacs@gnu.org; Thu, 28 Jan 2016 14:10:37 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:56604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOrxi-0003bi-7k for help-gnu-emacs@gnu.org; Thu, 28 Jan 2016 14:10:34 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aOrxg-0002BE-17 for help-gnu-emacs@gnu.org; Thu, 28 Jan 2016 20:10:32 +0100 Original-Received: from 103.246.106.24 ([103.246.106.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jan 2016 20:10:32 +0100 Original-Received: from bvraghav by 103.246.106.24 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jan 2016 20:10:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 103.246.106.24 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:Fq81GDiEai/p43AFmDpUK8dtB9E= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:108898 Archived-At: Hi, Many a times I feel the need to insert the filename into the buffer. Example: 1. `(insert (file-name-nondirectory (buffer-file-name)))' when inserting doxygen file comment in a file. Though this need is fulfilled by substituting this code snippet for evaluation in yasnippet. I have a few other uses 2. `(insert-file-name-relative-include-directories)' --- when completing a `# include' directive in a c/c++ programming. 3. Taking notes, and referencing in org-mode. This requirement is more than fulfilled by C-C C-l (org-insert-link) Is there a way to use the value selected by icicle (variable name?) and then trim down prefix using the first match within the sequence of include directories and appended with values returned by split-string of $CPATH environment variable. This should boost the confidence of a novice programmer like me. Thanks, r -- (B.V. Raghav)