* loading emacs macros from file
@ 2004-10-02 7:28 Daniel L Elliott
2004-10-02 12:21 ` J. David Boyd
2004-10-02 13:30 ` Johan Bockgård
0 siblings, 2 replies; 4+ messages in thread
From: Daniel L Elliott @ 2004-10-02 7:28 UTC (permalink / raw)
Hello,
I am trying to load the following file (~/.emacs_files/macros.el) which
contains two macros in my .emacs file:
;;macro created to insert reuse eval comments. designed for figuring out what is happening in a big program.
(fset 'my-insert-reuse-comment
"/\261\260\260*\C-i\C-mdan:\C-m\261\260\260*/\C-i\C-m\C-i\C-[OA\C-[OA\C-e\C-m")
;;macro created to insert skeleton for a class description. designed to be placed at the top of the header file.
(fset 'my-cpp-class-desc
"\C-m\C-m\C-[OA\C-[OA/\C-[1\C-[0\C-[0*\C-m**\C-m** Class\C-m**\C-m**
Se\C-?\C-?Dex\C-?scription:\C-m**\C-m** TO \C-?\C-?o
do:\C-m**\C-m\C-[1\C-[0\C-[0*/")
using the following:
(setq load-path (append load-path (list "~<myUserName>/.emacs_files")))
;;some junk I wrote
(load "utilities")
;;my macros
(load "macros")
However, when running M-x <either macro name>, I get 'no match'. Why is this? Am I fundamentally doing something wrong here?
Thank you,
dan elliott
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: loading emacs macros from file
2004-10-02 7:28 loading emacs macros from file Daniel L Elliott
@ 2004-10-02 12:21 ` J. David Boyd
2004-10-02 13:30 ` Johan Bockgård
1 sibling, 0 replies; 4+ messages in thread
From: J. David Boyd @ 2004-10-02 12:21 UTC (permalink / raw)
Daniel L Elliott <dan_elliott_at_cox_dot_net@spam_is_pathetic.com> writes:
> Hello,
>
> I am trying to load the following file (~/.emacs_files/macros.el) which
> contains two macros in my .emacs file:
>
> ......
>
> using the following:
> (setq load-path (append load-path (list "~<myUserName>/.emacs_files")))
> ;;some junk I wrote
> (load "utilities")
> ;;my macros
> (load "macros")
>
> However, when running M-x <either macro name>, I get 'no match'. Why is
> this? Am I fundamentally doing something wrong here?
>
> Thank you,
>
> dan elliott
Do the items in "utilities" get loaded.
I tried what you have, from the command line, and it worked fine here. By
this I mean that I created a macros.el file, put your two macros in it, put it
into a file that was in my load path, and from the minibuffer did an eval on
(load "macros").
The macros were there when I did this. Have you tried entering these commands
interactively, and seeing if the minibuffer reports 't' when you (load
"macros"). Maybe your emacs session isn't able to find the macros. But if
the items in "utilities" are being loaded, then I don't have a clue...
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: loading emacs macros from file
2004-10-02 7:28 loading emacs macros from file Daniel L Elliott
2004-10-02 12:21 ` J. David Boyd
@ 2004-10-02 13:30 ` Johan Bockgård
2004-10-02 15:20 ` Daniel L Elliott
1 sibling, 1 reply; 4+ messages in thread
From: Johan Bockgård @ 2004-10-02 13:30 UTC (permalink / raw)
Daniel L Elliott <dan_elliott_at_cox_dot_net@spam_is_pathetic.com> writes:
> I am trying to load the following file (~/.emacs_files/macros.el)
> which contains two macros in my .emacs file:
There is another file called "macros.el".
> using the following:
> (setq load-path (append load-path (list "~<myUserName>/.emacs_files")))
This puts your directory last in load-path.
> (load "macros")
This finds that other file. Use `M-x locate-library RET macros RET' to
see this.
> However, when running M-x <either macro name>, I get 'no match'. Why
> is this? Am I fundamentally doing something wrong here?
Rename the file to "my-macros.el" or use (load "~/.emacs_files/macros.el").
--
Johan Bockgård
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: loading emacs macros from file
2004-10-02 13:30 ` Johan Bockgård
@ 2004-10-02 15:20 ` Daniel L Elliott
0 siblings, 0 replies; 4+ messages in thread
From: Daniel L Elliott @ 2004-10-02 15:20 UTC (permalink / raw)
On Sat, 02 Oct 2004 15:30:58 +0200, Johan Bockgård wrote:
> Daniel L Elliott <dan_elliott_at_cox_dot_net@spam_is_pathetic.com> writes:
>
>> I am trying to load the following file (~/.emacs_files/macros.el)
>> which contains two macros in my .emacs file:
>
> There is another file called "macros.el".
>
>> using the following:
>> (setq load-path (append load-path (list "~<myUserName>/.emacs_files")))
>
> This puts your directory last in load-path.
>
>> (load "macros")
>
> This finds that other file. Use `M-x locate-library RET macros RET' to
> see this.
>
>> However, when running M-x <either macro name>, I get 'no match'. Why
>> is this? Am I fundamentally doing something wrong here?
>
> Rename the file to "my-macros.el" or use (load "~/.emacs_files/macros.el").
This fixed it. Thank you to all who replied! Oddly, this worked on our AIX system...
- dan elliott
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-02 15:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-02 7:28 loading emacs macros from file Daniel L Elliott
2004-10-02 12:21 ` J. David Boyd
2004-10-02 13:30 ` Johan Bockgård
2004-10-02 15:20 ` Daniel L Elliott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).