From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Uberti Newsgroups: gmane.emacs.bugs Subject: bug#49865: 28.0.50; Customize project-find-file without thing-at-pont Date: Wed, 4 Aug 2021 08:16:11 +0200 Message-ID: <8050cc41-2dd3-964b-e6ae-ab267a8a05b9@inventati.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26306"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 To: 49865@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 04 08:17:33 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBADd-0006eV-8z for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Aug 2021 08:17:33 +0200 Original-Received: from localhost ([::1]:56290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBADb-0006d9-LR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Aug 2021 02:17:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBAD8-0006cZ-Ab for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 02:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBAD8-0002pq-4e for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 02:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBAD8-0000gw-0U for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 02:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Uberti Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Aug 2021 06:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49865 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16280577921258 (code B ref -1); Wed, 04 Aug 2021 06:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Aug 2021 06:16:32 +0000 Original-Received: from localhost ([127.0.0.1]:42271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBACd-0000Jd-KN for submit@debbugs.gnu.org; Wed, 04 Aug 2021 02:16:32 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBACb-0000HO-3X for submit@debbugs.gnu.org; Wed, 04 Aug 2021 02:16:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBACa-0006YF-UE for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 02:16:28 -0400 Original-Received: from confino.investici.org ([212.103.72.250]:32049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBACX-00024y-J8 for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 02:16:28 -0400 Original-Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4GfhMJ4hMxz10w8 for ; Wed, 4 Aug 2021 06:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1628057772; bh=hrWshiOlNqmS59dIWMYUYuQvhWkJ5r0WkB2JOL6CTto=; h=To:Subject:From:Date:From; b=Fw7XfTnkN1ZyS4nxDk5Lws51F2vpjYpOEgGp1mkOmGXXmasqaJsqwgS0UoUwp/cSA zSbNuF0DAs/au8m83fvqJeADhtrNUn6izNCyU9h8bAFancrepH0e/JOnfUGZWTEPc2 NTzRzX4NrLtMKoqL1Oa4IZ60y2poK0jxI5fV3AzY= Original-Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: manuel.uberti@inventati.org) by localhost (Postfix) with ESMTPSA id 4GfhMJ45Cxz10w0 for ; Wed, 4 Aug 2021 06:16:12 +0000 (UTC) Content-Language: en-GB Received-SPF: pass client-ip=212.103.72.250; envelope-from=manuel.uberti@inventati.org; helo=confino.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211124 Archived-At: Hi, when I use project-find-file it always picks up the thing at point even when it is something I am pretty sure that does not correspond to a filename, which, in my case, is all the times. I see that in project.el, project-find-file uses project-find-file-in: ;;;###autoload (defun project-find-file () "Visit a file (with completion) in the current project. The completion default is the filename at point, determined by `thing-at-point' (whether such file exists or not)." (interactive) (let* ((pr (project-current t)) (dirs (list (project-root pr)))) (project-find-file-in (thing-at-point 'filename) dirs pr))) Would it be possible to make it customizable with regards to that (thing-at-point 'filename)? At the moment I am using this in my init.el, which I have bound to f in project-prefix-map: (defun mu-project-find-file () "Visit a file (with completion) in the current project." (interactive) (let* ((pr (project-current t)) (dirs (list (project-root pr)))) (project-find-file-in nil dirs pr))) So what I would like is a defcustom that makes me choose whether to pass nil or (thing-at-point ...) to project-find-file-in. I know that this is not a real bug because I can still type whatever I want after calling project-find-file, so I totally understand if this is not something worth new code in project.el. It's just that I don't see the point for project-find-file to suggest me as defaults things like "defun" or "interactive". Thank you. In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo version 1.16.0) of 2021-08-04 built on hathaway Repository revision: bee3e51550174047c73a1e942c16c8d45e2db1b8 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12009000 System Description: Ubuntu 20.04 LTS Configured using: 'configure --with-harfbuzz --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_MONETARY: it_IT.UTF-8 value of $LC_NUMERIC: it_IT.UTF-8 value of $LC_TIME: it_IT.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: electric-pair-mode: t flyspell-mode: t delete-selection-mode: t auto-image-file-mode: t show-paren-mode: t global-so-long-mode: t global-company-mode: t company-mode: t envrc-global-mode: t envrc-mode: t flymake-mode: t goto-address-prog-mode: t hl-line-mode: t global-git-commit-mode: t magit-auto-revert-mode: t shell-command-with-editor-mode: t shell-dirtrack-mode: t minibuffer-depth-indicate-mode: t minibuffer-electric-default-mode: t savehist-mode: t global-diff-hl-mode: t diff-hl-mode: t vertico-mode: t recentf-mode: t save-place-mode: t mu-keys-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t window-divider-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t view-mode: t Load-path shadows: /home/manuel/.emacs.d/elpa/transient-20210723.1601/transient hides /usr/local/share/emacs/28.0.50/lisp/transient Features: (shadow sort mail-extr emacsbug sendmail noutline outline checkdoc pulse color view jka-compr help-fns radix-tree elec-pair package-lint-flymake package-lint let-alist finder finder-inf lisp-mnt bug-reference flyspell ispell delsel image-file image-converter paren so-long company-oddmuse company-keywords company-etags etags fileloop generator xref company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company envrc inheritenv flymake-proselint flymake-proc flymake compile keychain-environment goto-addr thingatpt hl-line face-remap vc-git magit-extras magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff git-commit log-edit message rmc puny dired-x dired-aux dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor shell pcomplete comint server ansi-color magit-mode transient format-spec magit-git magit-section magit-utils crm dash cursor-sensor project autorevert filenotify mb-depth minibuf-eldef savehist consult-vertico consult bookmark text-property-search pp diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode orderless vertico modus-operandi-theme modus-themes mode-local advice find-func recentf tree-widget wid-edit saveplace delight comp comp-cstr warnings packages pdf-loader cl-extra help-mode hydra ring lv built-ins rx pcase ibuf-macs core-settings edmacro kmacro disp-table core-packages no-littering core-lib easy-mmode tex-site info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl 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 tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer 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 cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 409418 31095) (symbols 48 43772 1) (strings 32 99103 5677) (string-bytes 1 3151508) (vectors 16 43539) (vector-slots 8 919095 45828) (floats 8 278 522) (intervals 56 1423 131) (buffers 992 19)) -- Manuel Uberti www.manueluberti.eu