[email protected]
[Top] [All Lists]

Bug#279378: marked as forwarded (vim: Doesn't source $PWD/_exrc at start

Subject: Bug#279378: marked as forwarded vim: Doesn't source $PWD/_exrc at startup
From: Debian Bug Tracking System
Date: Sun, 17 Apr 2005 15:48:13 -0700
Your message dated Mon, 18 Apr 2005 00:35:27 +0200
with message-id <[email protected]>
has caused the Debian Bug report #279378,
regarding vim: Doesn't source $PWD/_exrc at startup
to be marked as having been forwarded to the upstream software
author(s) Bram Moolenaar <[email protected]>.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at 279378-forwarded) by bugs.debian.org; 17 Apr 2005 22:36:33 +0000
>From [email protected] Sun Apr 17 15:36:33 2005
Return-path: <[email protected]>
Received: from ms001msg.fastwebnet.it [] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DNINV-0002dY-00; Sun, 17 Apr 2005 15:36:33 -0700
Received: from fistandantilus.takhisis.org ( by 
ms001msg.fastwebnet.it (
        id 4235CA07006C42F6; Mon, 18 Apr 2005 00:36:02 +0200
Received: by fistandantilus.takhisis.org (Postfix, from userid 3148)
        id 77A6D27411C; Mon, 18 Apr 2005 00:35:27 +0200 (CEST)
Date: Mon, 18 Apr 2005 00:35:27 +0200
From: Stefano Zacchiroli <[email protected]>
To: Bram Moolenaar <[email protected]>
Cc: [email protected], [email protected],
        [email protected]
Subject: doesn't source $PWD/_exrc at startup
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="3MwIy2ne0vdjdPXF"
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
Delivered-To: [email protected]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,VALID_BTS_CONTROL 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 2

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

tags 279378 + patch

Hi Bram,
  a user reported that vim doesn't source "_exrc" at startup even if,
according to the doc it should when the "exrc" option is set and none of
".vimrc", "_vimrc", and ".exrc" are found.

Looking at the code it seems to me that the problem is in main.c. When
you call do_source on EXRC_FILE you set to FALSE the value of the
"check_other" param. Thus, only ".exrc" is tried while "_exrc" is not.

The attached patch fixes the problem, but I don't know whether also the
other argument of do_source (is_vimrc) should be set to true or not in
that case.

Full bug report from the debian BTS follows, patch attached.


> Package: vim
> Version: 1:6.3-013+2
> Severity: minor
> According to the docs (starting.txt), the "exrc" option should make vim
> check for 
> - .vimrc 
> - _vimrc
> - .exrc
> - _exrc
> in the current directory, in that order, and sourcing the first file
> found. But a _exrc file is ignored. -- The first three are fine.
> Nikolaus

Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[email protected]{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="303__exrc.c.diff"

diff -urN vim63/src/main.c vim63.new/src/main.c
--- vim63/src/main.c    2005-04-18 00:26:22.292076624 +0200
+++ vim63.new/src/main.c        2005-04-18 00:26:00.650366664 +0200
@@ -1445,7 +1445,7 @@
                                      (char_u *)EXRC_FILE, FALSE) != FPC_SAME
-                   (void)do_source((char_u *)EXRC_FILE, FALSE, FALSE);
+                   (void)do_source((char_u *)EXRC_FILE, TRUE, FALSE);
        if (secure == 2)


To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#279378: marked as forwarded (vim: Doesn't source $PWD/_exrc at startup), Debian Bug Tracking System <=