unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* elisp help needed
@ 2006-03-01 16:58 Robert D. Crawford
  2006-03-01 21:37 ` RD
  2006-03-02 12:50 ` Katsumi Yamaoka
  0 siblings, 2 replies; 8+ messages in thread
From: Robert D. Crawford @ 2006-03-01 16:58 UTC (permalink / raw)


I have the following lines in my .emacs file:

(remove-hook 'w3m-after-cursor-move-hook
     #'w3m-print-this-url)

and for some reason, to get it to eval I have to do it by hand every
time I restart emacs.  I *think* this might be the only code that is not
being evaled, but I do not know any way to be certain.  I know that
there are things below this line that are being correctly evaled.  All
the code in the customize section seems to be ok, and I have a function
that byte-compiles .el files when they are saved that works.

Is there some way to know what is being evaled?

Thanks,

rdc

-- 
<========================================================================>
Robert D. Crawford                                      rdc1x@comcast.net

Q:	How many IBM 370's does it take to execute a job?
A:	Four, three to hold it down, and one to rip its head off.
<========================================================================>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elisp help needed
  2006-03-01 16:58 elisp help needed Robert D. Crawford
@ 2006-03-01 21:37 ` RD
  2006-03-02 11:36   ` Robert D. Crawford
  2006-03-02 12:50 ` Katsumi Yamaoka
  1 sibling, 1 reply; 8+ messages in thread
From: RD @ 2006-03-01 21:37 UTC (permalink / raw)


Robert D. Crawford wrote:
> I have the following lines in my .emacs file:
> 
> (remove-hook 'w3m-after-cursor-move-hook
>      #'w3m-print-this-url)
> 
> and for some reason, to get it to eval I have to do it by hand every
> time I restart emacs.  I *think* this might be the only code that is not
> being evaled, but I do not know any way to be certain.  I know that
> there are things below this line that are being correctly evaled.  All
> the code in the customize section seems to be ok, and I have a function
> that byte-compiles .el files when they are saved that works.
> 
> Is there some way to know what is being evaled?
> 
> Thanks,
> 
> rdc
> 

I use the old "print" method.  I salt my .emacs file with (message 
"blah") commands to report progress.

Is there a command after the remove-hook that puts the hook back?

Bob

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elisp help needed
  2006-03-01 21:37 ` RD
@ 2006-03-02 11:36   ` Robert D. Crawford
  2006-03-02 13:28     ` elisp help needed [solved] Robert D. Crawford
  2006-03-04 12:26     ` elisp help needed Tim Cross
  0 siblings, 2 replies; 8+ messages in thread
From: Robert D. Crawford @ 2006-03-02 11:36 UTC (permalink / raw)


RD <rjjd@localnet.com> writes:

> Robert D. Crawford wrote:
>> I have the following lines in my .emacs file: 
>
> (remove-hook 'w3m-after-cursor-move-hook #'w3m-print-this-url) 
>
>and for some
>> reason, to get it to eval I have to do it by hand every time I
>> restart emacs.  I *think* this might be the only code that is not
>> being evaled, but I do not know any way to be certain.  I know that
>> there are things below this line that are being correctly evaled.
>> All the code in the customize section seems to be ok, and I have a
>> function that byte-compiles .el files when they are saved that works.
>> Is there some way to know what is being evaled?  Thanks, rdc
>>
>
> I use the old "print" method.  I salt my .emacs file with (message
> "blah") commands to report progress.

Yeah, I thought about doing this, but it seemed there should be a better
way.  
>
> Is there a command after the remove-hook that puts the hook back?

That is a good question.  I looked at the documentation for the
function and it says: 

w3m-print-this-url is an interactive compiled Lisp function in `w3m'.
(w3m-print-this-url &optional INTERACTIVE-P)

Display the url under point in the echo area and put it into `kill-ring'.

This function is advised.

After-advice `emacspeak':
Produce auditory icon.

The changes that emacspeak makes on the hook come from the file
emacspeak-w3m.el I think.  I guess it could be that the file is not
loaded until after the .emacs file is loaded and w3m is started for the
first time.  I am going to put some message lines in the file to see
when it is loaded.

If it is the case that the file is not loaded until after my .emacs,
what can be done to take care of this, outside of editing the source of
the file itself?  I think that is a very bad idea.

Thanks,

rdc

-- 
:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:
Robert D. Crawford                                      rdc1x@comcast.net

Q:	What do you have when you have a lawyer buried up to his neck in sand?
A:	Not enough sand.
:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:|:

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elisp help needed
  2006-03-01 16:58 elisp help needed Robert D. Crawford
  2006-03-01 21:37 ` RD
@ 2006-03-02 12:50 ` Katsumi Yamaoka
  2006-03-02 13:34   ` Robert D. Crawford
  1 sibling, 1 reply; 8+ messages in thread
From: Katsumi Yamaoka @ 2006-03-02 12:50 UTC (permalink / raw)


>>>>> In <87irqygkzs.fsf@laptop.rdc1.home> Robert D. Crawford wrote:

> I have the following lines in my .emacs file:

> (remove-hook 'w3m-after-cursor-move-hook
>      #'w3m-print-this-url)

> and for some reason, to get it to eval I have to do it by hand every
> time I restart emacs.  I *think* this might be the only code that is not
> being evaled, but I do not know any way to be certain.

I guess it is eval'd before loading w3m.elc.  If so, nothing
will happen.  The best way is to put such things into the
~/.emacs-w3m.el file.  Please consult the emacs-w3m Info manual.
Here's an extract:

2.6 Minimal settings to run emacs-w3m
=====================================
[...]
`Startup File'
     We recommend using the `~/.emacs-w3m' file (which is the default
     value of `w3m-init-file') if you need to twiddle some emacs-w3m
     variables.  This file is similar to `~/.emacs', but is read when
     emacs-w3m starts.  Note that some options shouldn't be modified
     there, for example, `w3m-command'.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elisp help needed [solved]
  2006-03-02 11:36   ` Robert D. Crawford
@ 2006-03-02 13:28     ` Robert D. Crawford
  2006-03-04 12:26     ` elisp help needed Tim Cross
  1 sibling, 0 replies; 8+ messages in thread
From: Robert D. Crawford @ 2006-03-02 13:28 UTC (permalink / raw)


"Robert D. Crawford" <rdc1x@comcast.net> writes:

>> Is there a command after the remove-hook that puts the hook back?
>
> That is a good question.  I looked at the documentation for the
> function and it says:
>
/snip/

> The changes that emacspeak makes on the hook come from the file
> emacspeak-w3m.el I think.  

I was wrong here, but  it really doesn't matter.  


> I guess it could be that the file is not
> loaded until after the .emacs file is loaded and w3m is started for
> the first t

Here is where the important part starts.  I guess the hook is defined,
or added to after the .emacs file is read.  All I did was to move the
function to the .emacs-w3m file so that it ws read when w3m starts and
everything was fine.

Thanks for putting me on the right track.

rdc

-- 
::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::
Robert D. Crawford                                      rdc1x@comcast.net

You will engage in a profitable business activity.
::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elisp help needed
  2006-03-02 12:50 ` Katsumi Yamaoka
@ 2006-03-02 13:34   ` Robert D. Crawford
  0 siblings, 0 replies; 8+ messages in thread
From: Robert D. Crawford @ 2006-03-02 13:34 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I guess it is eval'd before loading w3m.elc.  If so, nothing will
> happen.  The best way is to put such things into the ~/.emacs-w3m.el
> file.  Please consult the emacs-w3m Info manual.  Here's an extract:
>
I wish I would have read your post before I replied to mine.

thanks,

rdc

-- 
::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::
Robert D. Crawford                                      rdc1x@comcast.net

You will engage in a profitable business activity.
::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::|::

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elisp help needed
  2006-03-02 11:36   ` Robert D. Crawford
  2006-03-02 13:28     ` elisp help needed [solved] Robert D. Crawford
@ 2006-03-04 12:26     ` Tim Cross
  2006-03-04 13:57       ` Robert D. Crawford
  1 sibling, 1 reply; 8+ messages in thread
From: Tim Cross @ 2006-03-04 12:26 UTC (permalink / raw)


"Robert D. Crawford" <rdc1x@comcast.net> writes:

> RD <rjjd@localnet.com> writes:
>
>> Robert D. Crawford wrote:
>>> I have the following lines in my .emacs file: 
>>
>> (remove-hook 'w3m-after-cursor-move-hook #'w3m-print-this-url) 
>>
>>and for some
>>> reason, to get it to eval I have to do it by hand every time I
>>> restart emacs.  I *think* this might be the only code that is not
>>> being evaled, but I do not know any way to be certain.  I know that
>>> there are things below this line that are being correctly evaled.
>>> All the code in the customize section seems to be ok, and I have a
>>> function that byte-compiles .el files when they are saved that works.
>>> Is there some way to know what is being evaled?  Thanks, rdc
>>>
>>
>> I use the old "print" method.  I salt my .emacs file with (message
>> "blah") commands to report progress.
>
> Yeah, I thought about doing this, but it seemed there should be a better
> way.  
>>
>> Is there a command after the remove-hook that puts the hook back?
>
> That is a good question.  I looked at the documentation for the
> function and it says: 
>
> w3m-print-this-url is an interactive compiled Lisp function in `w3m'.
> (w3m-print-this-url &optional INTERACTIVE-P)
>
> Display the url under point in the echo area and put it into `kill-ring'.
>
> This function is advised.
>
> After-advice `emacspeak':
> Produce auditory icon.
>
> The changes that emacspeak makes on the hook come from the file
> emacspeak-w3m.el I think.  I guess it could be that the file is not
> loaded until after the .emacs file is loaded and w3m is started for the
> first time.  I am going to put some message lines in the file to see
> when it is loaded.
>
> If it is the case that the file is not loaded until after my .emacs,
> what can be done to take care of this, outside of editing the source of
> the file itself?  I think that is a very bad idea.
>
Robert,

I think something changed in the emacspeak-w3m which stops this
workaround for removing that function. However, if you look into the
customize group for w3m, you will find there is a hook variable which
adds that function, so you can just remove it. From memory, it is
w3m-after-cursor-move-hook.

Tim

-- 
Tim Cross
tcross@rapttech.com.au

There are two types of people in IT - those who do not manage what they 
understand and those who do not understand what they manage.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: elisp help needed
  2006-03-04 12:26     ` elisp help needed Tim Cross
@ 2006-03-04 13:57       ` Robert D. Crawford
  0 siblings, 0 replies; 8+ messages in thread
From: Robert D. Crawford @ 2006-03-04 13:57 UTC (permalink / raw)


Hi Tim,

Tim Cross <tcross@tiger.rapttech.com.au> writes:

> Robert,
>
> I think something changed in the emacspeak-w3m which stops this
> workaround for removing that function. 

I just had it in the wrong place.  I had it in my .emacs file and it
needed to be in my .emacs-w3m file.

> However, if you look into the customize group for w3m, you will find
> there is a hook variable which adds that function, so you can just
> remove it. From memory, it is w3m-after-cursor-move-hook.

I'll check this out.
>
Thanks,

rdc


-- 
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
Robert D. Crawford                                      rdc1x@comcast.net

You will remember something that you should not have forgotten.
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-03-04 13:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-01 16:58 elisp help needed Robert D. Crawford
2006-03-01 21:37 ` RD
2006-03-02 11:36   ` Robert D. Crawford
2006-03-02 13:28     ` elisp help needed [solved] Robert D. Crawford
2006-03-04 12:26     ` elisp help needed Tim Cross
2006-03-04 13:57       ` Robert D. Crawford
2006-03-02 12:50 ` Katsumi Yamaoka
2006-03-02 13:34   ` Robert D. Crawford

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).