all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: hw <hw@adminart.net>
To: 17021@debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	koppel@ece.lsu.edu, stefankangas@gmail.com
Subject: bug#17021: 24.3.50; extension to hi-lock.el
Date: Sun, 16 Aug 2020 19:49:38 +0200	[thread overview]
Message-ID: <cfbe1667dd832061803bad40401cc961df0b0c41.camel@adminart.net> (raw)
In-Reply-To: <yg57du2usm1.fsf@cyc.ece.lsu.edu>

On Thu, 2020-08-13 at 16:46 -0500, David Koppelman wrote:
> I've looked at the patch, but haven't tried to apply it to the current
> hi-lock. There are two things that need to be addressed before I would
> be happy with it landing.
> 
> First, this patch should not include the code for highlighting global
> variables, function-like text, and constants. (Perhaps this code was
> included by accident.) Those situations are best handled by the
> font-lock modes for specific languages.
> 
> Second, I don't feel comfortable reading a pattern file path from
> within the file being visited. Instead, some kind of identifier could
> be read from the file, such as xyz-report-patterns. That identifier
> would then be used to locate patterns from a file in some default
> location, such as ~/.emacs.d/hi-lock-patterns, or it could be used to
> construct a file name (but not a path) that would be expected in some
> directory, such as ~/.emacs.d/hi-lock-patterns/.
> 
> David Koppelman

It's been a long time that I've been using this extension.  Using a default
location may be a nice option, and I definitely wouldn't want to enforce it
and wouldn't suggest it, either:

When you have a (source) file or a number of (source) files in a directory
(structure) highlighting patterns should be applied to, you probably want
to keep the pattern file(s) together with the source file(s) --- or at
least within the same directory structure.  If you somehow distribute the
source files and/or have them under version control, you are facing the
problem of how to distribute the pattern files along with the source files
when you have a bunch of unrelated pattern files together with relevant
pattern files all in the same default location (i. e. some directory
somewhere else).  And if you use the same pattern files for multiple
projects, you don't want the pattern files used by project A altered when
you revert to a previous commit of project B or when you merge changes to
project C just because all the pattern are at the same default location.

Recipients of the files may not even have a default location required for
this to work, especially when the recipients are using operating systems
that would use entirely different paths for the pattern files.  Files at a
default location might be overwritten.  All this could make it difficult to
use a default location for pattern files and to maintain the necessary
assignments between source files and pattern files.

After all this time, the first thing that comes to mind for storing the
patterns is now an SQL database ...







  reply	other threads:[~2020-08-16 17:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17  4:18 bug#17021: 24.3.50; extension to hi-lock.el lee
2014-03-17  8:21 ` lee
2014-03-17 10:53   ` lee
2014-03-24  4:54 ` bug#17021: updated patch lee
2020-08-13 10:32 ` bug#17021: 24.3.50; extension to hi-lock.el Lars Ingebrigtsen
2020-08-13 18:43   ` David Koppelman
2020-08-13 19:50     ` Stefan Kangas
2020-08-13 21:46       ` David Koppelman
2020-08-16 17:49         ` hw [this message]
2020-08-17  0:32           ` Juri Linkov
2020-09-14 15:07             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cfbe1667dd832061803bad40401cc961df0b0c41.camel@adminart.net \
    --to=hw@adminart.net \
    --cc=17021@debbugs.gnu.org \
    --cc=koppel@ece.lsu.edu \
    --cc=larsi@gnus.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.