Giter VIP home page Giter VIP logo

Comments (6)

doublep avatar doublep commented on May 31, 2024

There is no exposed way currently, logview--initialize-submode is only a part of guessing algorithm.

However, this should not be that difficult to add, e.g C-c C-c to manually pick a submode from the list of registered ones. However, it still has to somehow guess the timestamp format, unless you specify just one in submode definition. Does your log have an entry starting line somewhere near the beginning, say, in the first 50 lines?

from logview.

mrsmond avatar mrsmond commented on May 31, 2024

Hi Paul,

Thanks for your quick response.

In my log file, the first parse-able message could be 100s of lines from the start of file and it won't be at the same line.

In my sub-mode definition I have ignored the timestamp. The log file is from a simulation so the time doesn't represent real time. I had thought of telling logview that is was UNIX time, but I don't have much need to filter by time as of yet.

Instead of manually picking the sub-mode, could I instead set it based on a file name? The log files always have the same name, so I thought of setting auto-mode-alist based on the file name and a function to tell logview which sub-mode it is.

Thanks!

from logview.

doublep avatar doublep commented on May 31, 2024

from logview.

doublep avatar doublep commented on May 31, 2024

Please test if the added command does what you want. You can invoke it with C-c C-c or from Lisp like

(logview-choose-submode "my-submode-name")

assuming you don't use any timestamps.

The command is not yet fully documented.

from logview.

mrsmond avatar mrsmond commented on May 31, 2024

I can confirm that works. Brilliant, thanks very much!

I installed the new version though the Emacs package system (and deleted the old one), but couldn't get it to "reload" the new version so the above function was not recognised. Is there a way to do this without starting an new emacs process?

Cheers.

from logview.

doublep avatar doublep commented on May 31, 2024

Elisp generally sucks for reloading on-the-fly. You can try visiting logview.el and manually evaluating all variable declarations with C-M-x.

from logview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.