From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#28910: 27.0.50; Equivalent to __FILE__ Date: Fri, 20 Oct 2017 08:40:11 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508503340 15941 195.159.176.226 (20 Oct 2017 12:42:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2017 12:42:20 +0000 (UTC) To: 28910@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 20 14:42:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5Wcl-0002D0-6o for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 14:42:03 +0200 Original-Received: from localhost ([::1]:53865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5Wcs-0004YW-GA for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 08:42:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5Wbs-0003SU-Ej for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 08:41:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5Wbm-0004sZ-1d for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 08:41:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42560) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5Wbl-0004sR-Tp for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 08:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e5Wbl-0002a2-Na for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 08:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Oct 2017 12:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28910 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15085032379871 (code B ref -1); Fri, 20 Oct 2017 12:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Oct 2017 12:40:37 +0000 Original-Received: from localhost ([127.0.0.1]:51241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5WbN-0002Z9-7X for submit@debbugs.gnu.org; Fri, 20 Oct 2017 08:40:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5WbK-0002Yv-N8 for submit@debbugs.gnu.org; Fri, 20 Oct 2017 08:40:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5WbB-0004as-E4 for submit@debbugs.gnu.org; Fri, 20 Oct 2017 08:40:29 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52214) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e5WbB-0004aj-AC for submit@debbugs.gnu.org; Fri, 20 Oct 2017 08:40:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5Wb4-0002tS-Lm for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 08:40:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5Wb0-0004Mz-KK for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 08:40:18 -0400 Original-Received: from pmta21.teksavvy.com ([76.10.157.36]:8175) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5Wb0-0004Lg-EI for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 08:40:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2GxCQAw7ulZ/4AFNJ1cHQELAQUBgzEuJT9uJ48NjksBgioBgkeTTIIBHQiFGgSEPEQUAQIBAQEBAQEBA2gogmpyAQEBAQEBAQEBTAINgToTAUsPBCEBHA1VigKsFotSgy6HXYVXGwEBCGSFByAFkU6PPFKgSYdESJZnNiKBWzQhCDJJgmQJggMMQQMBG4IDJDaIIxaCHwEBAQ X-IPAS-Result: A2GxCQAw7ulZ/4AFNJ1cHQELAQUBgzEuJT9uJ48NjksBgioBgkeTTIIBHQiFGgSEPEQUAQIBAQEBAQEBA2gogmpyAQEBAQEBAQEBTAINgToTAUsPBCEBHA1VigKsFotSgy6HXYVXGwEBCGSFByAFkU6PPFKgSYdESJZnNiKBWzQhCDJJgmQJggMMQQMBG4IDJDaIIxaCHwEBAQ X-IronPort-AV: E=Sophos;i="5.43,405,1503374400"; d="scan'208";a="6837029" Original-Received: from 157-52-5-128.cpe.teksavvy.com (HELO pastel.home) ([157.52.5.128]) by smtp.teksavvy.com with ESMTP; 20 Oct 2017 08:40:11 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BD69860732; Fri, 20 Oct 2017 08:40:11 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138762 Archived-At: Package: Emacs Version: 27.0.50 We should provide some `current-source-file-name` function which macros can use to find get the name of the source file in which they were invoked. Currently, some packages use a mix of load-file-name and byte-compile-current-file to get that information, but it's hackish. It'll be difficult to implement `current-source-file-name` in a way that works reliably in all cases, but at least by providing this function we can isolate the hack in a single place (and hope to refine it over time, e.g. by tweaking bytecomp.el and lread.c so as to provide *better* underlying information). Along the same lines, it'd be great to provide `current-source-definition-name` or even `current-source-line-number`. Stefan In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2017-10-14 built on pastel Repository revision: 300abf7bdd75ec44a497b3eb6ba86e242118ded1 Windowing system distributor 'The X.Org Foundation', version 11.0.11902000 System Description: Debian GNU/Linux 9.1 (stretch) Recent messages: Marking diary entries...done Preparing diary...done Mark set [3 times] Saving file /home/monnier/share/etc/diary... Wrote /home/monnier/share/etc/diary Marking diary entries...done Warning: hide-sublevels is obsolete! [2 times] Mark saved where search started Mark set Configured using: 'configure -C --enable-checking --with-modules --enable-check-lisp-object-type 'CFLAGS=-Wall -g3 -Og -Wno-pointer-sign' PKG_CONFIG_PATH=/home/monnier/lib/pkgconfig' Configured features: XAW3D XPM JPEG TIFF GIF PNG SOUND GPM DBUS NOTIFY GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES Important settings: value of $LANG: fr_CH.UTF-8 locale-coding-system: utf-8-unix Major mode: InactiveMinibuffer Minor modes in effect: diff-auto-refine-mode: t electric-pair-mode: t global-reveal-mode: t reveal-mode: t auto-insert-mode: t savehist-mode: t minibuffer-electric-default-mode: t global-compact-docstrings-mode: t url-handler-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/monnier/src/emacs/elpa/packages/svg/svg hides /home/monnier/src/emacs/work/lisp/svg /home/monnier/src/emacs/elpa/packages/ada-mode/ada-prj hides /home/monnier/src/emacs/work/lisp/progmodes/ada-prj /home/monnier/src/emacs/elpa/packages/ada-mode/ada-stmt hides /home/monnier/src/emacs/work/lisp/progmodes/ada-stmt /home/monnier/src/emacs/elpa/packages/ada-mode/ada-mode hides /home/monnier/src/emacs/work/lisp/progmodes/ada-mode /home/monnier/src/emacs/elpa/packages/ada-mode/ada-xref hides /home/monnier/src/emacs/work/lisp/progmodes/ada-xref /home/monnier/src/emacs/elpa/packages/hyperbole/set hides /home/monnier/src/emacs/work/lisp/emacs-lisp/set /home/monnier/src/emacs/elpa/packages/crisp/crisp hides /home/monnier/src/emacs/work/lisp/obsolete/crisp /home/monnier/src/emacs/elpa/packages/landmark/landmark hides /home/monnier/src/emacs/work/lisp/obsolete/landmark Features: (sort mail-extr emacsbug message rmc puny format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch multi-isearch autoload lisp-mnt xscheme unsafep trace testcover shadow scheme re-builder profiler inf-lisp ielm gmm-utils ert pp ewoc debug elp edebug cl-indent map eieio-opt speedbar sb-image ezimage dframe find-func cl-extra help-fns radix-tree executable copyright view cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs cal-french vc-git diff-mode diary-lib diary-loaddefs cal-move cal-menu calendar cal-loaddefs cus-edit cus-start cus-load wid-edit filecache autorevert filenotify doc-view jka-compr image-mode dired dired-loaddefs server time-date flymake-proc flymake subr-x compile comint ansi-color ring warnings noutline outline easy-mmode flyspell ispell checkdoc thingatpt help-mode load-dir elec-pair reveal autoinsert proof-site proof-autoloads cl pg-vars savehist minibuf-eldef disp-table compact-docstrings cl-seq inline kotl-loaddefs advice info realgud-recursive-autoloads finder-inf url-auth package easymenu epg-config url-handlers url-parse auth-source eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib bbdb-autoloads vm-autoloads mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 233751 23426) (symbols 48 30526 0) (miscs 40 4438 355) (strings 32 78956 4837) (string-bytes 1 2417807) (vectors 16 38720) (vector-slots 8 1465001 121641) (floats 8 681 243) (intervals 56 3041 202) (buffers 992 24))