* Re: [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook [not found] ` <20160707032857.E4A1422015C@vcs.savannah.gnu.org> @ 2016-07-07 9:36 ` Stefan Monnier 2016-07-07 19:31 ` John Wiegley 0 siblings, 1 reply; 7+ messages in thread From: Stefan Monnier @ 2016-07-07 9:36 UTC (permalink / raw) To: emacs-devel; +Cc: Mark Oteiza > * lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): New hook. I thought it was agreed that it would be a bad idea. Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook 2016-07-07 9:36 ` [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook Stefan Monnier @ 2016-07-07 19:31 ` John Wiegley 2016-07-07 23:59 ` Mark Oteiza 0 siblings, 1 reply; 7+ messages in thread From: John Wiegley @ 2016-07-07 19:31 UTC (permalink / raw) To: Stefan Monnier; +Cc: Mark Oteiza, emacs-devel >>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes: > I thought it was agreed that it would be a bad idea. I was asked in IRC about this patch, and I couldn't see anything objectionable about it. However, clearly I was unaware of previous discussion on the matter. Mark, could you please revert until we have more consensus that we want to do this? Thank you. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook 2016-07-07 19:31 ` John Wiegley @ 2016-07-07 23:59 ` Mark Oteiza 2016-07-08 0:06 ` Dmitry Gutov 2016-07-10 0:27 ` Stefan Monnier 0 siblings, 2 replies; 7+ messages in thread From: Mark Oteiza @ 2016-07-07 23:59 UTC (permalink / raw) To: John Wiegley; +Cc: Stefan Monnier, emacs-devel On 07/07/16 at 12:31pm, John Wiegley wrote: > >>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes: > > > I thought it was agreed that it would be a bad idea. > > I was asked in IRC about this patch, and I couldn't see anything objectionable > about it. However, clearly I was unaware of previous discussion on the matter. > Mark, could you please revert until we have more consensus that we want to do > this? Thank you. Commit fd020a29[0] was implemented only to make it possible for the default value to be used, something hooks already do. See Bug#19338. It is unclear what discussion you are talking about. Perhaps it's here[1], but if not, I hope you will read it before asking me to make more commit noise. One could refer to a number of sources for developer opinion on using advice in core, but perhaps it is best to quote the Elisp manual: […] advice should be reserved for the cases where you cannot modify a function’s behavior in any other way. If it is possible to do the same thing via a hook, that is preferable (see Hooks). […] In particular, Emacs’s own source files should not put advice on functions in Emacs. (There are currently a few exceptions to this convention, but we aim to correct them.) [0] http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=fd020a29 [1] https://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00138.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook 2016-07-07 23:59 ` Mark Oteiza @ 2016-07-08 0:06 ` Dmitry Gutov 2016-07-10 0:27 ` Stefan Monnier 1 sibling, 0 replies; 7+ messages in thread From: Dmitry Gutov @ 2016-07-08 0:06 UTC (permalink / raw) To: Mark Oteiza, John Wiegley; +Cc: Stefan Monnier, emacs-devel On 07/08/2016 02:59 AM, Mark Oteiza wrote: > It is unclear what discussion you are talking about. Perhaps it's > here[1], but if not, I hope you will read it Did you? https://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00331.html > One could refer to a number of sources for developer > opinion on using advice in core, but perhaps it is best to quote the > Elisp manual: > > […] advice should be reserved for the cases where you cannot modify > a function’s behavior in any other way. If it is possible to do > the same thing via a hook, that is preferable (see Hooks). […] In > particular, Emacs’s own source files should not put advice on > functions in Emacs. (There are currently a few exceptions to this > convention, but we aim to correct them.) > > [0] http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=fd020a29 > [1] https://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00138.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook 2016-07-07 23:59 ` Mark Oteiza 2016-07-08 0:06 ` Dmitry Gutov @ 2016-07-10 0:27 ` Stefan Monnier 2016-07-14 13:36 ` Leo Liu 1 sibling, 1 reply; 7+ messages in thread From: Stefan Monnier @ 2016-07-10 0:27 UTC (permalink / raw) To: Mark Oteiza; +Cc: John Wiegley, emacs-devel > […] advice should be reserved for the cases where you cannot modify > a function’s behavior in any other way. If it is possible to do > the same thing via a hook, that is preferable (see Hooks). […] In > particular, Emacs’s own source files should not put advice on > functions in Emacs. (There are currently a few exceptions to this > convention, but we aim to correct them.) A *-function variable is not an advice, but a hook. It's a different kind of hook than those manipulated by add-hook (which have names ending in -hook or -functions), but it's still a hook and those have been used for many years in various parts of Emacs. It just so happens that the operations that can manipulate those hooks conveniently (add-function/remove-function) are provided in the same file as the new advice-add, but that's only because it was convenient and natural to implement advice-add on top of those new operations. Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook 2016-07-10 0:27 ` Stefan Monnier @ 2016-07-14 13:36 ` Leo Liu 2016-07-15 0:16 ` Dmitry Gutov 0 siblings, 1 reply; 7+ messages in thread From: Leo Liu @ 2016-07-14 13:36 UTC (permalink / raw) To: John Wiegley; +Cc: Mark Oteiza, Stefan Monnier, emacs-devel On 2016-07-09 20:27 -0400, Stefan Monnier wrote: > A *-function variable is not an advice, but a hook. > > It's a different kind of hook than those manipulated by add-hook (which > have names ending in -hook or -functions), but it's still a hook and > those have been used for many years in various parts of Emacs. > > It just so happens that the operations that can manipulate those hooks > conveniently (add-function/remove-function) are provided in the same > file as the new advice-add, but that's only because it was convenient > and natural to implement advice-add on top of those new operations. May we have this incompatible change reverted? Thanks, Leo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook 2016-07-14 13:36 ` Leo Liu @ 2016-07-15 0:16 ` Dmitry Gutov 0 siblings, 0 replies; 7+ messages in thread From: Dmitry Gutov @ 2016-07-15 0:16 UTC (permalink / raw) To: Mark Oteiza; +Cc: John Wiegley, emacs-devel, Leo Liu, Stefan Monnier On 07/14/2016 04:36 PM, Leo Liu wrote: > May we have this incompatible change reverted? Indeed. Mark, could you please revert it already? ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-07-15 0:16 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20160707032857.31916.95107@vcs.savannah.gnu.org> [not found] ` <20160707032857.E4A1422015C@vcs.savannah.gnu.org> 2016-07-07 9:36 ` [Emacs-diffs] master 5811404: Replace eldoc-documentation-function with a hook Stefan Monnier 2016-07-07 19:31 ` John Wiegley 2016-07-07 23:59 ` Mark Oteiza 2016-07-08 0:06 ` Dmitry Gutov 2016-07-10 0:27 ` Stefan Monnier 2016-07-14 13:36 ` Leo Liu 2016-07-15 0:16 ` Dmitry Gutov
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.