GNU bug report logs -
#8802
cperl-write-tags function in cperl-mode.el hard coded tags-file-name
Previous Next
Reported by: Dove Young <dove.young <at> gmail.com>
Date: Sun, 5 Jun 2011 12:31:02 UTC
Severity: minor
Tags: fixed
Fixed in version 28.1
Done: Stefan Kangas <stefan <at> marxist.se>
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 8802 in the body.
You can then email your comments to 8802 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8802
; Package
emacs
.
(Sun, 05 Jun 2011 12:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dove Young <dove.young <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 05 Jun 2011 12:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The original code reads like this
(defun cperl-write-tags (&optional file erase recurse dir inbuffer noxs
topdir)
;; If INBUFFER, do not select buffer, and do not save
;; If ERASE is `ignore', do not erase, and do not try to delete old info.
(require 'etags)
(if file nil
(setq file (if dir default-directory (buffer-file-name)))
(if (and (not dir) (buffer-modified-p)) (error "Save buffer first!")))
(or topdir
(setq topdir default-directory))
(let ((tags-file-name "TAGS")
(case-fold-search (eq system-type 'emx))
xs rel tm)
... ... ... ...
This line (let ((tags-file-name "TAGS") hard coded the tags-file-name to
"TAGS". This way is very bad. It prevents any users to customise their own
tags files. For example in my environment I have to customise tags file
names.
I use pde-mode (Perl Development Environment) in my daily work. it leverage
cperl-mode but would generate tags files base on Perl syntax. It is quite
different than what etags would do. This kind of tags file cannot be used in
any other features, such as speedbar, etc. So the reasonable way is to store
this kind of tags into separate files. But it cannot because of the hard
code in cperl-mode.el .
So would I suggest to re-factory cperl-mode.el and change "TAGS" to a
variable? Like following:
(defvar cperl-tags-file-name "TAGS" "TAGS file name"
(defun cperl-write-tags (&optional file erase recurse dir inbuffer noxs
topdir)
;; If INBUFFER, do not select buffer, and do not save
;; If ERASE is `ignore', do not erase, and do not try to delete old info.
(require 'etags)
(if file nil
(setq file (if dir default-directory (buffer-file-name)))
(if (and (not dir) (buffer-modified-p)) (error "Save buffer first!")))
(or topdir
(setq topdir default-directory))
(let ((tags-file-name cperl-tags-file-name)
(case-fold-search (eq system-type 'emx))
xs rel tm)
... ... ... ...
In this way, I can customise it by set cperl-tags-file-name in other value
to avoid to break any other features:
(setq cperl-tags-file-name "PDE-TAGS")
--
M-x Thinks
[Message part 2 (text/html, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8802
; Package
emacs
.
(Wed, 06 Jul 2011 17:16:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 8802 <at> debbugs.gnu.org (full text, mbox):
Dove Young <dove.young <at> gmail.com> writes:
> So would I suggest to re-factory cperl-mode.el and change "TAGS" to a
> variable? Like following:
>
> (defvar cperl-tags-file-name "TAGS" "TAGS file name"
That sounds like a reasonable request to me, but Emacs is in a feature
freeze at the moment, and I'm not sure adding stuff like this is
"allowed" during the freeze.
Stefan, Chong?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8802
; Package
emacs
.
(Wed, 06 Jul 2011 18:17:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 8802 <at> debbugs.gnu.org (full text, mbox):
>> So would I suggest to re-factory cperl-mode.el and change "TAGS" to a
>> variable? Like following:
>> (defvar cperl-tags-file-name "TAGS" "TAGS file name"
> That sounds like a reasonable request to me, but Emacs is in a feature
> freeze at the moment, and I'm not sure adding stuff like this is
> "allowed" during the freeze.
I'd rather that such a change be installed in Ilya's upstream
version first. We already have plenty of merge problems because of
patches he rejected. BTW, the recent change to use define-derived-mode
introduced a problem where the cperl-mode-hook gets called twice, so
I think we had better revert it.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8802
; Package
emacs
.
(Wed, 06 Jul 2011 18:22:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 8802 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> I'd rather that such a change be installed in Ilya's upstream
> version first. We already have plenty of merge problems because of
> patches he rejected.
Right. Would forwarding the report to Ilya and closing the bug report
in debbugs be the right thing to do?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8802
; Package
emacs
.
(Wed, 06 Jul 2011 19:36:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 8802 <at> debbugs.gnu.org (full text, mbox):
Lars Magne Ingebrigtsen wrote:
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
>> I'd rather that such a change be installed in Ilya's upstream
>> version first. We already have plenty of merge problems because of
>> patches he rejected.
This always makes me wonder: what is the point of having a file in Emacs
where modifying it is not allowed (or at least, is strongly
discouraged)? Why not move it to GNU ELPA? It's not like there isn't
another perl mode in Emacs, which is actually used by default.
> Right. Would forwarding the report to Ilya and closing the bug report
> in debbugs be the right thing to do?
Debbugs has the ability to mark a report as forwarded, see
http://debbugs.gnu.org/Developer.html#forward
Such reports are not usually closed.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8802
; Package
emacs
.
(Wed, 06 Jul 2011 19:53:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 8802 <at> debbugs.gnu.org (full text, mbox):
>>> I'd rather that such a change be installed in Ilya's upstream
>>> version first. We already have plenty of merge problems because of
>>> patches he rejected.
> This always makes me wonder: what is the point of having a file in Emacs
> where modifying it is not allowed (or at least, is strongly
> discouraged)? Why not move it to GNU ELPA? It's not like there isn't
> another perl mode in Emacs, which is actually used by default.
Good point. But AFAIK it does have a fairly large number of users.
Chong, Ilya, what do you guys think?
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8802
; Package
emacs
.
(Wed, 06 Jul 2011 19:55:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 8802 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Good point. But AFAIK it does have a fairly large number of users.
> Chong, Ilya, what do you guys think?
cperl-mode has lots and lots of users, I think. This would break their
Emacs 24 work flow significantly, in my opinion.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#8802
; Package
emacs
.
(Thu, 19 Nov 2020 05:20:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 8802 <at> debbugs.gnu.org (full text, mbox):
tags 8802 + fixed
close 8802 28.1
thanks
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> So would I suggest to re-factory cperl-mode.el and change "TAGS" to a
>>> variable? Like following:
>>> (defvar cperl-tags-file-name "TAGS" "TAGS file name"
>
>> That sounds like a reasonable request to me, but Emacs is in a feature
>> freeze at the moment, and I'm not sure adding stuff like this is
>> "allowed" during the freeze.
>
> I'd rather that such a change be installed in Ilya's upstream
> version first. We already have plenty of merge problems because of
> patches he rejected.
So given that the above merge problems are no longer a concern, I've
now added such a variable on master.
I'm therefore also closing this bug report.
Added tag(s) fixed.
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Thu, 19 Nov 2020 05:20:03 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
8802 <at> debbugs.gnu.org and Dove Young <dove.young <at> gmail.com>
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Thu, 19 Nov 2020 05:20:03 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
.
(Thu, 17 Dec 2020 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 131 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.