all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21744: 24.5; diff-mode highlight only suitable part
@ 2015-10-23 14:55 Evgeniy Dushistov
  2015-10-23 15:44 ` Dmitry Gutov
  0 siblings, 1 reply; 2+ messages in thread
From: Evgeniy Dushistov @ 2015-10-23 14:55 UTC (permalink / raw)
  To: 21744

For example let's I have such content of *vc-diff*

diff --git a/cmake/FindLibClang.cmake b/cmake/FindLibClang.cmake
index 8aa7689..62b5b08 100644
--- a/cmake/FindLibClang.cmake
+++ b/cmake/FindLibClang.cmake
@@ -72,7 +72,7 @@ if (NOT LIBCLANG_CXXFLAGS)
     endif ()
     set(LIBCLANG_CXXFLAGS "-I${LIBCLANG_CXXFLAGS}")
   endif ()
-  string(REGEX REPLACE "-([Og][0-9]*|std=c\\+\\+..|(W|f)[a-zA-Z-]*|DNDEBUG) ?" "" LIBCLANG_CXXFLAGS "${LIBCLANG_CXXFLAGS}")
+  string(REGEX REPLACE "-([Og][0-9]*|std=c\\+\\+..|(W|f)[=a-zA-Z-]*|DNDEBUG) ?" "" LIBCLANG_CXXFLAGS "${LIBCLANG_CXXFLAGS}")
   set(LIBCLANG_CXXFLAGS ${LIBCLANG_CXXFLAGS} CACHE STRING "The LLVM C++ compiler flags needed to compile LLVM based applications.")
   unset(LIBCLANG_CXXFLAGS_HACK_CMAKECACHE_DOT_TEXT_BULLSHIT CACHE)
 endif ()

the diff-mode highlight string with starting "-" with red, and starting "+" with green,
it would be great if it  highlight also difference between strings.
There is only "=" symbol difference between two lines above, so it would be great
if emacs highlight also "=" in the second string.

You can see how github doing this:
https://github.com/Dushistov/rtags/commit/5d0419c453dde58bf3a37a00bf0e63bd186154bc

-- 
/Evgeniy





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

* bug#21744: 24.5; diff-mode highlight only suitable part
  2015-10-23 14:55 bug#21744: 24.5; diff-mode highlight only suitable part Evgeniy Dushistov
@ 2015-10-23 15:44 ` Dmitry Gutov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Gutov @ 2015-10-23 15:44 UTC (permalink / raw)
  To: Evgeniy Dushistov, 21744

Hi Evgeniy,

On 10/23/2015 05:55 PM, Evgeniy Dushistov wrote:
> the diff-mode highlight string with starting "-" with red, and starting "+" with green,
> it would be great if it  highlight also difference between strings.
> There is only "=" symbol difference between two lines above, so it would be great
> if emacs highlight also "=" in the second string.

We currently have this feature in the shape of diff-auto-refine-mode. 
Try pressing `n' or `p': the navigation commands also refine the hunks 
to show the differences.

There has been some talk of doing that automatically (using font-lock), 
but the refining algorithm is rather slow on large hunks.

I'd also recommend installing diff-hl (available in ELPA): it remaps the 
vc-diff command to its own wrapper that also scrolls to the hunk 
corresponding to the current line, and refines it.





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

end of thread, other threads:[~2015-10-23 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-23 14:55 bug#21744: 24.5; diff-mode highlight only suitable part Evgeniy Dushistov
2015-10-23 15:44 ` 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.