unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "Shuguang Sun" <shuguang79@qq.com>
Cc: 60188 <60188@debbugs.gnu.org>
Subject: bug#60188: 30.0.50; zerop cpd-length are not all handled inproject--read-file-cpd-relative
Date: Tue, 20 Dec 2022 10:41:27 +0200	[thread overview]
Message-ID: <86359ao4aw.fsf@mail.linkov.net> (raw)
In-Reply-To: <tencent_3351FA42666243205C29468F@qq.com> (Shuguang Sun's message of "Tue, 20 Dec 2022 07:45:50 +0800")

>> Strange, I can't reproduce the problem. When cpd-length is 0,
>> then for the empty string (abbreviate-file-name "") returns "".

> In my case, common-parent-directory is nil.

I see.  This is because common-parent-directory is defined as:

  (if (> (length common-prefix) 0)
      (file-name-directory common-prefix))

But maybe it should also have the 'else' branch like:

  (if (> (length common-prefix) 0)
      (file-name-directory common-prefix)
    "")





  reply	other threads:[~2022-12-20  8:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19  5:12 bug#60188: 30.0.50; zerop cpd-length are not all handled in project--read-file-cpd-relative Shuguang Sun via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19 19:50 ` Juri Linkov
2022-12-21  8:48   ` Shuguang Sun via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19 21:55 ` Dmitry Gutov
2022-12-19 23:45 ` bug#60188: 30.0.50; zerop cpd-length are not all handled inproject--read-file-cpd-relative Shuguang Sun via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-20  8:41   ` Juri Linkov [this message]
2022-12-19 23:48 ` Shuguang Sun via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-20  0:55   ` Dmitry Gutov

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=86359ao4aw.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=60188@debbugs.gnu.org \
    --cc=shuguang79@qq.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 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).