all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Fabrice Popineau <fabrice.popineau@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs and Windows junctions
Date: Thu, 19 Feb 2015 10:50:10 +0200	[thread overview]
Message-ID: <83ioey475p.fsf@gnu.org> (raw)
In-Reply-To: <loom.20150218T145410-0@post.gmane.org>

> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Wed, 18 Feb 2015 14:09:52 +0000 (UTC)
> 
> This question has been asked on Stackexchange:
> 
> http://emacs.stackexchange.com/questions/6070/hard-and-soft-links-junctions-under-windows
> 
> How difficult would it be to report junctions as symlinks?
> I find it desirable and informative.
> 
> Moreover, all the support seems to be already there.
> Specifically, it would suffice to handle the case of 
> IO_REPARSE_TAG_MOUNT_POINT in src/w32.c/is_symlink() 
> and src/w32.c/readlink() the same way it is done for 
> IO_REPARSE_TAG_SYMLINK.

Junction points are more like hard links to directories than like
symlinks, although deleting the target of a junction leaves the
junction pointing nowhere, which is more like a symlink.  But other
features are more like hard links: they actually share the data with
the target, and don't require UAC elevation to create them.  Also,
symlinks are not supported before Vista, so having only symlinks to
directories on those systems would be confusing, I think.

So IMO treating junction points as symlinks would be wrong due to a
different semantics and feature set.

We could perhaps treat junction points as hard links to directories
(since the "normal" hard links don't support directories on NTFS).  So
perhaps changing sys_link to create a junction point when the target
is a directory, provided that the nlinks member of the list returned
by file-attributes will indeed reflect that it's a hard link
(currently, we return it as 1, i.e. some special code for junctions
should be added to our implementation of 'stat').

That said, I'm not sure I see any important use cases for adding this
functionality, so perhaps I'm missing something.



  reply	other threads:[~2015-02-19  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 14:09 Emacs and Windows junctions Fabrice Popineau
2015-02-19  8:50 ` Eli Zaretskii [this message]
2015-02-19  8:55   ` Fabrice Popineau
2015-02-19  9:06     ` Eli Zaretskii

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=83ioey475p.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=fabrice.popineau@gmail.com \
    /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.