Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 724071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:10:49+00:00 2026-05-14T06:10:49+00:00

I’m using Flymake on C# code, emacs v22.2.1 on Windows. The Flymake stuff has

  • 0

I’m using Flymake on C# code, emacs v22.2.1 on Windows.

The Flymake stuff has been working well for me. For those who don’t know, you can read an overview of flymake, but the quick story is that flymake repeatedly builds the source file you are currently working on in the background, for the purpose of doing syntax checking. It then highlights the compiler warnings and erros in the current buffer.

Flymake didn’t work for C# initially, but I “monkey-patched it” and it works nicely now. If you edit C# in emacs, I highly recommend using flymake.

The only problem I have is with the UI. Flymake highlights the errors and warnings nicely, and then inserts “overlays” with tooltips containing the full error or warning text. If I hover the mouse pointer over the highlighted line in code, the overlay tooltip pops up.

alt text

But as you can see, the overlay tooltip is clipped, and it doesn’t display correctly.

Flymake seems to be doing the right thing, it’s the overlay part that seems broken., and overlay seems to do the right thing. It’s the tooltip that is displayed incorrectly.

Do overlays tooltips work correctly in emacs for Windows?

Where do I look to fix this?


After some research, I found that the effect is demonstrable with (tooltip-show really-long-string)

It has nothing to do with overlays, or flymake.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:10:50+00:00Added an answer on May 14, 2026 at 6:10 am

    I solved this with a defadvice on tooltip-show.

    ;; Reforms a single-line string ARG to a multi-line string with a max
    ;; of LIMIT chars on a line.
    ;;
    ;; This is intended to solve a problem with the display of tooltip text
    ;; in emacs on Win32 - which is that the tooltip is extended to be very very
    ;; long, and the final line is clipped.
    ;;
    ;; The solution is to split the text into multiple lines, and to add a
    ;; trailing newline to trick the tooltip logic into doing the right thing.
    ;;
    (defun cheeso-reform-string (limit arg)
      (let ((orig arg) (modified "") (curline "") word
            (words (split-string arg " ")))
        (while words
          (progn
            (setq curline "")
            (while (and words (< (length curline) limit))
              (progn
                (setq word (car words))
                (setq words (cdr words))
                (setq curline (concat curline " " word))))
            (setq modified (concat modified curline "\n"))))
        (setq modified (concat modified " \n")))
      )
    
    (defadvice tooltip-show (before
                             flymake-csharp-fixup-tooltip
                             (arg &optional use-echo-area)
                             activate compile)
      (progn
        (if (and (not use-echo-area)
                 (eq major-mode 'csharp-mode))
            (let ((orig (ad-get-arg 0)))
              (ad-set-arg 0 (cheeso-reform-string 72 orig))
              ))))
    

    result:

    alt text

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 466k
  • Answers 466k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There is not. The way I did it: xml.gsub!("<?xml version=\"1.0\"?>")… May 16, 2026 at 1:45 am
  • Editorial Team
    Editorial Team added an answer This blogpost gives a great overview of the most common… May 16, 2026 at 1:45 am
  • Editorial Team
    Editorial Team added an answer It doesn't appear that the server API allows this. May 16, 2026 at 1:45 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.