GNU bug report logs -
#28503
25.3; buffer-file-name returns nil in eww-pdfs
Previous Next
Reported by: Alex Branham <alex.branham <at> gmail.com>
Date: Mon, 18 Sep 2017 19:22:02 UTC
Severity: wishlist
Tags: wontfix
Found in version 25.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28503 in the body.
You can then email your comments to 28503 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28503
; Package
emacs
.
(Mon, 18 Sep 2017 19:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alex Branham <alex.branham <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 18 Sep 2017 19:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From emacs -Q:
M-x eww
(navigate to a pdf, I found this by searching "pdf test page"): http://www.orimi.com/pdf-test.pdf
then eval (buffer-file-name)
For me, it returns nil even though the pdf is a file on my computer (somewhere in /tmp for me).
It would be nice if this returned the actual path; I am trying to write a different function that will copy the pdf file elsewhere on my computer.
Thanks!
In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.19)
of 2017-09-16 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
-fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: eww
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28503
; Package
emacs
.
(Tue, 19 Sep 2017 00:41:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 28503 <at> debbugs.gnu.org (full text, mbox):
Alex Branham wrote:
> M-x eww
> (navigate to a pdf, I found this by searching "pdf test page"): http://www.orimi.com/pdf-test.pdf
>
> then eval (buffer-file-name)
>
> For me, it returns nil even though the pdf is a file on my computer (somewhere in /tmp for me).
For me, the pdf is displayed using Emacs's Doc View mode.
This converts the pdf to a png and displays the png.
So you aren't viewing the actual pdf file, you can't edit it, etc.
So I don't think it would make sense to set buffer-file-name as if you were.
(There is doc-view--buffer-file-name, an internal variable.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28503
; Package
emacs
.
(Tue, 19 Sep 2017 01:34:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 28503 <at> debbugs.gnu.org (full text, mbox):
But in a "normal" doc-view (ie one that's just visiting a file in your home dir), doc-view--buffer-file-name will return the file name even though the buffer is displaying the png, right? From the docstring:
The file name used for conversion. Normally it’s the same as
‘buffer-file-name’...
On Tue 19 Sep 2017 at 00:40, Glenn Morris <rgm <at> gnu.org> wrote:
> Alex Branham wrote:
>
>> M-x eww
>> (navigate to a pdf, I found this by searching "pdf test page"): http://www.orimi.com/pdf-test.pdf
>>
>> then eval (buffer-file-name)
>>
>> For me, it returns nil even though the pdf is a file on my computer (somewhere in /tmp for me).
>
> For me, the pdf is displayed using Emacs's Doc View mode.
> This converts the pdf to a png and displays the png.
> So you aren't viewing the actual pdf file, you can't edit it, etc.
> So I don't think it would make sense to set buffer-file-name as if you were.
> (There is doc-view--buffer-file-name, an internal variable.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28503
; Package
emacs
.
(Thu, 12 Apr 2018 23:18:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 28503 <at> debbugs.gnu.org (full text, mbox):
Alex Branham <alex.branham <at> gmail.com> writes:
> M-x eww
> (navigate to a pdf, I found this by searching "pdf test page"): http://www.orimi.com/pdf-test.pdf
>
> then eval (buffer-file-name)
>
> For me, it returns nil even though the pdf is a file on my computer (somewhere in /tmp for me).
I don't think that's the right thing to do. It's an eww buffer, not a
buffer tied to the file in question (even if it's showing a rendering of
the file).
So I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) wontfix.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 12 Apr 2018 23:18:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
28503 <at> debbugs.gnu.org and Alex Branham <alex.branham <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 12 Apr 2018 23:18:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 11 May 2018 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 41 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.