From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ben Key Newsgroups: gmane.emacs.devel Subject: Re: user-controlled load-path extension: load-dir Date: Tue, 8 Mar 2011 01:14:37 -0600 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0015175cd8d2a4e00a049df35ebd X-Trace: dough.gmane.org 1299568524 5970 80.91.229.12 (8 Mar 2011 07:15:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2011 07:15:24 +0000 (UTC) To: Emacs-devel@gnu.org, tzz@lifelogs.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 08 08:15:20 2011 Return-path: Envelope-to: ged-emacs-devel@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 1Pwr8X-00083q-M1 for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2011 08:15:19 +0100 Original-Received: from localhost ([127.0.0.1]:33097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwr8P-0007va-Rh for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2011 02:15:09 -0500 Original-Received: from [140.186.70.92] (port=44098 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwr8H-0007uc-7M for Emacs-devel@gnu.org; Tue, 08 Mar 2011 02:15:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pwr8F-0000cE-Ca for Emacs-devel@gnu.org; Tue, 08 Mar 2011 02:15:01 -0500 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:57078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pwr8F-0000bs-0O for Emacs-devel@gnu.org; Tue, 08 Mar 2011 02:14:59 -0500 Original-Received: by bwz17 with SMTP id 17so4983046bwz.0 for ; Mon, 07 Mar 2011 23:14:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=ky1Ph2BHWzEjsGVsR/TDHCWNXkkL+24UAxe8Z3ElX7I=; b=a8AtLkol2mZYIFSvrjRK2JamqE8XfWX95aHXhbjFbruRE5p/FOZw5o3/CYA7F5hvnn FcdG1HVStZVbVJCaU209wep/fV5hDYlKJPUrTis27nyRIGQxDi2g8Hqy0wP04RB/YTjv PZbbv2858Cut9ndH84sTFjF2r/I3iNW4eE0Pg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=tvnu1hlAKQT8e0kAydS7bXtCYov8SwZ0a2PgtQjdirqH2Hebx9zLE/HXa0wZwnasoc OxHDgSGZa9fvuGP1h8nZCv9YcJObqTUkX5wWe648mCIiaUsQIVCZrpJ7ZkoacCVZFma0 HWpggFZUsNjnWpGviw9MA2BlWNy0pycrY++28= Original-Received: by 10.204.136.217 with SMTP id s25mr4115272bkt.13.1299568497319; Mon, 07 Mar 2011 23:14:57 -0800 (PST) Original-Received: by 10.204.14.147 with HTTP; Mon, 7 Mar 2011 23:14:37 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136869 Archived-At: --0015175cd8d2a4e00a049df35ebd Content-Type: multipart/alternative; boundary=0015175cd8d2a4dffe049df35ebb --0015175cd8d2a4dffe049df35ebb Content-Type: text/plain; charset=ISO-8859-1 Hello, I personally do not think that this is a good idea for inclusion in Emacs. However it is a fairly simple task to implement this feature in Emacs lisp. I am attaching to this message a quick implementation of this feature I threw together in about an hour. I am not familiar with the Emacs package mechanism but I am certain that this could be converted to an Emacs package without too much work thus making it easier to install. For now it can be installed by simply placing the file in a directory located somewhere in the load path and adding the line (require 'user-load-dir) to your either .emacs or site-start.el file. Then from that point on, it will be possible to do exactly what you want, place a .el file in the directory specified by the user-load-dir variable (~/.emacs.d/load by default) and have it loaded without having to make any additional changes to your .emacs file. --0015175cd8d2a4dffe049df35ebb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I personally do not think that this is a goo= d idea for inclusion in Emacs.=A0 However it is a fairly simple task to imp= lement this feature in Emacs lisp.=A0 I am attaching to this message a quic= k implementation of this feature I threw together in about an hour.=A0 I am= not familiar with the Emacs package mechanism but I am certain that this c= ould be converted to an Emacs package without too much work thus making it = easier to install.

For now it can be installed by simply placing the file in a directory l= ocated somewhere in the load path and adding the line
(require 'user= -load-dir)
to your either .emacs or site-start.el file.

Then from= that point on, it will be possible to do exactly what you want, place a .e= l file in the directory specified by the user-load-dir variable (~/.emacs.d= /load by default) and have it loaded without having to make any additional = changes to your .emacs file.



--0015175cd8d2a4dffe049df35ebb-- --0015175cd8d2a4e00a049df35ebd Content-Type: application/octet-stream; name="user-load-dir.el" Content-Disposition: attachment; filename="user-load-dir.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gl0h2fp60 Ozs7IHVzZXItbG9hZC1kaXIuZWwgLS0gQSBxdWljayBhbmQgZGlydHkgaW1wbGVtZW50YXRpb24g b2YgYSB1c2VyIGxvYWQNCjs7OyBkaXJlY3RvcnkuICBUaGlzIGZpbGUgaXMgcHJvdmlkZWQgYXMg YSBwb3NzaWJsZSBhbnN3ZXIgdG8gdGhlDQo7OzsgInVzZXItY29udHJvbGxlZCBsb2FkLXBhdGgg ZXh0ZW5zaW9uOiBsb2FkLWRpciIgZGlzY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