unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Arne Jørgensen" <arne@arnested.dk>
To: emacs-devel@gnu.org
Subject: [patch] Use in `file-truename' in `flymake-create-temp-inplace'
Date: Fri, 20 Jul 2012 11:39:40 +0200	[thread overview]
Message-ID: <m24np2lqjn.fsf@arnested.dk> (raw)

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

If the temp-name in `flymake-create-temp-inplace' is going through
symlinks reported errors might not get catched if they contain the
expanded file name.

Wrapping temp-name in `file-truename' will make the file names
consistent in the error reports and in flymake.

Kind regards,
Arne


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: flymake.patch --]
[-- Type: text/x-patch, Size: 818 bytes --]

--- flymake.el-OLD	2012-07-20 11:36:07.000000000 +0200
+++ flymake.el	2012-07-20 11:36:16.000000000 +0200
@@ -1529,10 +1529,10 @@
     (error "Invalid file-name"))
   (or prefix
       (setq prefix "flymake"))
-  (let* ((temp-name   (concat (file-name-sans-extension file-name)
-			      "_" prefix
-			      (and (file-name-extension file-name)
-				   (concat "." (file-name-extension file-name))))))
+  (let* ((temp-name (file-truename (concat (file-name-sans-extension file-name)
+                                           "_" prefix
+                                           (and (file-name-extension file-name)
+                                                (concat "." (file-name-extension file-name)))))))
     (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name)
     temp-name))
 

                 reply	other threads:[~2012-07-20  9:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m24np2lqjn.fsf@arnested.dk \
    --to=arne@arnested.dk \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).