* Re: master d7e848ccda 2/3: Use icons in outline [not found] ` <20220728123946.8E45DC0F203@vcs2.savannah.gnu.org> @ 2022-07-29 1:52 ` Michael Heerdegen 2022-07-29 2:28 ` Michael Heerdegen 2022-07-29 11:36 ` Lars Ingebrigtsen 2022-07-29 3:17 ` Po Lu 1 sibling, 2 replies; 14+ messages in thread From: Michael Heerdegen @ 2022-07-29 1:52 UTC (permalink / raw) To: emacs-devel; +Cc: Lars Ingebrigtsen Lars Ingebrigtsen <larsi@gnus.org> writes: > branch: master > commit d7e848ccdaab81fed187b415e95c436b6deb2657 > Author: Lars Ingebrigtsen <larsi@gnus.org> > Commit: Lars Ingebrigtsen <larsi@gnus.org> > +(defcustom outline-minor-mode-use-buttons '(derived-mode . special-mode) > + "Whether to display clickable buttons on the headings. > (defvar outline-level #'outline-level > @@ -434,7 +434,10 @@ outline font-lock faces to those of major mode." > (goto-char (match-beginning 0)) > (not (get-text-property (point) 'face)))) > (overlay-put overlay 'face (outline-font-lock-face))) > - (when outline-minor-mode-use-buttons > + (when (and outline-minor-mode-use-buttons > + (or (eq outline-minor-mode-use-buttons t) > + (buffer-match-p outline-minor-mode-use-buttons > + (current-buffer)))) Lars, this has an unintended effect for me: If I ediff buffers with outline-minor-mode turned on, and do #+begin_src emacs-lisp (add-hook 'ediff-prepare-buffer-hook (defun test () (when (bound-and-true-p outline-minor-mode) (outline-show-all)))) #+end_src then the ediffed buffers will get buttons. Worse: they stay even after finishing Ediff. Tested with emacs -Q. Seems that when `ediff-prepare-buffer-hook' is run the buffers are in a temporary state where the (derived-mode . special-mode) condition is fulfilled, or something like that. TIA, Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 1:52 ` master d7e848ccda 2/3: Use icons in outline Michael Heerdegen @ 2022-07-29 2:28 ` Michael Heerdegen 2022-07-29 11:36 ` Lars Ingebrigtsen 1 sibling, 0 replies; 14+ messages in thread From: Michael Heerdegen @ 2022-07-29 2:28 UTC (permalink / raw) To: emacs-devel Michael Heerdegen <michael_heerdegen@web.de> writes: > > branch: master > > commit d7e848ccdaab81fed187b415e95c436b6deb2657 > > Author: Lars Ingebrigtsen <larsi@gnus.org> > > Commit: Lars Ingebrigtsen <larsi@gnus.org> Not sure anymore which part of the change is the eval one: M-x revert-buffer in an elisp-mode buffer with outline-minor-mode on is enough to let the buttons appear. Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 1:52 ` master d7e848ccda 2/3: Use icons in outline Michael Heerdegen 2022-07-29 2:28 ` Michael Heerdegen @ 2022-07-29 11:36 ` Lars Ingebrigtsen 2022-07-29 11:43 ` Lars Ingebrigtsen 2022-07-30 4:22 ` Michael Heerdegen 1 sibling, 2 replies; 14+ messages in thread From: Lars Ingebrigtsen @ 2022-07-29 11:36 UTC (permalink / raw) To: Michael Heerdegen; +Cc: emacs-devel Michael Heerdegen <michael_heerdegen@web.de> writes: > Lars, this has an unintended effect for me: If I ediff buffers with > outline-minor-mode turned on, and do > > #+begin_src emacs-lisp > (add-hook 'ediff-prepare-buffer-hook > (defun test () > (when (bound-and-true-p outline-minor-mode) > (outline-show-all)))) > #+end_src > > then the ediffed buffers will get buttons. Worse: they stay even after > finishing Ediff. Tested with emacs -Q. > > Seems that when `ediff-prepare-buffer-hook' is run the buffers are in a > temporary state where the (derived-mode . special-mode) condition is > fulfilled, or something like that. The logic for using buttons was completely wrong -- I've now fixed it on the trunk. Can you see whether this fixes this problem, too? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 11:36 ` Lars Ingebrigtsen @ 2022-07-29 11:43 ` Lars Ingebrigtsen 2022-07-30 4:22 ` Michael Heerdegen 1 sibling, 0 replies; 14+ messages in thread From: Lars Ingebrigtsen @ 2022-07-29 11:43 UTC (permalink / raw) To: Michael Heerdegen; +Cc: emacs-devel Lars Ingebrigtsen <larsi@gnus.org> writes: > The logic for using buttons was completely wrong -- I've now fixed it on > the trunk. Can you see whether this fixes this problem, too? (I think perhaps the button stuff needs even more tweaking, but I'm not sure. In major modes we have more freedom to do things, but getting these defaults right for minor modes is more tricky. I'm thinking of adding some more stuff here to allow major modes to "opt in" to buttonising when they're prepared for it. But `outline-minor-mode-use-buttons' would still let users opt out of it, of course.) ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 11:36 ` Lars Ingebrigtsen 2022-07-29 11:43 ` Lars Ingebrigtsen @ 2022-07-30 4:22 ` Michael Heerdegen 1 sibling, 0 replies; 14+ messages in thread From: Michael Heerdegen @ 2022-07-30 4:22 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: emacs-devel Lars Ingebrigtsen <larsi@gnus.org> writes: > The logic for using buttons was completely wrong -- I've now fixed it > on the trunk. Can you see whether this fixes this problem, too? Yes, I didn't see something like that today, and I also can't reproduce it with the recipe from yesterday. Thanks for fixing, Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline [not found] ` <20220728123946.8E45DC0F203@vcs2.savannah.gnu.org> 2022-07-29 1:52 ` master d7e848ccda 2/3: Use icons in outline Michael Heerdegen @ 2022-07-29 3:17 ` Po Lu 2022-07-29 6:08 ` Eli Zaretskii 2022-07-29 11:39 ` Lars Ingebrigtsen 1 sibling, 2 replies; 14+ messages in thread From: Po Lu @ 2022-07-29 3:17 UTC (permalink / raw) To: emacs-devel; +Cc: Lars Ingebrigtsen Lars Ingebrigtsen <larsi@gnus.org> writes: > branch: master > commit d7e848ccdaab81fed187b415e95c436b6deb2657 > Author: Lars Ingebrigtsen <larsi@gnus.org> > Commit: Lars Ingebrigtsen <larsi@gnus.org> > > Use icons in outline > > * lisp/help.el (describe-bindings): Don't force buttons on > (bug#56691). > > * lisp/outline.el (outline-minor-mode-use-buttons): Default > buttons on in special-mode buffers. Could this be turned off by default? In NEWS, this results in the first asterisk in a nested heading turning into an icon, and the second asterisk being displayed normally. In addition to that, the button shown when the heading is hidden is different from the button shown when it is not. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 3:17 ` Po Lu @ 2022-07-29 6:08 ` Eli Zaretskii 2022-07-29 6:47 ` Po Lu 2022-07-29 11:39 ` Lars Ingebrigtsen 1 sibling, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2022-07-29 6:08 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel, larsi > From: Po Lu <luangruo@yahoo.com> > Cc: Lars Ingebrigtsen <larsi@gnus.org> > Date: Fri, 29 Jul 2022 11:17:16 +0800 > > Lars Ingebrigtsen <larsi@gnus.org> writes: > > > branch: master > > commit d7e848ccdaab81fed187b415e95c436b6deb2657 > > Author: Lars Ingebrigtsen <larsi@gnus.org> > > Commit: Lars Ingebrigtsen <larsi@gnus.org> > > > > Use icons in outline > > > > * lisp/help.el (describe-bindings): Don't force buttons on > > (bug#56691). > > > > * lisp/outline.el (outline-minor-mode-use-buttons): Default > > buttons on in special-mode buffers. > > Could this be turned off by default? In NEWS, this results in the first > asterisk in a nested heading turning into an icon, and the second > asterisk being displayed normally. Isn't that a bug? I'd expect the entire string of asterisks to be replaced by the icon. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 6:08 ` Eli Zaretskii @ 2022-07-29 6:47 ` Po Lu 2022-07-29 7:22 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Po Lu @ 2022-07-29 6:47 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel, larsi Eli Zaretskii <eliz@gnu.org> writes: > Isn't that a bug? I'd expect the entire string of asterisks to be > replaced by the icon. In that case the depth of the heading isn't visible, so using an icon there loses information. And IMNSHO there is no point in using icons instead of asterisks, so either way this should really just be turned off. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 6:47 ` Po Lu @ 2022-07-29 7:22 ` Eli Zaretskii 2022-07-29 8:07 ` Po Lu 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2022-07-29 7:22 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel, larsi > From: Po Lu <luangruo@yahoo.com> > Cc: emacs-devel@gnu.org, larsi@gnus.org > Date: Fri, 29 Jul 2022 14:47:10 +0800 > > Eli Zaretskii <eliz@gnu.org> writes: > > > Isn't that a bug? I'd expect the entire string of asterisks to be > > replaced by the icon. > > In that case the depth of the heading isn't visible, so using an icon > there loses information. That depends on how the icon is displayed, doesn't it? Btw, why don't we support6 the "standard" way of displaying multilevel itemized lists: with '+' and '-' icons and suitable indentation? > And IMNSHO there is no point in using icons instead of asterisks I disagree, FWIW. You are, in effect, saying that the entire feature should be deleted from Emacs, and that is definitely not so. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 7:22 ` Eli Zaretskii @ 2022-07-29 8:07 ` Po Lu 0 siblings, 0 replies; 14+ messages in thread From: Po Lu @ 2022-07-29 8:07 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel, larsi Eli Zaretskii <eliz@gnu.org> writes: > That depends on how the icon is displayed, doesn't it? At present it is only displayed in column 0. > Btw, why don't we support6 the "standard" way of displaying multilevel > itemized lists: with '+' and '-' icons and suitable indentation? That would be nice, yes. > I disagree, FWIW. You are, in effect, saying that the entire feature > should be deleted from Emacs, and that is definitely not so. I meant that specifically in the case of outline-mode in files such as NEWS, not customizable icons in general. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 3:17 ` Po Lu 2022-07-29 6:08 ` Eli Zaretskii @ 2022-07-29 11:39 ` Lars Ingebrigtsen 2022-07-29 11:53 ` Po Lu 1 sibling, 1 reply; 14+ messages in thread From: Lars Ingebrigtsen @ 2022-07-29 11:39 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel Po Lu <luangruo@yahoo.com> writes: > Could this be turned off by default? In NEWS, this results in the first > asterisk in a nested heading turning into an icon, and the second > asterisk being displayed normally. Which one of the NEWS modes is this with? > In addition to that, the button shown when the heading is hidden is > different from the button shown when it is not. That's on purpose? It's open/close icons. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 11:39 ` Lars Ingebrigtsen @ 2022-07-29 11:53 ` Po Lu 2022-07-29 12:02 ` Lars Ingebrigtsen 0 siblings, 1 reply; 14+ messages in thread From: Po Lu @ 2022-07-29 11:53 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: emacs-devel Lars Ingebrigtsen <larsi@gnus.org> writes: > Po Lu <luangruo@yahoo.com> writes: > >> Could this be turned off by default? In NEWS, this results in the first >> asterisk in a nested heading turning into an icon, and the second >> asterisk being displayed normally. > > Which one of the NEWS modes is this with? Both. >> In addition to that, the button shown when the heading is hidden is >> different from the button shown when it is not. > > That's on purpose? It's open/close icons. I meant that the size of the two buttons are different. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 11:53 ` Po Lu @ 2022-07-29 12:02 ` Lars Ingebrigtsen 2022-07-29 12:35 ` Po Lu 0 siblings, 1 reply; 14+ messages in thread From: Lars Ingebrigtsen @ 2022-07-29 12:02 UTC (permalink / raw) To: Po Lu; +Cc: emacs-devel Po Lu <luangruo@yahoo.com> writes: >> Which one of the NEWS modes is this with? > > Both. > >>> In addition to that, the button shown when the heading is hidden is >>> different from the button shown when it is not. >> >> That's on purpose? It's open/close icons. > > I meant that the size of the two buttons are different. Perhaps it's better to open a bug report for this, with a complete recipe to reproduce the problem, and some screenshots. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master d7e848ccda 2/3: Use icons in outline 2022-07-29 12:02 ` Lars Ingebrigtsen @ 2022-07-29 12:35 ` Po Lu 0 siblings, 0 replies; 14+ messages in thread From: Po Lu @ 2022-07-29 12:35 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: emacs-devel Lars Ingebrigtsen <larsi@gnus.org> writes: > Perhaps it's better to open a bug report for this, with a complete > recipe to reproduce the problem, and some screenshots. Will do. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-07-30 4:22 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <165901198499.7036.2651373879831716862@vcs2.savannah.gnu.org> [not found] ` <20220728123946.8E45DC0F203@vcs2.savannah.gnu.org> 2022-07-29 1:52 ` master d7e848ccda 2/3: Use icons in outline Michael Heerdegen 2022-07-29 2:28 ` Michael Heerdegen 2022-07-29 11:36 ` Lars Ingebrigtsen 2022-07-29 11:43 ` Lars Ingebrigtsen 2022-07-30 4:22 ` Michael Heerdegen 2022-07-29 3:17 ` Po Lu 2022-07-29 6:08 ` Eli Zaretskii 2022-07-29 6:47 ` Po Lu 2022-07-29 7:22 ` Eli Zaretskii 2022-07-29 8:07 ` Po Lu 2022-07-29 11:39 ` Lars Ingebrigtsen 2022-07-29 11:53 ` Po Lu 2022-07-29 12:02 ` Lars Ingebrigtsen 2022-07-29 12:35 ` Po Lu
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.