all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24606: 25.1.50; (thing-at-point 'filename) doesn't recognize names with @
@ 2016-10-04  7:18 Tino Calancha
  2016-10-04  8:02 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Tino Calancha @ 2016-10-04  7:18 UTC (permalink / raw)
  To: 24606; +Cc: tino.calancha

X-Debbugs-CC: Emanuel Berg <embe8573@student.uu.se>
X-Debbugs-CC: tino.calancha@gmail.com

Problem reported by Emanuel Berg in:
https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg01219.html

emacs -Q:

(let ((str "/lib/systemd/system/getty@.service")
       res)
   (with-temp-buffer
     (insert str)
     (let ((thing-at-point-file-name-chars "-@~/[:alnum:]_.${}#%,:"))
       (push `(thing-at-point-patched . ,(thing-at-point 'filename)) res))
     (push `(thing-at-point . ,(thing-at-point 'filename)) res)) res)
=> ((thing-at-point . ".service") (thing-at-point-patched . "/lib/systemd/system/getty@.service"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From 3a4a8c7245a4b4713a92cd77e75a375cf366a825 Mon Sep 17 00:00:00 2001
From: Emanuel Berg <embe8573@student.uu.se>
Date: Tue, 4 Oct 2016 16:10:44 +0900
Subject: [PATCH] thing-at-point: Add @ as a valid character for file names

Reported in:
https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg01219.html
* lisp/thingatpt.el (thing-at-point-file-name-chars): Add @ (Bug#24606).
---
  lisp/thingatpt.el | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 9920fa0..704dc69 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -244,7 +244,7 @@ thing-at-point-bounds-of-list-at-point

  ;;  Filenames

-(defvar thing-at-point-file-name-chars "-~/[:alnum:]_.${}#%,:"
+(defvar thing-at-point-file-name-chars "-@~/[:alnum:]_.${}#%,:"
    "Characters allowable in filenames.")

  (put 'filename 'end-op
-- 
2.9.3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.0)
  of 2016-10-04 built on calancha-pc
Repository revision: 74b4f13842f3119f98797ea76d9be42457b330e1





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-19 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-04  7:18 bug#24606: 25.1.50; (thing-at-point 'filename) doesn't recognize names with @ Tino Calancha
2016-10-04  8:02 ` Eli Zaretskii
2020-08-19 11:55   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.