▲ 51 r/emacs

What is emacs canvas and how does it work?

Emacs Canvas (patch) on reddit

From my understanding of how programs draw to screens, it seems that Emacs canvas provides a video buffer to external graphics programs or libraries so that instead of drawing to the regular screen, they draw inside a video buffer created and displayed within Emacs.

The equivalent I can think of is the case of VNC or Xpra where a program uses a $DISPLAY which is rendered remotely on the client.

Would that mean that getting a program to run in a canvas would be along the lines:

(emacs-create-canvas height width buffer-name "/usr/bin/random-gui-program -param 1 -param -2")?

I suppose there would be some additional parameters relating to passing key strokes, controlling window movement and size etc.

reddit.com
u/vfclists — 3 days ago
▲ 15 r/emacs

What is the best way to view the live output of a long shell process in Emacs without making it hang AND capture it into and org-babel `#+RESULTS:` as well?

I want to capture the screen output of long running scripts like Debian upgrades in Emacs without Emacs hanging.

I usually capture the output into an org-babel src text block for review but Emacs hangs during the process and when I do it :async it fails with the Error in process sentinel message.

Piping the output into a file and using the tail command to view it one of Emac's terminal packages could probably do the trick. The filename could be linked into the org region using org-transclusion or some other similar method.

My current approach is to run command 2>&1 | tee outputfile and that usually guarantees that all the output will appear in the :wrap src text regardless of any errors, rather than the Org error buffer.

In my limited experience this would be equivalent to getting Emacs to inject the execution of the command into a gnu screen or tmux session so the output would be visible in that screen via term or eat and the results would still be captured in the #+RESULTS: block.

Any ideas or existing solutions for this issue?

reddit.com
u/vfclists — 5 days ago
▲ 0 r/FiiO

Does the Fiio EH13 live up to its battery life claims?

I'm not seeing it.

It also doesn't switch off automatically when no sound has been played for a while.

I don't think it even gets up to 10 hours when it has barely played for 4 hours with silence coming after.

reddit.com
u/vfclists — 11 days ago

Is the conversion of the natural swampy region to pine plantations and grain production a factor in the severity of the wildfires drawing close to Bordeaux (France)?

I was looking at the footage of the wildfires in France and noted how uniform the forests were and guessed that it wasn't a natural forest.

It also seemed odd that there were no herds of animals there, either wildlife or livestock, whose grazing would have checked the undergrowth.

Looking up the region brought up the above link and here is a quote from the pages.

> Most of the region now occupied by the Landes forest was swampy land that was sparsely inhabited until the 19th century, when the 19 June 1857 law ended traditional pastoralism and led to wide scale reforestation, in order to rehabilitate the landscape and provide for regional economic development. Prior to this period, the people of the Landes used stilt-walking to move from place to place in the wet terrain. Since the 1970s, parts of the forest have given way to intensive agriculture (in particular, grain farming.)

The question then comes up whether the conversion from its original swampy nature to commercial forest and grain production is factor in the severity of the fires as whatever natural environmental features that would check the spread of the fires were eliminated in favour these pine forests and grain plantations.

Any opinions on this?

Is the uncontrollable spread of the fires as much consequence of converting nature to serve human needs as its the weather conditions fanning it?

reddit.com
u/vfclists — 22 days ago

Is the conversion of the natural swampy region to pine plantations and grain production a factor in the severity of the wildfires drawing close to Bordeaux (France)?

I was looking at the footage of the wildfires in France and noted how uniform the forests were and guessed that it wasn't a natural forest.

It also seemed odd that there were no herds of animals there, either wildlife or livestock, whose grazing would have checked the undergrowth.

Looking up the region brought up the above link and here is a quote from the pages.

> Most of the region now occupied by the Landes forest was swampy land that was sparsely inhabited until the 19th century, when the 19 June 1857 law ended traditional pastoralism and led to wide scale reforestation, in order to rehabilitate the landscape and provide for regional economic development. Prior to this period, the people of the Landes used stilt-walking to move from place to place in the wet terrain. Since the 1970s, parts of the forest have given way to intensive agriculture (in particular, grain farming.)

The question then comes up the conversion from its original swampy nature to commercial forest and grain production is factor in the severity of the fires as whatever natural environmental features that would check the spread of the fires were eliminated in favour these pine forests and grain plantations.

Any opinions on this?

Is the uncontrollable spread of the fires as much consequence of converting nature to serve human needs as its the weather conditions fanning it?

reddit.com
u/vfclists — 23 days ago

Trying to view commits results in in a 404 error and on checking the logs I think the error may be related to this.

I queried Google AI over the GetDiff error and this is what emerged.

An unable to parsepatch error inside the GetDiff module means that Forgejo successfully ran the underlying git diff-tree command, but the output returned by Git was corrupted, incomplete, or used a formatting style that Forgejo's internal Go parser could not understand.

​

2026/07/01 12:58:41 ...s/web/repo/commit.go:344:Diff() [D] GetDiff: unable to ParsePatch: invalid first file line: ^[[?1000h^[[?1049h^[[?1h^[=^[[1;24r^[[23m^[[24m^[[0m^[[H^[[J^[[?1000l^[[?1000h^[[?25l^[[24;1H"/dev/null" is not a file^M"/tmp/sNjKPS_dummy-change" [readonly] 3L, 20B^[[1;1H^[[34m^[[47m  ^[[0m^[[1m^[[34m^[[46m--------------------------------------^[[0m^[[7m|^[[0m^M

​

It looks like the git command used to create the diff output produces output that breaks the parsers used by Forgejo.

What is the exact git commands run to retrieve the data of a particular commit?

I see commands like these in the logs.

/usr/bin/git cat-file --batch [repo_path: /var/lib/forgejo/data/forgejo-repositories/vfclists/repo.git] (modules/gitrepo/gitrepo.go:31)

/usr/bin/git -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= rev-parse

reddit.com
u/vfclists — 2 months ago
▲ 4 r/drupal

Is there a Drupal module or wizard that can generate the JSON:API or REST API CRUD commands for an entity or node?

Basically I'm looking for a tool where you can navigate to a node/entity or give it a node id and UUID and ask the module to show how the CRUD commands would look like.

Is there anything like that?

reddit.com
u/vfclists — 3 months ago

How can a minimum width be set for the url-bar, especially the URL text itself?

When I adjust the width of the firefox window in my tiled window manager the url-bar isn't given the priority it should, with the search bar, and the pinned addon icons taking up space when they are not needed, especially the latter.

It becomes narrow to the point where the information icons in it and the profile name obscures the text of the URL completely. Not only that even hovering the mouse of the space doesn't show the URL tooltip.

It seems the text of the URL needs to be visible for the URL tooltip to show.

In one of my profiles I have set the URL bar to show the icon of the profile not the whole name and that helps.

Are there some CSS settings that can be used to fix this condition?

Surely the Firefox developers must be dogfooding their own browser to see the importance of this.

PS. This is a pet peeve I've been unable to solve. I hope 3 years later there will be a better solution😞😞😠

reddit.com
u/vfclists — 3 months ago

How can a minimum width be set for the url-bar, especially the URL text itself?

When I adjust the width of the firefox window in my tiled window manager the url-bar isn't given the priority it should, with the search bar, and the pinned addon icons taking up space when they are not needed, especially the latter.

It becomes narrow to the point where the information icons in it and the profile name obscures the text of the URL completely. Not only that even hovering the mouse of the space doesn't show the URL tooltip.

It seems the text of the URL needs to be visible for the URL tooltip to show.

In one of my profiles I have set the URL bar to show the icon of the profile not the whole name and that helps.

Are there some CSS settings that can be used to fix this condition?

Surely the Firefox developers must be dogfooding their own browser to see the importance of this.

reddit.com
u/vfclists — 3 months ago
▲ 4 r/emacs

How would an emacs package to use the functions in this Lazarus LCL based shared object library look like?

Here is the C code for accessing the library

#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>

typedef void* (*CreateCompFn)();
typedef void (*FreeCompFn)(void*);
typedef void (*SetTextFn)(void*, const char*, const char*);
typedef const char* (*GetTextFn)(void*, const char*);

int main() {
  void *lib;
  const char* initValue;
  
  lib = dlopen("./libmylib.so", RTLD_LAZY);
  if (!lib) {
    fprintf(stderr, "Error opening library: %s", dlerror());
    exit(EXIT_FAILURE);
  }

  CreateCompFn Create_Component = (CreateCompFn)dlsym(lib, "Create_Component");
  FreeCompFn Free_Component = (FreeCompFn)dlsym(lib, "Free_Component");
  SetTextFn Component_SetTextProperty = (SetTextFn)dlsym(lib, "Component_SetTextProperty");
  GetTextFn Component_GetTextProperty = (GetTextFn)dlsym(lib, "Component_GetTextProperty");

 // Execute
  void* myComponent = Create_Component();
  initValue = Component_GetTextProperty(myComponent, "TextValue");
  printf("initial value is - %s\n", initValue);

  Component_SetTextProperty(myComponent, "TextValue", "Hello from C99!");
  printf("Component created and modified successfully.\n");

  initValue = Component_GetTextProperty(myComponent, "TextValue");
  printf("new value is - %s\n", initValue);

  Free_Component(myComponent);
  dlclose(lib);
  return 0;

}
reddit.com
u/vfclists — 3 months ago
▲ 3 r/drupal

What is the simplest most clutter free theme for use in automated form submission?

I am studying how to submit forms in the Selenium or Playright manner and when I followed a guide showing the curl equivalent of submitted forms I saw a lot of code related to the theme etc in the submission.

This is based on using the DevTools window in Chrome or Firefox and choosing the option that enables you to copy the form submission code. You can even choose to see how a curl submission looks.

Is there some other theme that would show the most minimal data, Stark, or even something more basic?

reddit.com
u/vfclists — 3 months ago
▲ 11 r/emacs

Looking for a quick bookmark lists package in Emacs

Is there some kind of package that simplifies the quick creation of throwaway lists?

Sometimes I am searching through my files in relation to some project or topic and when I come across candidate files I want to save them to a list then retrieve them and peruse them in depth afterwards, just for that session.

Named lists of bookmarks (filenames) that I can discard or save for later is how I see them.

Any packages along such lines?

reddit.com
u/vfclists — 3 months ago
▲ 9 r/emacs

How can C-g be configured to not trigger the debug window?

When you have to force Emacs to stop a long running/hanging task (in my case usually with pkill -SIGUSR2 emacs) the C-g key normally used to cancel a command key sequence starts to trigger the debug window.

I use toggle-debug-on-quit to stop this behaviour, but I don't think cancelling a command key sequence should cause this in a contemporary UI though there may be some legacy reason for it.

Is there some way to work around it?


UPDATE

I didn't know the C-g key is the accepted way of interrupting a long running task. I also run EXWM so when something hangs Emacs it affects my desktop session.

reddit.com
u/vfclists — 3 months ago
▲ 18 r/emacs

Does magit have some kind of async setting that stops it from making Emacs hang while it scans the repo?

I want to place some files in a CMS system under version control, but those files are part of the whole CMS code itself and as magit does the scan it causes Emacs to become unresponsive.

Doesn't it have some setting to stop it hanging during that phase?

If I allow it to finish will it be faster from that point onwards?

In the meantime I am placing those directories in .gitignore and trying out the ! trick that allows you to include some files in the directories that have been excluded, or use the git add -f option.

reddit.com
u/vfclists — 3 months ago
▲ 3 r/drupal

How do disable a module when it causes a bootstrap failure which stops drush from removing it via pm:uninstall?

Upgrading a Drupal 10.4.x installation via composer has resulted in this bootsrap error.

PHP Fatal error:  Type of Drupal\shortcut_menu\ShortcutMenuLazyBuilder::$entityTypeManager must be ?  
Drupal\Core\Entity\EntityTypeManagerInterface (as in class Drupal\shortcut\ShortcutLazyBuilders) 
in /var/www/html/web/modules/contrib/shortcut_menu/src/ShortcutMenuLazyBuilder.php on line 9

drush cr, drush cc drush upgradedb:status and drush pm:uninstall all fail because of

How can I disable it?

Can I use composer to do it, or will it be better to disable it by setting the value in the system table or some other table that disables the module?

Does the latter method work for the Drupal 10+ series?

reddit.com
u/vfclists — 3 months ago
▲ 5 r/drupal

Does 'ddev composer update "drupal/*" --with-all-dependencies' exclude Drupal core?

I just run this command I didn't see any drupal/core-xxxx packages in the listing.

The disk was running out of space and saw the message in the admin that I didn't have enough space, ie 1024k to upgrade Drupal core and wonder if that was why the above command didn't upgrade Drupal core as well.

I upgraded it using composer require drupal/core-recommended:11.1.10 drupal/core-composer-scaffold:11.1.10 drupal/core-project-message:11.1.10 --update-with-all-dependencies

It was as far as I could go probably it was a Drupal CMS 1.0 installation.

reddit.com
u/vfclists — 3 months ago
▲ 0 r/ukbike

I know this won't go down well, but the old lady was also at fault in this fatal collision. She shouldn't have crossed unless the bike stopped, notwithstanding the attentiveness of the rider.

youtube.com
u/vfclists — 3 months ago
▲ 0 r/drupal

How good is composer at managing Drupal 7 sites?

I've been using Drush on Drupal 7 for a long time, but having started on Drupal 11 I've gotten more used to the Composer approach and see on Drupal.org that many Drupal 7 modules can be installed through composer.

Are there any gotchas installing Drupal 7 and installing/upgrading modules with composer?

Is Composer usage on Drupal 7 mature and comparable or even better than Drush?

reddit.com
u/vfclists — 3 months ago
▲ 5 r/drupal

Is Drupal CMS 1.x upgradeable to Drupal CMS 2.x?

I am trying to upgrade a Drupal CMS 1.1.0 installation and Composer says drupal cms is locked to 1.1.0 and causes conflicts with other modules.

Below is a quotation from this link - https://www.drupal.org/project/cms/releases/2.1.0-beta1

> Drupal CMS 2.1.0-beta includes a new site template, Haven, with a warm and bright design and features aimed at non-profit websites. > > This release should be used for testing only and is not suitable for building websites. There is no update path for Drupal CMS.

It may be a glorious journey to upgrade from the current Drupal CMS 1.1.0 but I don't feel that adventurous.

u/vfclists — 3 months ago