Gnus development mailing list
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: ding@gnus.org
Subject: Re: How to change definition of gnus-summary-exit?
Date: Thu, 15 Oct 2015 21:16:38 +0200	[thread overview]
Message-ID: <8737xcndrd.fsf@gnu.org> (raw)
In-Reply-To: <87eggwvxat.fsf@thinkpad.rath.org> (Nikolaus Rath's message of "Thu, 15 Oct 2015 10:47:22 -0700")

Nikolaus Rath <Nikolaus@rath.org> writes:

>>>> What is happening here?  Why does the help refer me to the modified
>>>> version, but the version in memory is actually the original one?  And
>>>> how do I tell emacs/gnus to use my version?
>>
>> Why do you copy the complete gnus-sum.el when you just want to
>> change one function?  As a result, you won't see any future changes of
>> gnus-sum.el (bugfixes and new features).
>
> Not quite, the 'modified version' is actually a clone of the gnus git
> repo.

Ah, I see.  Well, then I'd just use the complete git version if I were
you.

>> What do you want to change exactly?  Oftentimes, a simple advice will
>> do without having to override the complete function.
>
> What's an advice (in this context)?

An advice is a function which is run before, after, instead of, or
"around" some other function.  See (info "(elisp)Advising Functions").

>> Indeed, if Nikolaus copied both gnus-sum.el and gnus-sum.elc into his
>> other directory, then modified gnus-sum.el but didn't recompile it, and
>> additionally `load-prefer-newer' is nil, that would explain the issue.
>
> Thanks, that was it!

Wow, my crystal ball is working perfectly today! :-)

> I was assuming that Emacs would automatically ignore the .elc file if
> the .el file was newer.

It doesn't do so probably for backwards compatibility reasons.  But
there's the new variable `load-prefer-newer' for controlling that
behavior.

Bye,
Tassilo



  reply	other threads:[~2015-10-15 19:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 17:28 Nikolaus Rath
2015-10-14 18:08 ` Adam Sjøgren
2015-10-15  6:34   ` Tassilo Horn
2015-10-15 17:47     ` Nikolaus Rath
2015-10-15 19:16       ` Tassilo Horn [this message]
2015-10-15 23:27         ` Nikolaus Rath
2015-10-16  7:19           ` Tassilo Horn
2015-10-15 20:17       ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737xcndrd.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).