all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jonas Bernoulli <jonas@bernoul.li>
Cc: theonewiththeevillook@yahoo.fr, emacs-devel@gnu.org,
	john.b.mastro@gmail.com
Subject: Re: Removing rollback from VC mode - request for comment
Date: Sun, 14 Dec 2014 21:34:38 +0200	[thread overview]
Message-ID: <83h9wyxbxt.fsf@gnu.org> (raw)
In-Reply-To: <87iohe4eo7.fsf@bernoul.li>

> From: Jonas Bernoulli <jonas@bernoul.li>
> Cc: Nicolas Richard <theonewiththeevillook@yahoo.fr>, john.b.mastro@gmail.com, emacs-devel@gnu.org
> Date: Sun, 14 Dec 2014 13:11:06 +0100
> 
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:
> >> 
> >> I don't know what Eli has in mind, but perhaps magit-make-margin-overlay
> >> is one such thing ?
> >
> > Yes, it's one of them.
> 
> `elisp(Displaying in the Margins)' states that, "to display something in
> the margin _in association with_ certain buffer text, without altering
> or preventing the display of that text, put a `before-string' property
> on the text and put the margin display specification on the contents of
> the before-string."
> 
> That's what `magit-make-margin-overlay' does:
> 
>   (defun magit-make-margin-overlay (&rest strings)
>     (let ((o (make-overlay (point) (line-end-position) nil t)))
>       (overlay-put o 'evaporate t)
>       (overlay-put o 'before-string
>                    (propertize "o" 'display
>                                (list '(margin right-margin)
>                                      (apply #'concat strings))))))
> 
> It seems to me that Magit is doing it the way it is supposed to be doing
> it.  Is there another undocumented way?  Am I missing something?

I didn't say that magit uses some undocumented feature, or uses it
contrary to documentation.  That's not the issue.

The issue is that magit uses these features too much, at times almost
completely obscuring the buffer text with display and overlay
strings.  The Emacs display engine was never meant to cope with such
massive usage of these features.  I think magit also uses a lot of
overlay/display strings with newlines, or maybe it did in the past.
That is one of the nastiest thing to do with Emacs display.  (I can
explain if you are interested.)

And frankly, I don't understand why this kind of design was necessary:
it's not like magit shows some file whose contents it can't control.
It presents a buffer that is entirely created out of thin air by Git.
If what Git generates doesn't fit what magit wants to show the user,
what prevents magit from massaging the text it gets from Git to its
heart's content, when creating the buffer?  Instead of overlaying
buffer text with display and overlay strings, it could simply format
the buffer text any way it likes, and then avoid the need to do all
that.

I hope this explains why I feel badly about that.



  reply	other threads:[~2014-12-14 19:34 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11  9:21 Removing rollback from VC mode - request for comment Eric S. Raymond
2014-12-11  9:43 ` David Kastrup
2014-12-11 12:23   ` Thien-Thi Nguyen
2014-12-11 12:51     ` Eric S. Raymond
2014-12-11 16:24       ` Eli Zaretskii
2014-12-11 17:12         ` Steinar Bang
2014-12-11 18:16           ` Eli Zaretskii
2014-12-11 17:45         ` Eric S. Raymond
2014-12-11 18:30           ` Eli Zaretskii
2014-12-11 19:54           ` Sergey Organov
2014-12-11 20:53             ` Sergey Organov
2014-12-11 21:49             ` Eric S. Raymond
2014-12-12  0:57               ` Stephen J. Turnbull
2014-12-12 10:54                 ` Steinar Bang
2014-12-12  0:33           ` Stephen J. Turnbull
2014-12-12  3:21             ` Eric S. Raymond
2014-12-11 11:51 ` Ted Zlatanov
2014-12-11 12:42   ` Steinar Bang
2014-12-11 12:57     ` Eric S. Raymond
2014-12-11 16:23     ` Eli Zaretskii
2014-12-11 11:53 ` Steinar Bang
2014-12-11 11:57   ` Steinar Bang
2014-12-11 12:36     ` Eric S. Raymond
2014-12-11 13:48       ` David Kastrup
2014-12-11 14:27       ` Ted Zlatanov
2014-12-11 15:59         ` Steinar Bang
2014-12-11 16:21       ` Eli Zaretskii
2014-12-11 17:01         ` Óscar Fuentes
2014-12-11 18:12           ` Eli Zaretskii
2014-12-11 19:24             ` Steinar Bang
2014-12-11 20:23               ` Stefan Monnier
2014-12-11 20:59               ` Eli Zaretskii
2014-12-12 15:44                 ` John Mastro
2014-12-12 16:01                   ` Nicolas Richard
2014-12-12 19:22                     ` Eli Zaretskii
2014-12-14 12:11                       ` Jonas Bernoulli
2014-12-14 19:34                         ` Eli Zaretskii [this message]
2014-12-14 23:29                           ` Stefan Monnier
2014-12-15 13:10                           ` Jonas Bernoulli
2014-12-15 17:21                             ` Eli Zaretskii
2014-12-12 19:22                   ` Eli Zaretskii
2014-12-11 21:11               ` Rasmus
2014-12-11 17:09         ` Eric S. Raymond
2014-12-12  0:21           ` Stephen J. Turnbull
2014-12-12  3:19             ` Eric S. Raymond
2014-12-12 10:57             ` Steinar Bang
2014-12-12 13:57               ` Stefan Monnier
2014-12-12 14:06                 ` Sergey Organov
2014-12-12 16:04                   ` Stefan Monnier
2014-12-14 14:40               ` Stephen J. Turnbull
2014-12-14 20:48                 ` Steinar Bang
2014-12-14 23:29                   ` Stefan Monnier
2014-12-15  2:04                   ` Stephen J. Turnbull
2014-12-15  9:04                     ` David Kastrup
2014-12-11 18:55       ` Achim Gratz
2014-12-11 19:28         ` Steinar Bang
2014-12-11 20:21           ` Stefan Monnier
2014-12-12  9:06             ` vc-region-authors (or some such) Sebastien Vauban
2014-12-12 14:22               ` Stefan Monnier
2014-12-12 16:13                 ` Dmitry Gutov
2014-12-11 15:47 ` Removing rollback from VC mode - request for comment Stefan Monnier
2014-12-11 17:02   ` Sergey Organov
2014-12-11 18:36   ` Eric S. Raymond
2014-12-11 19:40     ` Stefan Monnier
2014-12-12 16:41     ` Richard Stallman
2014-12-12 17:45       ` Eric S. Raymond
2014-12-13 12:46         ` Richard Stallman
2014-12-13 13:41           ` Eric S. Raymond
2014-12-14  9:07             ` Richard Stallman
2014-12-14 10:04               ` Eric S. Raymond
2014-12-14 14:01                 ` Thien-Thi Nguyen
2014-12-11 19:25 ` Karl Fogel
2014-12-11 19:50 ` Richard Stallman
2014-12-12 15:42 ` Uwe Brauer
2014-12-12 16:15   ` David Kastrup
2014-12-12 17:16     ` Uwe Brauer
2014-12-12 17:43       ` David Kastrup
2014-12-12 19:02         ` Stefan Monnier
2014-12-12 20:54           ` Uwe Brauer
2014-12-12 21:49             ` Stefan Monnier
2014-12-13  9:30               ` Uwe Brauer
2014-12-13  9:42                 ` David Kastrup
2014-12-13 10:32                   ` Eli Zaretskii
2014-12-13 10:45                     ` David Kastrup
2014-12-13 11:36                       ` Eli Zaretskii
2014-12-13 13:59                 ` Stefan Monnier
2014-12-13 15:21                   ` Uwe Brauer
2014-12-14  4:06                     ` Stefan Monnier
2014-12-14 13:13                       ` Uwe Brauer
2014-12-14 13:27                         ` David Kastrup
2014-12-15 17:25                           ` Uwe Brauer
2014-12-15  4:38                         ` Stefan Monnier
2014-12-15  9:14                           ` David Kastrup
2014-12-15 17:34                           ` Uwe Brauer
2014-12-17 21:01                             ` Stefan Monnier
2014-12-12 20:52         ` Uwe Brauer
2014-12-12 17:41     ` Multiple independent projects per directory Eric S. Raymond
2014-12-12 18:07   ` Removing rollback from VC mode - request for comment Thien-Thi Nguyen

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=83h9wyxbxt.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=john.b.mastro@gmail.com \
    --cc=jonas@bernoul.li \
    --cc=theonewiththeevillook@yahoo.fr \
    /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.