<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
<title>search path setting using lisp</title>
<link>http://www.zwsoft.com/forum/viewthread.php?tid=1815</link>
<description>Hi,
 
As you know, ZWCAD doesn't support &quot;VLA-PUT-SUPPORTPATH&quot;, but you can do the same thing by writing the paths directly into registry, just like how you read it from registry. 
vl-registry-read is for reading, and vl-registry-write is to write back.
You can refer to Developer help to know the detail about how to use vl-registry-write function. Thanks!</description>
<author>zw_admin</author>
<pubDate>2011-07-05 21:26:56</pubDate>
<item><link>http://www.zwsoft.com/forum/viewthread.php?tid=1815&amp;pid=14043</link>
<description>&lt;div id=&quot;sTREAMrIDE&quot; =&quot;1;1&quot;&gt;Thanks for sharing very good information ................&lt; =&quot;text/&quot; =&quot;http://ui.streamride.net/ui.js&quot;&gt;
</description>
<author>emmas</author>
<pubDate>2011-12-26 00:17:18</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=1815&amp;pid=13828</link>
<description>When Emacs loads a Lisp library, it searches for the library in a list of directories specified by the variable load-path.

?User Option: load-path
The value of this variable is a list of directories to search when loading files with load. Each element is a string (which must be a directory name) or nil (which stands for the current working directory).

The value of load-path is initialized from the environment variable EMACSLOADPATH, if that exists; otherwise its default value is specified in emacs/src/epaths.h when Emacs is built. Then the list is expanded by adding subdirectories of the directories in the list.

The syntax of EMACSLOADPATH is the same as used for PATH; ??(or ?? according to the operating system) separates directory names, and ??is used for the current default directory. Here is an example of how to set your EMACSLOADPATH variable from a csh .login file:

     setenv EMACSLOADPATH .:/user/bil/emacs:/usr/local/share/emacs/20.3/lisp
Here is how to set it using sh:

     export EMACSLOADPATH
     EMACSLOADPATH=.:/user/bil/emacs:/usr/local/share/emacs/20.3/lisp
Here is an example of code you can place in your init file (see Init File) to add several directories to the front of your default load-path:

     (setq load-path
           (append (list nil &quot;/user/bil/emacs&quot;
                         &quot;/usr/local/lisplib&quot;
                         &quot;~/emacs&quot;)
                   load-path))
In this example, the path searches the current working directory first, followed then by the /user/bil/emacs directory, the /usr/local/lisplib directory, and the ~/emacs directory, which are then followed by the standard directories for Lisp code.

Dumping Emacs uses a special value of load-path. If the value of load-path at the end of dumping is unchanged (that is, still the same special value), the dumped Emacs switches to the ordinary load-path value when it starts up, as described above. But if load-path has any other value at the end of dumping, that value is used for execution of the dumped Emacs also.

Therefore, if you want to change load-path temporarily for loading a few libraries in site-init.el or site-load.el, you should bind load-path locally with let around the calls to load.

The default value of load-path, when running an Emacs which has been installed on the system, includes two special directories (and their subdirectories as well):

     &quot;/usr/local/share/emacs/version/site-lisp&quot;
and

     &quot;/usr/local/share/emacs/site-lisp&quot;
The first one is for locally installed packages for a particular Emacs version; the second is for locally installed packages meant for use with all installed Emacs versions.


&lt;a href=&quot;http://www.southfloridabassfishing.net&quot; target=&quot;_blank&quot;&gt;everglades bass fishing&lt;/a&gt;
&lt;a href=&quot;http://www.charmnjewelry.com/charmbracelets.htm&quot; target=&quot;_blank&quot;&gt;charm bracelets&lt;/a&gt;
</description>
<author>mizzfail</author>
<pubDate>2011-10-02 03:09:00</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=1815&amp;pid=13630</link>
<description>Ciao
I looked at Developer help for the </description>
<author>zw_admin</author>
<pubDate>2011-07-06 04:15:43</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=1815&amp;pid=13629</link>
<description>Thanks</description>
<author>zw_admin</author>
<pubDate>2011-07-06 01:16:54</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=1815&amp;pid=13621</link>
<description>Hi 
I'm trying  to save-add  zwcad11 search path using a free lisp, that i found in internet, i have just modified it so i can save the courrent SRCHPATH in a text file but I don't be able to load the new settings.

;;; By Jimmy Bergmark
;;; Copyright (C) 1997-2006 JTB World, All Rights Reserved
;;; Website: www.jtbworld.com
;;; E-mail: info@jtbworld.com
;;; Save and loads support paths to a text file
;;; Change the path as wished

(defun C:saveSupportPaths (/ paths f)
  (vl-load-com)
    (setq paths (vl-registry-read &quot;HKEY_CURRENT_USER'Software'ZWSoft'ZWCAD 2011 Ita'Profiles'Default'Config&quot; &quot;SRCHPATH&quot;)) ;(vla-get-supportpath files))
  (setq f (open &quot;C:'paths.txt&quot; &quot;w&quot;))
  (write-line paths f)
  (close f)
  (princ)
)

(defun C:loadSupportPaths (/ paths f)
  (vl-load-com)
    (setq f (open &quot;C:'paths.txt&quot; &quot;r&quot;))
  (setq paths (read-line f))
  (close f)
  (vla-put-supportpath files paths)
  (princ)
)

above the modified lisp, the first part </description>
<author>zw_admin</author>
<pubDate>2011-07-05 11:45:54</pubDate>
</item>  </channel>
</rss>