all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master b299c04201: Fix computation of outline heading level for non-git diff
       [not found] ` <20220216192037.2F236C00894@vcs2.savannah.gnu.org>
@ 2022-02-16 20:50   ` Stefan Monnier
  2022-02-17  7:21     ` Matthias Meulien
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2022-02-16 20:50 UTC (permalink / raw)
  To: emacs-devel; +Cc: Matthias Meulien

>     Fix computation of outline heading level for non-git diff
>     
>     * lisp/vc/diff-mode.el (diff-setup-buffer-type): Compute outline
>     heading level using diff-hunk-header-re (bug#51809).

Sounds good, thanks.

>     (diff--font-lock-prettify): Disable prettify in non-git diff.

Hmmm... why?


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master b299c04201: Fix computation of outline heading level for non-git diff
  2022-02-16 20:50   ` master b299c04201: Fix computation of outline heading level for non-git diff Stefan Monnier
@ 2022-02-17  7:21     ` Matthias Meulien
  2022-02-19 19:06       ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Meulien @ 2022-02-17  7:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>     (diff--font-lock-prettify): Disable prettify in non-git diff.
>
> Hmmm... why?

Because my experience is that `diff--font-lock-prettify' is broken with
diff not coming from Git. Eg,


[-- Attachment #2: with_prettify.png --]
[-- Type: image/png, Size: 66323 bytes --]

[-- Attachment #3: Type: text/plain, Size: 25 bytes --]


for the attached diff.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: woman.patch --]
[-- Type: text/x-diff, Size: 560 bytes --]

--- woman.el.orig
+++ woman.el
@@ -2299,9 +2299,9 @@
       (replace-match woman-unpadded-space-string t t))
 
     ;; Discard optional hyphen \%; concealed newlines \<newline>;
-    ;; point-size change function \sN,\s+N, \s-N:
+    ;; kerning \/, \,; point-size change function \sN,\s+N, \s-N:
     (goto-char from)
-    (while (re-search-forward "\\\\\\([%\n]\\|s[-+]?[0-9]+\\)" nil t)
+    (while (re-search-forward "\\\\\\([%\n/,]\\|s[-+]?[0-9]+\\)" nil t)
       (woman-delete-match 0))
 
     ;; BEWARE: THIS SHOULD PROBABLY ALL BE DONE MUCH LATER!!!!!

[-- Attachment #5: Type: text/plain, Size: 67 bytes --]


I must admit I've not tried to fix it for that diff.
-- 
Matthias

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master b299c04201: Fix computation of outline heading level for non-git diff
  2022-02-17  7:21     ` Matthias Meulien
@ 2022-02-19 19:06       ` Stefan Monnier
  2022-02-20  8:02         ` Matthias Meulien
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2022-02-19 19:06 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: emacs-devel

Matthias Meulien [2022-02-17 08:21:21] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>     (diff--font-lock-prettify): Disable prettify in non-git diff.
>> Hmmm... why?
> Because my experience is that `diff--font-lock-prettify' is broken with
> diff not coming from Git. Eg,

Ah, thanks.  I just pushed a patch which should fix it.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master b299c04201: Fix computation of outline heading level for non-git diff
  2022-02-19 19:06       ` Stefan Monnier
@ 2022-02-20  8:02         ` Matthias Meulien
  2022-02-20 14:36           ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Meulien @ 2022-02-20  8:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Ah, thanks.  I just pushed a patch which should fix it.

Can you confirm that for the patch file I submitted, after your fix is
applied, `diff--font-lock-prettify' is now supposed to do nothing?

This is what I observe. (Which is better than the previous broken
state, thank you!)

(Just in case 😉 there're other cases where prettifying diff's doesn't
work as expected: They're described in bug#54034.)
-- 
Matthias



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master b299c04201: Fix computation of outline heading level for non-git diff
  2022-02-20  8:02         ` Matthias Meulien
@ 2022-02-20 14:36           ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2022-02-20 14:36 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: emacs-devel

Matthias Meulien [2022-02-20 09:02:33] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Ah, thanks.  I just pushed a patch which should fix it.
> Can you confirm that for the patch file I submitted, after your fix is
> applied, `diff--font-lock-prettify' is now supposed to do nothing?

Not quite.  My patch fixes the error that incorrectly moved the first
`+` and `-` of the file header to the fringe.  IOW the result is that on
non-Git diffs, `diff--font-lock-prettify` will still move the `+` and
`-` of the diffs into the fringe, but it will leave the rest (most
importantly the file headers) untouched.

> (Just in case 😉 there're other cases where prettifying diff's doesn't
> work as expected: They're described in bug#54034.)

I'll see you there ;-)


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-20 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <164503923630.1044.8899541087881650110@vcs2.savannah.gnu.org>
     [not found] ` <20220216192037.2F236C00894@vcs2.savannah.gnu.org>
2022-02-16 20:50   ` master b299c04201: Fix computation of outline heading level for non-git diff Stefan Monnier
2022-02-17  7:21     ` Matthias Meulien
2022-02-19 19:06       ` Stefan Monnier
2022-02-20  8:02         ` Matthias Meulien
2022-02-20 14:36           ` Stefan Monnier

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.