all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolaj Schumacher <n_schumacher@web.de>
To: bug-gnu-emacs@gnu.org
Subject: Re: diff-find-file-name and /dev/null
Date: Sun, 19 Aug 2007 23:06:53 +0200	[thread overview]
Message-ID: <m2wsvrw7wy.fsf@nschum.de> (raw)
In-Reply-To: <878x89ag8z.fsf@lrde.org> ("Michaël Cadilhac"'s message of "Sat\, 18 Aug 2007 01\:33\:16 +0200")

michael@cadilhac.name (Michaël Cadilhac) wrote:

> Nikolaj Schumacher <n_schumacher@web.de> writes:
>
>> --- /dev/null
>> +++ b/foo/bar.c
>>
>> I noticed that `diff-goto-source' opens /dev/null, which is usually not
>> desirable.  I use the attached small change to get the actual file.
>
> Just for my information, why do you think it's not a good thing?

Since there's nothing to view or edit in /dev/null.

Also in a usual diff file

--- /dev/null	2007-08-17 06:03:27.000000000 +0200
+++ /foo/bar.c	2007-08-18 00:48:25.000000000 +0200

`diff-goto-source' would visit /foo/bar.c

git's peculiar a/ b/ prefixes are the problem here.  Usually it works,
because `diff-find-file-name' chops those off, if the file doesn't
exist.  It will try b/foo/bar.c first.  But then /dev/null, before
foo/bar.c.

I admit the actual fault could be the fact that it looks for first one
at all (or at least _before_ chopping off prefixes of the second one),
even when diff-jump-to-old-file is nil.  /dev/null is just the only
cause of such behavior.


regards,
Nikolaj Schumacher

  reply	other threads:[~2007-08-19 21:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-17 22:53 diff-find-file-name and /dev/null Nikolaj Schumacher
2007-08-17 23:33 ` Michaël Cadilhac
2007-08-19 21:06   ` Nikolaj Schumacher [this message]
2007-08-25  1:54     ` Glenn Morris
2007-08-27  4:51       ` Stefan Monnier
2007-08-27  7:10         ` Glenn Morris

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=m2wsvrw7wy.fsf@nschum.de \
    --to=n_schumacher@web.de \
    --cc=bug-gnu-emacs@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 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.