all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Yilkal Argaw <yilkalargawworkneh@gmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 56820@debbugs.gnu.org
Subject: bug#56820: outline-minor-mode replacing the first character with an arrow
Date: Wed, 31 Aug 2022 19:20:23 +0300	[thread overview]
Message-ID: <86wnaojst4.fsf@mail.linkov.net> (raw)
In-Reply-To: <CAJddU=oM-AgDpUQa_ZBv6ithgkAyCidb1GrFdkMkvKa-XwX_tw@mail.gmail.com> (Yilkal Argaw's message of "Sat, 30 Jul 2022 06:27:27 +0300")

> Thanks  that fixed the default behaviour but
> outline-minor-mode-use-buttons option still has a weird bug because
> when you use it with modes like python-mode and ruby-mode it replaces
> the first character of the outline-regep which for the aforementioned
> modes is strings like "module", "class", "def" etc... so when it
> replaces the first character it renders the buffer unreadable. So it
> might be better to insert the arrows in front of the first character
> instead of replacing the first character.

This patch could help to alleviate the problem by keeping
the first character displayed on the outline button:

```
diff --git a/lisp/outline.el b/lisp/outline.el
index 857ac9562f..498ea6fad4 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1006,7 +1018,8 @@ outline--make-button-overlay
         (put-text-property (point) (1+ (point)) 'face (plist-get icon 'face)))
       (when-let ((image (plist-get icon 'image)))
         (overlay-put o 'display image))
-      (overlay-put o 'display (plist-get icon 'string))
+      (overlay-put o 'display (concat (plist-get icon 'string)
+                                      (string (char-after (point)))))
       (overlay-put o 'face (plist-get icon 'face)))
     o))
 
```





  parent reply	other threads:[~2022-08-31 16:20 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 10:39 bug#56820: outline-minor-mode replacing the first character with an arrow Yilkal Argaw
2022-07-29 11:03 ` Eli Zaretskii
2022-07-29 11:03 ` Tassilo Horn
2022-07-29 12:03   ` John Yates
2022-07-29 12:19     ` Tassilo Horn
2022-07-29 11:04 ` Eli Zaretskii
2022-07-29 11:21 ` bug#56820: " Lars Ingebrigtsen
2022-07-30  3:27   ` Yilkal Argaw
2022-07-30  4:40     ` Jim Porter
2022-07-30  9:24       ` Yilkal Argaw
2022-07-30 11:52       ` Lars Ingebrigtsen
2022-07-30 12:48         ` Yilkal Argaw
2022-07-30 12:54           ` Lars Ingebrigtsen
2022-07-30 13:00             ` Yilkal Argaw
2022-07-30 19:26           ` Jim Porter
2022-08-31 16:20     ` Juri Linkov [this message]
2022-09-04 17:02       ` Juri Linkov
2022-09-04 18:09         ` Eli Zaretskii
2022-09-04 18:54           ` Eli Zaretskii
2022-09-05 11:08           ` Lars Ingebrigtsen
2022-09-06 16:05           ` Juri Linkov
2022-09-06 16:28             ` Eli Zaretskii
2022-09-06 16:34               ` Juri Linkov
2022-09-06 16:45                 ` Eli Zaretskii
2022-09-07 18:36                   ` Juri Linkov
2022-09-07 18:50                     ` Eli Zaretskii
2022-09-08  7:10                       ` Juri Linkov
2022-09-08  8:32                         ` Eli Zaretskii
2022-09-08 17:39                           ` Juri Linkov
2022-09-08 17:45                             ` Eli Zaretskii
2022-09-08 19:32                               ` Juri Linkov
2022-09-07 20:01                     ` Jim Porter
2022-09-08  7:13                       ` Juri Linkov
2022-09-08  8:37                         ` Eli Zaretskii
2022-09-08 12:01                       ` Lars Ingebrigtsen
2022-09-08 13:39                         ` Eli Zaretskii
2022-09-08 13:40                           ` Lars Ingebrigtsen
2022-09-08 14:03                             ` Eli Zaretskii
2022-09-09 17:04                               ` Lars Ingebrigtsen
2022-09-09 18:01                                 ` Eli Zaretskii
2022-09-10  4:36                                   ` Lars Ingebrigtsen
2022-09-10  6:21                                     ` Eli Zaretskii
2022-09-08 11:45                     ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-07 12:46                 ` Lars Ingebrigtsen

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=86wnaojst4.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=56820@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=yilkalargawworkneh@gmail.com \
    /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.
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.