* Highlighting the right margin
@ 2005-10-11 20:20 fortepianissimo
2005-10-11 20:36 ` Drew Adams
[not found] ` <mailman.10934.1129063028.20277.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: fortepianissimo @ 2005-10-11 20:20 UTC (permalink / raw)
I've been trying to make an .el file I downloaded to work so I can see
where the right margin starts to avoid coding long lines.
The file is highlight-beyond-fill-column.el, and I have this line in my
.emacs
(require 'highlight-beyond-fill-column)
But after restarting emacs (22.0.50 on Mac OS X), hitting M-X and then
trying to invoke the function highlight-beyond-fill-column, I couldn't
find the function at all.
I'm almost completely ignorant on elisp - could someone show me some
voodoo magic that I need to put into my .emacs file to make this work?
Thanks a lot!
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Highlighting the right margin
2005-10-11 20:20 Highlighting the right margin fortepianissimo
@ 2005-10-11 20:36 ` Drew Adams
[not found] ` <mailman.10934.1129063028.20277.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Drew Adams @ 2005-10-11 20:36 UTC (permalink / raw)
I've been trying to make an .el file I downloaded to work so I can see
where the right margin starts to avoid coding long lines.
The file is highlight-beyond-fill-column.el, and I have this line in my
.emacs
(require 'highlight-beyond-fill-column)
But after restarting emacs (22.0.50 on Mac OS X), hitting M-X and then
trying to invoke the function highlight-beyond-fill-column, I couldn't
find the function at all.
Does library highlight-beyond-fill-column.el have this in it?
(provide 'highlight-beyond-fill-column)
For your `require' to work, the library must `provide' the corresponding
feature. If the library has a `provide' call with a different feature name,
use that name in your `require'. If it has no `provide', either add one to
the library or use `load-library' instead of `require', in your .emacs.
`load-library' uses the file name (sans extension); `require' uses a
provided-feature name. HTH.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Highlighting the right margin
[not found] ` <mailman.10934.1129063028.20277.help-gnu-emacs@gnu.org>
@ 2005-10-11 21:20 ` fortepianissimo
2005-10-11 21:40 ` rgb
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: fortepianissimo @ 2005-10-11 21:20 UTC (permalink / raw)
The file highlight-beyond-fill-column.el does have this line at the
very end:
(provide 'highlight-beyond-fill-column)
But I did try both of these in my .emacs, but neither worked:
(require 'highlight-beyond-fill-column)
or
(load-library "highlight-beyond-fill-column")
Now the .el file came with a tarball I obtained called
emacs-goodies-el-24.15, and I just dropped the file in my
/usr/local/share/emacs/site-lisp
Other .el files deposited in that dir have been working great for me.
Any other suggestions? Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Highlighting the right margin
2005-10-11 21:20 ` fortepianissimo
@ 2005-10-11 21:40 ` rgb
2005-10-11 21:43 ` Drew Adams
[not found] ` <mailman.10941.1129066997.20277.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: rgb @ 2005-10-11 21:40 UTC (permalink / raw)
> But I did try ...
>
> (load-library "highlight-beyond-fill-column")
>
There is almost certainly something in your *messages*
buffer that explains why it's not working. Did you
look thoroughly?
Something like (message "<<< Look here >>>") just before you
load the functions should make anything relevant easier
to find.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Highlighting the right margin
2005-10-11 21:20 ` fortepianissimo
2005-10-11 21:40 ` rgb
@ 2005-10-11 21:43 ` Drew Adams
[not found] ` <mailman.10941.1129066997.20277.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2005-10-11 21:43 UTC (permalink / raw)
highlight-beyond-fill-column.el does have this line
(provide 'highlight-beyond-fill-column)
And you tried:
(require 'highlight-beyond-fill-column)
(load-library "highlight-beyond-fill-column")
Now the .el file came with a tarball I obtained called
emacs-goodies-el-24.15, and I just dropped the file in my
/usr/local/share/emacs/site-lisp
Other .el files deposited in that dir have been working great for me.
1. If other libraries in that dir work, then that dir must be in your
`load-path', but check that variable anyway, to make sure.
2. Make sure the `provide' is at the top level of the file, so it is
evaluated by loading.
3. Verify that the `require' or `load-library' is in fact getting evaluated
in your .emacs. Check buffer *Messages* to see if there is a message
indicating that a load was tried but the library could not be loaded. If
not, double-check your .emacs code.
4. Load the file manually, after entering Emacs:
`M-x load-library RET highlight-beyond-fill-column
If that works, the library is in your load-path, and it should also work in
your .emacs. If it doesn't work, the directory with the library is not in
your load-path.
5. Try to load manually by feature name, not library name:
`M-: (require 'highlight-beyond-fill-column)
If that works, then the `provide' is working. If that doesn't work, but #4
worked, then the `provide' is not working, for some reason - check it
closer, in the file.
6. Double-check your spelling.
7. Make an sacrificial offering to the EmacsWiki.
HTH.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Highlighting the right margin
[not found] ` <mailman.10941.1129066997.20277.help-gnu-emacs@gnu.org>
@ 2005-10-12 1:41 ` fortepianissimo
0 siblings, 0 replies; 6+ messages in thread
From: fortepianissimo @ 2005-10-12 1:41 UTC (permalink / raw)
Thanks for everyone who have replied - it turns out it has been working
all along!
After taking a closer look at highlight-beyond-fill-column.el, it
mentioned two bits:
;; Example usage:
;;
;; Customize the `highlight-beyond-fill-column-in-modes' variable to
;; setup the list of modes in which to highlight-beyond-fill-column
;;
;; Customize the `highlight-beyond-fill-column-face' variable to
;; to setup the face used for highlight-beyond-fill-column
So I did a customize-variable on highlight-beyond-fill-column-in-modes
and made it look like this in my .emacs
(custom-set-variables
...
'(highlight-beyond-fill-column-in-modes (quote ("text-mode"
"python-mode")))
...)
Now when I loaded a Python script, I can see all the text overflowing
into the right margin is underlined - this is definitely different from
the effect I was expecting (in my imagination the entire region right
to the right margin should be painted with a different shade of color).
And another odd thing: this doesn't work in text-mode (under
Python-mode it works fine).
So it's like one problem solved but two are remained. Any more
suggestions? Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-10-12 1:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-11 20:20 Highlighting the right margin fortepianissimo
2005-10-11 20:36 ` Drew Adams
[not found] ` <mailman.10934.1129063028.20277.help-gnu-emacs@gnu.org>
2005-10-11 21:20 ` fortepianissimo
2005-10-11 21:40 ` rgb
2005-10-11 21:43 ` Drew Adams
[not found] ` <mailman.10941.1129066997.20277.help-gnu-emacs@gnu.org>
2005-10-12 1:41 ` fortepianissimo
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).