Not using view mode because the major mode is special

When I issue org-roam-graph command, I get “Not using view mode because the major mode is special” on the minibuffer, and on the buffer I don’t see the .svg file being displayed.

How do I resolve this?

Can you please post what you get when you do:

C-h v org-roam-graph-viewer <'ret>

describe-variable : org-roam-graph-viewer

It should default to your default web application in Debian, i.e. Firefox. Please check that.

I don’t have such variable under C-h v, nor under C-h o for that matter. The only help topic inside emacs I have is org-roam-graph.

Is there something wrong with my setup?

Hmm, I dont know for sure, its a variable defined in org-roam-graph.el, most probably its value is being read as 'nil so emacs is trying to open it in view-file ?

Can you try to force set it by using

(setq org-roam-graph-viewer "/usr/bin/firefox") in your scratch and execute this temporarily? > point your text cursor to the end of the bracket and do C-x C-e and see what happens when you then try to execute org-roam-graph?

see this : Org-roam User Manual

1 Like

I set it to "/usr/bin/torbrowser" since I am on qubes-whonix. After I executed org-roam-graph, torbrowser asked me whether to open /tmp/....svg file, I clicked OK, and then GIMP fired up trying to open the file. It failed, “Opening ‘/tmp/graph.88Bcnw.svg’ failed: Could not open ‘/tmp/graph.88Bcnw.svg’ for reading: Unknown reason”

This is definitely an improvement, I think now the issue is with the tor-browser here, can you use something like chromium to test this out temporarily ?

It’s an svg file. I used nsxiv image viewer, too. It fails to open the svg file.

strange… can you go to your /tmp/ dir and extract the image and see it ?

There should be two files associated with the image, a .dot file and an .svg file

These are the graph-related svg files:

.rw------- 125k user    28 Nov 17:47 graph.42HuzM.svg
.rw------- 125k user    28 Nov 17:48 graph.88Bcnw.svg
.rw-------  38k user    28 Nov 17:47 graph.BB9FbK.dot
.rw-------  38k user    28 Nov 17:48 graph.L9p6mK.dot
.rw------- 125k user    28 Nov 17:54 graph.oQLmyY.svg
.rw-------  38k user    28 Nov 17:54 graph.z2yw47.dot

Trying to open one:

/tmp $ nsxiv graph.42HuzM.svg 
nsxiv: graph.42HuzM.svg: Error opening image
nsxiv: no more files to display, aborting
/tmp $ 

Here’s the file output:

/tmp $ file graph.42HuzM.svg 
graph.42HuzM.svg: SVG Scalable Vector Graphics image
/tmp $

Nothing seems out of the ordinary for the files… In my case the files are opened in Firefox, and any image viewer even gimp opens them… I don’t know whats going wrong there.

do a cat on the .dot files and see whats inside them maybe? does it offers a clue whats going wrong?

also you have graphviz installed as a system package right ?

/tmp $ apt policy graphviz
graphviz:
  Installed: 2.42.2-7+b3
  Candidate: 2.42.2-7+b3
  Version table:
 *** 2.42.2-7+b3 500
        500 tor+https://deb.debian.org/debian bookworm/main amd64 Packages
        100 /var/lib/dpkg/status
/tmp $ 
/tmp $ cat graph.BB9FbK.dot 
digraph "org-roam" {
 edge [];
"d3d88be5-fcf5-455d-ab8d-8bf0b262dec7" [style="bold,rounded,filled

and continues on and on describing various elements.

I honestly don’t see anything out of the ordinary here… can you diagnose whether the .svgs being produced are corrupted or is it a problem in the image viewers themselves somehow ?

1 Like

Here’s a funny thing when GIMP shows me when it tries to open the .svg file:

funny

Do you see

  1. the image preview GIMP produces, which is completely flat line
  2. the image size proportions out of whack

ya it looks corrupted…

I also had the C-c n g command working properly before. This current phenomenon I am facing is a recent thing… Could I have screwed up something in the use-package declaration. I don’t even know if there are org-roam-graph related settings in there.

how many nodes do you have? Maybe its not corrupted…

~/Documents/org/roam $ ls -la | wc -l
43
~/Documents/org/roam $ 

Its corrupted for sure then, the width proportions are out of whack… if it was working earlier and not now… maybe the problem is located somewhere in your config? I dont use use packages… just the plain old way to configure my setup.

1 Like

(setq org-roam-graph-extra-config '(("rankdir" . "LR"))) ; render the graph vertically

can you set the variable temporarily in your scratch and see what happens with the graph?

1 Like