GNU bug report logs - #21095
[bug] buffer-file-name is nil in batch run

Previous Next

Package: emacs;

Reported by: Rasmus <rasmus <at> gmx.us>

Date: Mon, 20 Jul 2015 15:20:02 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rasmus <rasmus <at> gmx.us>
To: 21095 <at> debbugs.gnu.org
Cc: samer <at> samertm.com
Subject: bug#21095: [bug] buffer-file-name is nil in batch run
Date: Mon, 20 Jul 2015 17:19:37 +0200
Hi,

Commit d3605ed7d17 breaks org-mode batch export since buffer-file-name is
now nil.  Is this a feature?

commit d3605ed7d173aa1c23ad8944cf92e7b810330cb8
Author: Samer Masterson <samer <at> samertm.com>
Date:   Thu May 28 14:30:31 2015 -0700

    Show files when `initial-buffer-choice' is non-nil
    
    * startup.el (command-line-1): When Emacs is given a file as an
    argument and `initial-buffer-choice' is non-nil, display both the file
    and `initial-buffer-choice'.  For more than one file, show
    `initial-buffer-choice' and *Buffer List*.  Refactor display-changing
    commands out of the command line arg parser.
    (initial-buffer-choice): Clarify docstring.

Minimal test

    $ emacs --no-init-file --batch --file foo.org --eval="(let ((name (buffer-file-name))) (with-temp-file \"report.txt\" (insert (message \"%S\n\" name))))"
    $ cat report.txt

Before the mentioned commit buffer-file-name would not be nil when --file
is given.

Bug report on Org ML: http://permalink.gmane.org/gmane.emacs.orgmode/98926

Rasmus

Emacs 
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.5)
 of 2015-07-17 on W530
Repository revision: 0e12f4d4a59394cd1d943b24e53c67f0e20f31e7
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
Configured using:
 `configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
 --libexecdir=/usr/lib --mandir=/usr/share/man --without-sound --with-xft
 --with-xwidgets --with-x-toolkit=gtk3 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fstack-protector-strong
 --param=ssp-buffer-size=4' 'LDFLAGS=-lMagickWand-6.Q16HDRI
 -lMagickCore-6.Q16HDRI ' CPPFLAGS=-D_FORTIFY_SOURCE=2'

-- 
Hvor meget poesi tror De kommer ud af et glas isvand?




This bug report was last modified 9 years and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.